Merge branch 'services-r10' into master

commit 8723f184ee6f49817bdec692ac056adf21340ab1
Author: Andrew Liu <aliu@vmware.com>
Date:   Fri Apr 13 14:19:24 2012 +0800

    revendor base gem to include r9 commits

    Change-Id: Icdcabd36ceaad9fe17cc005d627dd3522e02164b

commit 7c893a968207e164e88b1d8fc20cddde1a32d7a0
Merge: 554be90 8d21b04
Author: Andrew Liu <aliu@vmware.com>
Date:   Fri Apr 13 14:15:07 2012 +0800

    Merge remote branch 'origin/services-r9' into r10

    Conflicts:
    	atmos/vendor/cache/vcap_services_base-0.1.8.gem
    	filesystem/vendor/cache/vcap_services_base-0.1.8.gem
    	mongodb/vendor/cache/vcap_services_base-0.1.8.gem
    	mysql/vendor/cache/vcap_services_base-0.1.8.gem
    	neo4j/vendor/cache/vcap_services_base-0.1.8.gem
    	postgresql/vendor/cache/vcap_services_base-0.1.8.gem
    	rabbit/vendor/cache/vcap_services_base-0.1.8.gem
    	redis/vendor/cache/vcap_services_base-0.1.8.gem
    	service_broker/vendor/cache/vcap_services_base-0.1.8.gem
    	vblob/vendor/cache/vcap_services_base-0.1.8.gem

    Change-Id: Iaac55526897acf42ed75fe3c08a96c1ca8b0687c

commit 554be907a098a9695116c6f1ecbf4acf083b203d
Author: Andrew Liu <aliu@vmware.com>
Date:   Tue Apr 10 22:33:05 2012 +0800

    create new redis client in lock refresh thread

    Change-Id: I73f4efff1a7fda8bdc05b29eb216031137622fa8

commit 1d5dafece94f4134d85fe5462f261a4d23280510
Author: felixhoo <hhu@vmware.com>
Date:   Sat Apr 7 11:08:11 2012 -0600

    Invoke each run task in a fiber context

    Change-Id: Ibb7a167e6b5b4ea775d25bbddd7cbd702360e79e

commit 94685031def07ab094face438a602eb4d9bb1886
Author: Tang Rui <rtang@vmware.com>
Date:   Sun Apr 1 14:45:52 2012 -0700

    Fix capacity calculation for service migration

    Change-Id: I2befe4eed16a190e2128a8744a44a9f72bff57dc

commit 11c38bef25f3916a133389769b472c4a92973642
Merge: bb3c024 f202332
Author: Frank Lu <flu@vmware.com>
Date:   Thu Apr 5 05:50:19 2012 +0000

    Merge "Parent role should not be blocked in disable_instance" into services-r10

commit bb3c024c0e1096d05a1789ecd869eac9c7ba9dcd
Author: felixhoo <hhu@vmware.com>
Date:   Wed Apr 4 11:31:56 2012 -0600

    Add base gem to backupmanager

    Change-Id: I1c5bc77fb8f7196a7c29ed4f242753807e89a390

commit f202332a00d628059734cd4d9ba13233af663294
Author: Frank Lu <flu@vmware.com>
Date:   Sun Apr 1 09:14:39 2012 -0600

    Parent role should not be blocked in disable_instance

      1. Default user (Parent role) should not be blocked for it will be used in dump_instance
      2. Unit test update: kill long transaction should only work for normal user rather than default user and super user

    Change-Id: I032ac9060eef24f476d9d947c550ee952b0ca1a8

commit c5e63e1f50bcce140fbd0b46df3ebf1d2f2b1274
Merge: b1ae681 c9d79a9
Author: Andrew Liu <aliu@vmware.com>
Date:   Tue Apr 3 05:08:59 2012 +0000

    Merge "add snapshot quota and delete snapshot job" into services-r10

