)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"154cbe91e45e4c70e4f214c2c91fd89035cbad62","unresolved":false,"context_lines":[{"line_number":16,"context_line":"3. OpenStack: update the database to indicate that the instance"},{"line_number":17,"context_line":"   will be running on a new host."},{"line_number":18,"context_line":"4. VC: Add the ESX server to the cluster"},{"line_number":19,"context_line":"5. OpenStack: terminate the nova-compute running the ESX driver."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"In order to perform item #3 above a new command has been added to"},{"line_number":22,"context_line":"the nova-manage utility. This is as follows:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"baada198_1691dbf0","line":19,"updated":"2014-07-04 22:30:37.000000000","message":"unrelated to this patch, but should step 5 come before step 2 - or at least disable this node before that?","commit_id":"67d5ddbc79ddbc7e8dc6a624f3bfe6b10e074eb2"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae08cd2361cca11826297e2ce642bfeecb6a3496","unresolved":false,"context_lines":[{"line_number":25,"context_line":"                           --new_host \u003cthe new host for the ESX instance\u003e"},{"line_number":26,"context_line":"                           --new_node \u003cthe new node for the instance\u003e"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"The above command will update all of the instance so that they can be"},{"line_number":29,"context_line":"run on a VC driver."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"dab895d6_b0f38009","line":28,"updated":"2014-06-30 08:28:18.000000000","message":"typo: instances","commit_id":"67d5ddbc79ddbc7e8dc6a624f3bfe6b10e074eb2"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"76b130ba96b23370289b8133b0b8eb329e313a8e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"running on the ESX driver to the VC driver they will need to"},{"line_number":12,"context_line":"do the following:"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"5. OpenStack: terminate the nova-compute running the ESX driver."},{"line_number":15,"context_line":"2. VC: Create a cluster. The ESX server will be added to this cluster."},{"line_number":16,"context_line":"3. OpenStack: start a new nova-compute with the VC driver."},{"line_number":17,"context_line":"4. OpenStack: update the database to indicate that the instance"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"baa201ad_0434b1dc","line":14,"updated":"2014-10-13 19:04:11.000000000","message":"s/5/1/","commit_id":"93ede29d9545f24956ebc0acc4a31d6ddaf0c2c5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"10a43d13f780460d8465398b44f9a31192123bc2","unresolved":false,"context_lines":[{"line_number":11,"context_line":"running on the ESX driver to the VC driver they will need to"},{"line_number":12,"context_line":"do the following:"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"5. OpenStack: terminate the nova-compute running the ESX driver."},{"line_number":15,"context_line":"2. VC: Create a cluster. The ESX server will be added to this cluster."},{"line_number":16,"context_line":"3. OpenStack: start a new nova-compute with the VC driver."},{"line_number":17,"context_line":"4. OpenStack: update the database to indicate that the instance"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"baa201ad_9076053d","line":14,"in_reply_to":"baa201ad_0434b1dc","updated":"2014-10-14 11:29:18.000000000","message":"Done","commit_id":"93ede29d9545f24956ebc0acc4a31d6ddaf0c2c5"}],"nova/cmd/manage.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"1ed38e666c5eaeb4fcf735e649f418ba0c5d5ac4","unresolved":false,"context_lines":[{"line_number":922,"context_line":"    @args(\u0027--new_host\u0027, metavar\u003d\u0027\u003cnew_host\u003e\u0027,"},{"line_number":923,"context_line":"          help\u003d\u0027New host for the running instance\u0027)"},{"line_number":924,"context_line":"    @args(\u0027--new_node\u0027, metavar\u003d\u0027\u003cnew_node\u003e\u0027,"},{"line_number":925,"context_line":"          help\u003d\u0027New nodet for the running instance\u0027)"},{"line_number":926,"context_line":"    def host_update(self, host\u003dNone, new_host\u003dNone, new_node\u003dNone):"},{"line_number":927,"context_line":"        \"\"\"Update the database entries host from original to new.\"\"\""},{"line_number":928,"context_line":"        if host is None or new_host is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_9c459845","line":925,"updated":"2014-06-24 03:59:54.000000000","message":"s/nodet/node/","commit_id":"03a4ee53f4612cf2b39736a9aea743c2e6e4734b"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"aa3eaf54b8bd2d962dca31ec5d8b8e3bba2647b0","unresolved":false,"context_lines":[{"line_number":922,"context_line":"    @args(\u0027--new_host\u0027, metavar\u003d\u0027\u003cnew_host\u003e\u0027,"},{"line_number":923,"context_line":"          help\u003d\u0027New host for the running instance\u0027)"},{"line_number":924,"context_line":"    @args(\u0027--new_node\u0027, metavar\u003d\u0027\u003cnew_node\u003e\u0027,"},{"line_number":925,"context_line":"          help\u003d\u0027New nodet for the running instance\u0027)"},{"line_number":926,"context_line":"    def host_update(self, host\u003dNone, new_host\u003dNone, new_node\u003dNone):"},{"line_number":927,"context_line":"        \"\"\"Update the database entries host from original to new.\"\"\""},{"line_number":928,"context_line":"        if host is None or new_host is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_406cfed0","line":925,"in_reply_to":"1ae5cdf2_9c459845","updated":"2014-06-24 09:25:21.000000000","message":"Done","commit_id":"03a4ee53f4612cf2b39736a9aea743c2e6e4734b"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"31aeceeddba005bd2e0a5c599e44f3e56bcf68cd","unresolved":false,"context_lines":[{"line_number":931,"context_line":"        instances \u003d db.instance_get_all_by_host(context.get_admin_context(),"},{"line_number":932,"context_line":"                                                host)"},{"line_number":933,"context_line":"        values \u003d {\u0027host\u0027: new_host}"},{"line_number":934,"context_line":"        if new_node is not None:"},{"line_number":935,"context_line":"            values[\u0027node\u0027] \u003d new_node"},{"line_number":936,"context_line":"        for instance in instances:"},{"line_number":937,"context_line":"            db.instance_update(context.get_admin_context(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_832a0b7c","line":934,"updated":"2014-06-27 08:59:26.000000000","message":"the new_node must not be optional because it specifies the VC cluster for the VMware case. It cannot be left intact in the upgrade scenario because it refers to ESX resource pool.","commit_id":"0576db71dc12050ea7506a7dc4f36cdc6c462514"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"d3820f85c2f0ada8399e125a8469f2293c180b6e","unresolved":false,"context_lines":[{"line_number":931,"context_line":"        instances \u003d db.instance_get_all_by_host(context.get_admin_context(),"},{"line_number":932,"context_line":"                                                host)"},{"line_number":933,"context_line":"        values \u003d {\u0027host\u0027: new_host}"},{"line_number":934,"context_line":"        if new_node is not None:"},{"line_number":935,"context_line":"            values[\u0027node\u0027] \u003d new_node"},{"line_number":936,"context_line":"        for instance in instances:"},{"line_number":937,"context_line":"            db.instance_update(context.get_admin_context(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab895d6_0776b53e","line":934,"in_reply_to":"1ae5cdf2_0f01ba06","updated":"2014-06-30 06:16:31.000000000","message":"OK, that makes sense. Could you please change the first line of the commit message to say that it is a generic utility for changing the host of the instances? Looking at the commit message, one can think it is only for VMware. Thanks.","commit_id":"0576db71dc12050ea7506a7dc4f36cdc6c462514"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d4cd3929d54927b3ee1c8d3aebb1d6d2ee9e1b48","unresolved":false,"context_lines":[{"line_number":931,"context_line":"        instances \u003d db.instance_get_all_by_host(context.get_admin_context(),"},{"line_number":932,"context_line":"                                                host)"},{"line_number":933,"context_line":"        values \u003d {\u0027host\u0027: new_host}"},{"line_number":934,"context_line":"        if new_node is not None:"},{"line_number":935,"context_line":"            values[\u0027node\u0027] \u003d new_node"},{"line_number":936,"context_line":"        for instance in instances:"},{"line_number":937,"context_line":"            db.instance_update(context.get_admin_context(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_0f01ba06","line":934,"in_reply_to":"1ae5cdf2_832a0b7c","updated":"2014-06-27 11:36:00.000000000","message":"This method should not be limited to the VMware driver. The purpose here was to enable other drivers to also gain from this. Say, for example, one changes the host value of a libvrt node. This will enable them to patch the database with that","commit_id":"0576db71dc12050ea7506a7dc4f36cdc6c462514"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"26430ba107eac86ac5274d02ac88b02eee645fea","unresolved":false,"context_lines":[{"line_number":931,"context_line":"        instances \u003d db.instance_get_all_by_host(context.get_admin_context(),"},{"line_number":932,"context_line":"                                                host)"},{"line_number":933,"context_line":"        values \u003d {\u0027host\u0027: new_host}"},{"line_number":934,"context_line":"        if new_node is not None:"},{"line_number":935,"context_line":"            values[\u0027node\u0027] \u003d new_node"},{"line_number":936,"context_line":"        for instance in instances:"},{"line_number":937,"context_line":"            db.instance_update(context.get_admin_context(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab895d6_0d48932c","line":934,"in_reply_to":"dab895d6_0776b53e","updated":"2014-06-30 07:56:05.000000000","message":"Done","commit_id":"0576db71dc12050ea7506a7dc4f36cdc6c462514"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"24827b6e8ed3957ee683b399992407518b7d1419","unresolved":false,"context_lines":[{"line_number":920,"context_line":"        db.archive_deleted_rows(admin_context, max_rows)"},{"line_number":921,"context_line":""},{"line_number":922,"context_line":"    @args(\u0027--host\u0027, metavar\u003d\u0027\u003chost\u003e\u0027,"},{"line_number":923,"context_line":"          help\u003d\u0027Current host for running instance\u0027)"},{"line_number":924,"context_line":"    @args(\u0027--new_host\u0027, metavar\u003d\u0027\u003cnew_host\u003e\u0027,"},{"line_number":925,"context_line":"          help\u003d\u0027New host for the running instance\u0027)"},{"line_number":926,"context_line":"    @args(\u0027--new_node\u0027, metavar\u003d\u0027\u003cnew_node\u003e\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_6e8e7629","line":923,"updated":"2014-10-10 10:41:35.000000000","message":"If you are updating the host and node, don\u0027t you need to filter by host and node in the first place?\n\nSure, you don\u0027t need that for your specific use case, but I think it makes more sense as a general utility.","commit_id":"67d5ddbc79ddbc7e8dc6a624f3bfe6b10e074eb2"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"154cbe91e45e4c70e4f214c2c91fd89035cbad62","unresolved":false,"context_lines":[{"line_number":924,"context_line":"    @args(\u0027--new_host\u0027, metavar\u003d\u0027\u003cnew_host\u003e\u0027,"},{"line_number":925,"context_line":"          help\u003d\u0027New host for the running instance\u0027)"},{"line_number":926,"context_line":"    @args(\u0027--new_node\u0027, metavar\u003d\u0027\u003cnew_node\u003e\u0027,"},{"line_number":927,"context_line":"          help\u003d\u0027New node for the running instance\u0027)"},{"line_number":928,"context_line":"    def host_update(self, host\u003dNone, new_host\u003dNone, new_node\u003dNone):"},{"line_number":929,"context_line":"        \"\"\"Update the database entries host from original to new.\"\"\""},{"line_number":930,"context_line":"        if host is None or new_host is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_36a5ff46","line":927,"updated":"2014-07-04 22:30:37.000000000","message":"pedantry: is \"for running instance\" really needed? To me this help line seem to me that these parameters are for changing the host name of a specific instance","commit_id":"67d5ddbc79ddbc7e8dc6a624f3bfe6b10e074eb2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8f3bc8ff6cda0baddb77ae5c2f68d2f529278569","unresolved":false,"context_lines":[{"line_number":924,"context_line":"    @args(\u0027--new_host\u0027, metavar\u003d\u0027\u003cnew_host\u003e\u0027,"},{"line_number":925,"context_line":"          help\u003d\u0027New host for the running instance\u0027)"},{"line_number":926,"context_line":"    @args(\u0027--new_node\u0027, metavar\u003d\u0027\u003cnew_node\u003e\u0027,"},{"line_number":927,"context_line":"          help\u003d\u0027New node for the running instance\u0027)"},{"line_number":928,"context_line":"    def host_update(self, host\u003dNone, new_host\u003dNone, new_node\u003dNone):"},{"line_number":929,"context_line":"        \"\"\"Update the database entries host from original to new.\"\"\""},{"line_number":930,"context_line":"        if host is None or new_host is None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_4ed7f2ed","line":927,"in_reply_to":"baada198_36a5ff46","updated":"2014-10-10 10:42:55.000000000","message":"+1","commit_id":"67d5ddbc79ddbc7e8dc6a624f3bfe6b10e074eb2"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"ae08cd2361cca11826297e2ce642bfeecb6a3496","unresolved":false,"context_lines":[{"line_number":928,"context_line":"    def host_update(self, host\u003dNone, new_host\u003dNone, new_node\u003dNone):"},{"line_number":929,"context_line":"        \"\"\"Update the database entries host from original to new.\"\"\""},{"line_number":930,"context_line":"        if host is None or new_host is None:"},{"line_number":931,"context_line":"            print(_(\"host and new_host are required!\"))"},{"line_number":932,"context_line":"            return(1)"},{"line_number":933,"context_line":"        instances \u003d db.instance_get_all_by_host(context.get_admin_context(),"},{"line_number":934,"context_line":"                                                host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dab895d6_1037cce4","line":931,"updated":"2014-06-30 08:28:18.000000000","message":"it\u0027s weird why these commands don\u0027t print on stderr in cases like this","commit_id":"67d5ddbc79ddbc7e8dc6a624f3bfe6b10e074eb2"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"154cbe91e45e4c70e4f214c2c91fd89035cbad62","unresolved":false,"context_lines":[{"line_number":928,"context_line":"    def host_update(self, host\u003dNone, new_host\u003dNone, new_node\u003dNone):"},{"line_number":929,"context_line":"        \"\"\"Update the database entries host from original to new.\"\"\""},{"line_number":930,"context_line":"        if host is None or new_host is None:"},{"line_number":931,"context_line":"            print(_(\"host and new_host are required!\"))"},{"line_number":932,"context_line":"            return(1)"},{"line_number":933,"context_line":"        instances \u003d db.instance_get_all_by_host(context.get_admin_context(),"},{"line_number":934,"context_line":"                                                host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_f6ae272d","line":931,"in_reply_to":"dab895d6_1037cce4","updated":"2014-07-04 22:30:37.000000000","message":"might be... but that\u0027s how this utility works","commit_id":"67d5ddbc79ddbc7e8dc6a624f3bfe6b10e074eb2"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"e195bed71033e86b6781d7c1ac7f471babf8c479","unresolved":false,"context_lines":[{"line_number":930,"context_line":"        if host is None or new_host is None:"},{"line_number":931,"context_line":"            print(_(\"host and new_host are required!\"))"},{"line_number":932,"context_line":"            return(1)"},{"line_number":933,"context_line":"        instances \u003d db.instance_get_all_by_host(context.get_admin_context(),"},{"line_number":934,"context_line":"                                                host)"},{"line_number":935,"context_line":"        values \u003d {\u0027host\u0027: new_host}"},{"line_number":936,"context_line":"        if new_node is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1abeadc6_bbb1b990","line":933,"updated":"2014-08-30 08:48:10.000000000","message":"pedantry: we\u0027d probably benefit from adding a specific DB API method for this operation, so that we could update instances *efficiently* (with a single DB query rather than doing N of them) and *transactionally* (if update of a single instance fails, none of them will be updated)","commit_id":"67d5ddbc79ddbc7e8dc6a624f3bfe6b10e074eb2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8f3bc8ff6cda0baddb77ae5c2f68d2f529278569","unresolved":false,"context_lines":[{"line_number":930,"context_line":"        if host is None or new_host is None:"},{"line_number":931,"context_line":"            print(_(\"host and new_host are required!\"))"},{"line_number":932,"context_line":"            return(1)"},{"line_number":933,"context_line":"        instances \u003d db.instance_get_all_by_host(context.get_admin_context(),"},{"line_number":934,"context_line":"                                                host)"},{"line_number":935,"context_line":"        values \u003d {\u0027host\u0027: new_host}"},{"line_number":936,"context_line":"        if new_node is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baa201ad_2edaae17","line":933,"in_reply_to":"1abeadc6_bbb1b990","updated":"2014-10-10 10:42:55.000000000","message":"yeah, I am OK with this, given the use case I guess. But certainly a single transaction would be better.","commit_id":"67d5ddbc79ddbc7e8dc6a624f3bfe6b10e074eb2"},{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"76b130ba96b23370289b8133b0b8eb329e313a8e","unresolved":false,"context_lines":[{"line_number":937,"context_line":"        for instance in instances:"},{"line_number":938,"context_line":"            db.instance_update(context.get_admin_context(),"},{"line_number":939,"context_line":"                               instance[\u0027uuid\u0027],"},{"line_number":940,"context_line":"                               values)"},{"line_number":941,"context_line":"        print(_(\"All instances for host %s have been updated.\"), host)"},{"line_number":942,"context_line":""},{"line_number":943,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_a4e045fb","line":940,"updated":"2014-10-13 19:04:11.000000000","message":"Should you put this in a try/except, since db.instance_update could throw an exception?","commit_id":"93ede29d9545f24956ebc0acc4a31d6ddaf0c2c5"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"10a43d13f780460d8465398b44f9a31192123bc2","unresolved":false,"context_lines":[{"line_number":937,"context_line":"        for instance in instances:"},{"line_number":938,"context_line":"            db.instance_update(context.get_admin_context(),"},{"line_number":939,"context_line":"                               instance[\u0027uuid\u0027],"},{"line_number":940,"context_line":"                               values)"},{"line_number":941,"context_line":"        print(_(\"All instances for host %s have been updated.\"), host)"},{"line_number":942,"context_line":""},{"line_number":943,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baa201ad_1083f504","line":940,"in_reply_to":"baa201ad_a4e045fb","updated":"2014-10-14 11:29:18.000000000","message":"Done","commit_id":"93ede29d9545f24956ebc0acc4a31d6ddaf0c2c5"}],"nova/tests/test_nova_manage.py":[{"author":{"_account_id":8247,"name":"Thang Pham","email":"thang.g.pham@gmail.com","username":"thang.pham"},"change_message_id":"fe8c3a0f72e6301b103708d0a4544c7d4d810572","unresolved":false,"context_lines":[{"line_number":348,"context_line":"    def test_host_update_no_instances(self):"},{"line_number":349,"context_line":"        self.assertIsNone(self.commands.host_update(\u0027host\u0027, \u0027new_host\u0027))"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"    def test_host_update(self):"},{"line_number":352,"context_line":"        args \u003d {\u0027reservation_id\u0027: \u0027a\u0027, \u0027image_ref\u0027: 1, \u0027host\u0027: \u0027host1\u0027,"},{"line_number":353,"context_line":"                \u0027node\u0027: \u0027node1\u0027, \u0027project_id\u0027: self.project_id,"},{"line_number":354,"context_line":"                \u0027vm_state\u0027: \u0027fake\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_00c8eba6","line":351,"updated":"2014-10-15 04:53:28.000000000","message":"I believe you are missing a test case for when db.instance_update throws an exception.","commit_id":"c2e7ea67d0486019cd8a5c02f6b632089b4a67b5"}]}