commit c9d79a9433681712a47f4f0f51b8a46cbc986cae
Author: Andrew Liu <aliu@vmware.com>
Date:   Wed Mar 14 22:18:27 2012 -0700

    add snapshot quota and delete snapshot job

    also update async job framwork:
    1. Unify job related namespace to VCAP::Services::Base::AsyncJob
    2. Update resque and resque-status gem
    3. Move common job logic into base.

    Change-Id: I2dac7d2d2b5ed20003926a607f4fdaf96096e33e

commit b1ae68172b869c32ae29e771430cb9b882a61afe
Author: Yang Yang <yangy@vmware.com>
Date:   Sun Apr 1 19:46:12 2012 -0700

    fixed a bug in base unit test:

    1. re-edited the MockErrorNode malformed message so that it can be encoded in json

    Change-Id: If337faccb5c4c2daf906039cbc1e18af99c4a6c0

commit 37dc696ef989146946eab13f40ea9940d1f71586
Author: Chunjie <czhu@vmware.com>
Date:   Sat Mar 31 06:30:12 2012 -0700

    Add over provisioning support within varz.

    Change-Id: I276e5b99a593ca3cdb652d5c28ba0278ef622143

commit e637210e150c6e29bc0516306080fb435b1c22be
Merge: 38f9ce0 41132b6
Author: Chunjie <czhu@vmware.com>
Date:   Sat Mar 31 13:12:21 2012 +0000

    Merge "Add varz support for serialization data server." into services-r10

commit 38f9ce06f65165223b8db42916d67b8cf2e93781
Merge: c9fcb39 9e5f01e
Author: Nicholas Kushmerick <nicholask@vmware.com>
Date:   Sat Mar 31 13:06:36 2012 +0000

    Merge "clean up unit test directory under /tmp" into services-r10

commit c9fcb39f743f5090f541d0e30ab0407b30cca030
Merge: 7acca15 308934c
Author: Nicholas Kushmerick <nicholask@vmware.com>
Date:   Sat Mar 31 13:05:27 2012 +0000

    Merge "neo4j unit test clean up" into services-r10

commit 308934c39310063c8b3b9370e3a3e1a8aa6cbea2
Author: Cliff Wang <cliffwang@vmware.com>
Date:   Sat Mar 31 03:18:25 2012 -0600

    neo4j unit test clean up

    Change-Id: I97d22c3c7334d15b1ab71cd755f8840792e07912

commit 9e5f01ee0830336942c14fab77e8a2348453e00b
Author: felixhoo <hhu@vmware.com>
Date:   Sat Mar 31 03:34:11 2012 -0600

    clean up unit test directory under /tmp

    Change-Id: Id1a7789dc74b3e9d156e8824f0a2292c9957de73

commit 7acca151978d6cab239a928f98c8dc0c31c34f30
Author: figo <figof@mozy.com>
Date:   Sat Mar 31 00:16:00 2012 -0700

    add additional option for db_size_overhead to start pg nodewq

    Change-Id: I65b5c31c72e6c35832c105cc42376de980d604f5

commit c14b4d0d1892f8809ebd96fb0123ff9eed7dc0f2
Author: Frank Lu <flu@vmware.com>
Date:   Tue Mar 13 02:51:25 2012 -0600

    backup/dump/import/restore/snapshot/serialize postgresql databases using parent role rather than superuser

         1. Use the default user (parent role) rather than the super user to backup/dump/import/restore/snapshot/serialize the provisioned database
         2. Add model.rb: list all DataMapper relative classes
         3. Prevent the long-time queries/transctions submmitted by parent roles and super users from being killed
         4. Filter the long-time queries/transactions by postgresql query rather than ruby statements
         5. Support wqsnapshot/serialization jobs
         6. Fix the issue that unit test will generate residual databases in postgresql

    Change-Id: Iefed934f5627f0874d4e789cac5a1d6329609f03

commit 50ac82369354fa9da7fbf7d063d470448aaa3043
Merge: bb55965 402b92c
Author: Nicholas Kushmerick <nicholask@vmware.com>
Date:   Thu Mar 29 22:37:51 2012 +0000

    Merge "add quota and obj_limit configuration in vblob" into services-r10

commit bb559655007d6749cdeb995196bba85fa9d2a12c
Author: figo <figof@mozy.com>
Date:   Thu Mar 29 06:00:24 2012 -0700

    psql quota should be max_db_size + db_size_overhead

    Change-Id: I544ad93e2a061a3637747e18c647636bdd677bb8

commit 41132b6a6462ad4dc3d9e26aab5adad98b0475aa
Author: Chunjie <czhu@vmware.com>
Date:   Thu Mar 29 00:25:12 2012 -0700

    Add varz support for serialization data server.

    The collector handler for serialization data server will be present soon.

    Change-Id: I0d5da6dbffb3cb655efb1d49d1199a0c551fd97f

commit 099b1682ac77a624adaede7b9d7ab8eaada6186e
Merge: a2a39b2 49ecfe7
Author: figo <figof@mozy.com>
Date:   Thu Mar 29 06:46:58 2012 +0000

    Merge "make sure to close redis connection for varz" into services-r10

commit 49ecfe701d25b816e637a3b897b7a90fb2092081
Author: figo <figof@mozy.com>
Date:   Wed Mar 28 01:57:20 2012 -0700

    make sure to close redis connection for varz

    Change-Id: I3e23a37b7fc1a034461398b46015b94523259af8

commit a2a39b2ce96758d569d8f9d3a2d392b4b46e793e
Author: Andrew Liu <aliu@vmware.com>
Date:   Wed Mar 28 13:54:41 2012 +0800

    remove logging gem from services repository

    Change-Id: Ic9059f57964cb67d59414ceadf960c28f9a018f2

commit 402b92cbba2c1dd15274f7346a509d55e90a9ddd
Author: SonicWang <wangs@vmware.com>
Date:   Tue Mar 27 10:44:32 2012 -0700

    add quota and obj_limit configuration in vblob

    Change-Id: Icd0d28007637aeb805c4c3614fd476ae1b03a89e

commit c5d3a2df16fcd6abd4d955a03ea169f7e698e93b
Merge: d2af5cf d3fb525
Author: SonicWang <wangs@vmware.com>
Date:   Tue Mar 27 17:16:41 2012 +0000

    Merge "remove max_memory parameter in vblob" into services-r10

commit d2af5cfd30b32f8f079a4b2b09b062c9a4902ab3
Author: Yang Yang <yangy@vmware.com>
Date:   Mon Mar 26 23:16:57 2012 -0700

    added a fake unit test for serialization data server for ci

    Change-Id: I7b62c4643dbdceb9c7d062b1cd593d74573468d8

commit 38c990e9915fd1ed8629450ae724ef1c32439cc6
Merge: 0b38eb1 9abcf88
Author: felixhoo <hhu@vmware.com>
Date:   Tue Mar 27 05:58:55 2012 +0000

    Merge "Add varz into backup manager" into services-r10

commit 0b38eb12b1ca7f7384674ecba8db414bb9570477
Merge: a25bf59 e0d4bd5
Author: Tang Rui <rtang@vmware.com>
Date:   Tue Mar 27 05:58:10 2012 +0000

    Merge "Kill epmd process used by rabbitmq server when finish unit test" into services-r10

commit a25bf590d940f02b0ea75e3c2bbb7c3342d5c9d1
Merge: 74288dd 89215eb
Author: Tang Rui <rtang@vmware.com>
Date:   Tue Mar 27 05:57:55 2012 +0000

    Merge "In redis provision, the node need wait for the start of the redis-server process" into services-r10

commit e0d4bd52c8494c36db1d92cbd1e04ee4f831a4e0
Author: Tang Rui <rtang@vmware.com>
Date:   Mon Mar 26 20:17:21 2012 -0700

    Kill epmd process used by rabbitmq server when finish unit test

    Change-Id: If76fc071f32cc9ffc429d9f8fb678e217cffd6dd

commit 89215eb22ded47f656ff7541da3a7209bedbd290
Author: Tang Rui <rtang@vmware.com>
Date:   Mon Mar 26 00:24:31 2012 -0700

    In redis provision, the node need wait for the start of the redis-server process

    Change-Id: I3722efc26846bf180ce6ead3c786bd9a03b2d979

commit 74288ddffb0e60c305871cc117d42f617a4e5d17
Merge: ae48e35 bdcdffb
Author: felixhoo <hhu@vmware.com>
Date:   Mon Mar 26 20:09:48 2012 +0000

    Merge "Remove pid and add quota in worker config" into services-r10

commit d3fb5254e060cdd685599815ba31b07a9bdd5aca
Author: SonicWang <wangs@vmware.com>
Date:   Mon Mar 26 10:37:51 2012 -0700

    remove max_memory parameter in vblob

    Change-Id: I8963a7d88df83a96e1c9beef0360e0e537419405

commit 9abcf88d030d735cea4e4451e91fc7831166d509
Author: felixhoo <hhu@vmware.com>
Date:   Mon Mar 26 01:20:31 2012 -0600

    Add varz into backup manager

    Change-Id: I777e5e141048202de5638a4930f33cbbe120cac7

commit ae48e35ef967b736a6849ab256e7281d7f8d47ef
Author: felixhoo <hhu@vmware.com>
Date:   Sun Mar 25 13:48:43 2012 -0600

    Fix time deviation of mysql backup

    Change-Id: I44b35a35a1adb1c7e0778766894046f3957d206b

commit bdcdffbfc45a261b28750472b3f4285025a82dca
Author: felixhoo <hhu@vmware.com>
Date:   Sat Mar 24 12:58:14 2012 -0600

    Remove pid and add quota in worker config

    Change-Id: Ifdcd6e6e9fcc8df8f6db78775fa024990a757604

commit a3de99ad91ca6f1660050589b5bcc3b0fbe0ec28
Merge: 493fc4c d45578d
Author: Tang Rui <rtang@vmware.com>
Date:   Fri Mar 23 03:53:27 2012 +0000

    Merge "Fix the redis warning: Could not cleanup instance, the reasons: ["ERR max number of clients reached"]" into services-r10

commit 493fc4cec7e73931ab27c883d573221b8d9496c9
Merge: 0e3e341 510817c
Author: Yang Yang <yangy@vmware.com>
Date:   Fri Mar 23 01:55:21 2012 +0000

    Merge "removed unused clover generator for coverage report for ci." into services-r10

commit 0e3e3414b9db10a464de1c70df0321bb5f985966
Merge: 0055e0e 2c5003c
Author: Andrew Liu <aliu@vmware.com>
Date:   Thu Mar 22 10:42:50 2012 +0000

    Merge "correct column name in user query" into services-r10

commit 510817cbb486d491c1853cb3543d667b72c229f7
Author: Yang Yang <yangy@vmware.com>
Date:   Thu Mar 22 13:54:47 2012 +0800

    removed unused clover generator for coverage report for ci.

    Change-Id: Ic1cc87da39406491ca6270533e8910a19970b6f1

commit d45578dcf3596ccfaea9ffda56d88379c878899c
Author: Tang Rui <rtang@vmware.com>
Date:   Wed Mar 21 21:36:13 2012 -0700

    Fix the redis warning: Could not cleanup instance, the reasons: ["ERR max number of clients reached"]

    Change-Id: I2c9988c4337a42ca98409ca6a053985724cf6c5b

commit 0055e0e64e08ca14dea3095512f1ea16402f0b21
Author: Tang Rui <rtang@vmware.com>
Date:   Wed Mar 21 20:35:52 2012 -0700

    Fix the bug that rabbit doesn't delete instance's logs when unprovision

    Change-Id: I13d84574c712b84080a881305b00c65ba9175eea

commit 2c5003c31e75e499687fe30c11bbfa49cd4abccf
Author: Andrew Liu <aliu@vmware.com>
Date:   Wed Mar 21 20:59:43 2012 +0800

    correct column name in user query

    Change-Id: Ib8ecd3f1ed11c5335d3f329b3a0c32cbf92dd019

commit 1d817df48622ef55c1dab4b7389a08a7440ba3a0
Merge: 270634d dd67734
Author: Yang Yang <yangy@vmware.com>
Date:   Wed Mar 21 08:43:48 2012 +0000

    Merge "added coverage report generation feature for services" into services-r10

commit 270634d4ec7b0a11fc4f1acfbd9ed0e2e59e31a5
Merge: f69403b ae50dc5
Author: Tang Rui <rtang@vmware.com>
Date:   Wed Mar 21 03:00:12 2012 +0000

    Merge "Each service node code need check datamapper object before destroy" into services-r10

commit dd677348015bc71cf1d2e90ade2522ef491a696a
Author: Yang Yang <yangy@vmware.com>
Date:   Tue Mar 20 17:46:25 2012 +0800

    added coverage report generation feature for services

    1. reconstruct the feature to create coverage report generation using
      SimpleCov for the following services:
      base, atmos, filesystem, mongodb, mysql, neo4j, postgresql, rabbit,
      redis, serialization_data_server, service_broker, vblob.

    2. finished the unit test for using with the following rake command:
      bundle exec rake spec          # unit test without any report
      bundle exec rake spec:ci       # unit test with report for rcov and ci
      bundle exec rake spec:rcov     # unit test with report for rcov only

    3. added corresponding gem to the vendor/cache/ mainly for simplecov.

    Change-Id: I6a1cf069b38da65b5f5d4f3fc7ee6580ce7b587c

commit ae50dc53c2b585ba21460e6f9de2136af94dcbd9
Author: Tang Rui <rtang@vmware.com>
Date:   Sun Mar 18 22:35:55 2012 -0700

    Each service node code need check datamapper object before destroy

    Change-Id: Id5100305368b8d9525bc54914ebeab150c67dbfe

commit ff2a63227b6d9de3a907cee4a0eb3bdab37a3010
Merge: 68b0d4f ec3334f
Author: Tang Rui <rtang@vmware.com>
Date:   Sun Mar 18 19:59:30 2012 -0700

    Merge branch 'services-r9' into 'services-10'

    Change-Id: I81650bc1a08ac431aeceb97b686df17486f78c4d

commit f69403b04624a23621cea14056cca507c8caa143
Author: Cliff Wang <cliffwang@vmware.com>
Date:   Sat Mar 17 18:01:52 2012 +0800

    Fix max connection test failure on some machines

    Change-Id: I37219c4f02993a03ae4d344b072761558630f3c1

commit 68b0d4f791537badc18a980bcc04ed412c35286b
Author: felixhoo <hhu@vmware.com>
Date:   Thu Mar 15 00:54:53 2012 -0600

    Update varz only when nats is enabled.

    Change-Id: I508a6bb8a795030ac7589857120130f0b5451e8c

commit ce1262b85c50a5899c9654c77f88055617b97871
Author: Yang Yang <yangy@vmware.com>
Date:   Mon Mar 12 13:29:39 2012 +0800

    added the feature to auto generate spec report for ci

    1. added spec report generation feature for ci for:
          atmos, base, filesystem, mongodb, mysql, neo4j,
          postgresql, rabbit, redis, serialization_data_server,
          service_broker, vblob

    2. added a namespace called ci with task spec:
        for the new unit test with reports generated, do:
          bundle exec rake ci:spec
        the reports would sit in spec_report in the xml format, which can be recognized by jenkins.

    Change-Id: Ic2ff8dd863dbb6bfe632929f8e9b556bb27bb53b

commit 5cab0f4043f48b3ecc3da4dce256c7222c8b375a
Merge: d87fd5a 7df1576
Author: Cliff Wang <cliffwang@vmware.com>
Date:   Tue Mar 13 09:06:25 2012 +0000

    Merge "make mongodb unit test pass even without dev_setup env" into services-r10

commit d87fd5ac7d3d6c140cff798e43ff17d994f01894
Merge: f560734 7181377
Author: Yang Yang <yangy@vmware.com>
Date:   Tue Mar 13 07:07:27 2012 +0000

    Merge "fixed a bug in the service_broker unit test" into services-r10

commit 7181377edb4047da968efe9ecca99eea49e4b2da
Author: Yang Yang <yangy@vmware.com>
Date:   Mon Mar 12 20:19:07 2012 +0800

    fixed a bug in the service_broker unit test

    case: when the directory for local_db does not exist, the unit test will return a failure
    fix: added code to check whether the directory for local_db exists or not, create a directory
         if it does not exist.

    Change-Id: Iacc0bdae3c564847e3793f9e3f636889a02e2683

commit 7df15764695820adbd96863b3f0fd5f34c92ddce
Author: Cliff Wang <cliffwang@vmware.com>
Date:   Mon Mar 12 23:39:43 2012 -0600

    make mongodb unit test pass even without dev_setup env

    Change-Id: I4a722cbdbb79883bc4c82613cc7d7ffe936e37ad

commit f56073481b2c16c29c8a9d9183f11c79fb96e5db
Merge: 250def1 5ee7655
Author: figo <figof@mozy.com>
Date:   Mon Mar 12 18:48:03 2012 -0700

    Merge branch 'services-r9' into services-r10

    Change-Id: Ifd3d6f9435204825b635ce9f301c05fadb19ed37

commit 250def1e304ded22e4d3d46f4a1f528e0173ead0
Merge: d63882e cd74fa6
Author: figo <figof@mozy.com>
Date:   Sun Mar 11 23:35:02 2012 -0700

    Merge branch 'master' into services-r10

    Conflicts:
    	atmos/Gemfile.lock
    	base/Gemfile.lock
    	base/lib/base/provisioner.rb
    	base/lib/base/version.rb
    	filesystem/Gemfile.lock
    	mongodb/Gemfile.lock
    	mysql/Gemfile.lock
    	neo4j/Gemfile.lock
    	postgresql/Gemfile.lock
    	redis/Gemfile.lock
    	service_broker/Gemfile.lock

    Change-Id: Iedc2e2ba29f714a581f8b84d44a4f87239113592

commit d63882e7c4604778701df0135e3746a4d24220d2
Author: figo <figof@mozy.com>
Date:   Tue Feb 28 08:16:15 2012 -0800

    Revert "Revert "Merge branch 'services-r8' into services-r9""

    This reverts commit 409cd99e3a85566995fc0bbc541f70e01115b69d.

    Change-Id: Iacd317820455695b924217a55fded5659e289cfb

Change-Id: I9f335be5f0ca124285eebdc145ca9cdcb56ace68
Merge branch 'master' into services-r11

Conflicts:
	atmos/vendor/cache/vcap_services_base-0.1.9.gem
	base/lib/base/job/lock.rb
	base/spec/job_spec.rb
	filesystem/vendor/cache/vcap_services_base-0.1.9.gem
	mongodb/vendor/cache/vcap_services_base-0.1.9.gem
	mysql/vendor/cache/vcap_services_base-0.1.9.gem
	neo4j/spec/neo4j_node_bind_spec.rb
	neo4j/spec/neo4j_node_provision_spec.rb
	neo4j/vendor/cache/vcap_services_base-0.1.9.gem
	postgresql/vendor/cache/vcap_services_base-0.1.9.gem
	rabbit/vendor/cache/vcap_services_base-0.1.9.gem
	redis/vendor/cache/vcap_services_base-0.1.9.gem
	service_broker/vendor/cache/vcap_services_base-0.1.9.gem
	tools/backup/manager/Rakefile
	tools/backup/manager/vendor/cache/vcap_services_base-0.1.9.gem
	vblob/Gemfile
	vblob/Gemfile.lock
	vblob/lib/vblob_service/vblob_node.rb
	vblob/vendor/cache/vcap_services_base-0.1.9.gem

Change-Id: I9b35fb8096e2c7ea4e291edbddcbf81eb06d5279