)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"28e071005f78812c2d41b63dec63e4284c8a7868","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Zhenguo Niu \u003cniuzhenguo@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-07-21 23:03:54 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Not count available resources of deployed ironic node"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Changing node\u0027s properties in Ironic after node is deployed will"},{"line_number":10,"context_line":"count as available resources in Nova, as nova\u0027s resource_tracker"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a50d1a3_afa5da47","line":7,"updated":"2015-07-26 04:48:04.000000000","message":"please add the prefix iron here (this may be an overkill as ironic is in the header...)","commit_id":"d0139ceb3057467138ed41fb41c1cae476a0ec17"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2779a5ebc9ba48f4ee8f45566b4681e96c25d5ad","unresolved":false,"context_lines":[{"line_number":10,"context_line":"count as available resources in Nova, as nova\u0027s resource_tracker"},{"line_number":11,"context_line":"will override the *_used keys we set in the driver."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch changes the caculation of available resources based on"},{"line_number":14,"context_line":"the instance flavor instead of node to avoid the issue."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I1a6e4501122c4781e103fd83a146e0914c7671c9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da20952f_2541073a","line":13,"updated":"2015-09-02 13:41:54.000000000","message":"s/caculation/calculation/","commit_id":"b99fb0a51c658301188bbc729d1437a9c8b75d00"}],"nova/tests/unit/virt/ironic/test_driver.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"80e40d50a888ab7673e5ca2f1a676f4e63d46ddb","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        instance_info \u003d _get_instance_info()"},{"line_number":252,"context_line":"        node \u003d ironic_utils.get_test_node(uuid\u003dnode_uuid,"},{"line_number":253,"context_line":"                                          instance_uuid\u003dself.instance_uuid,"},{"line_number":254,"context_line":"                                          instance_info \u003d instance_info,"},{"line_number":255,"context_line":"                                          properties\u003dprops)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        result \u003d self.driver._node_resource(node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_efbf62fa","line":254,"updated":"2015-07-26 01:50:28.000000000","message":"Nit: s/ \u003d /\u003d/ (remove the spaces)\n\nSurprised pep8 doesn\u0027t catch that...","commit_id":"d0139ceb3057467138ed41fb41c1cae476a0ec17"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"6d9856c2eb37198479412f152d388116cec23453","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        instance_info \u003d {}"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        for prop in (\u0027vcpus\u0027, \u0027memory_mb\u0027, \u0027root_gb\u0027, \u0027swap_mb\u0027,"},{"line_number":264,"context_line":"                \u0027ephemeral_gb\u0027):"},{"line_number":265,"context_line":"            try:"},{"line_number":266,"context_line":"                instance_info[prop] \u003d int(node.instance_info.get(prop, 0))"},{"line_number":267,"context_line":"            except (TypeError, ValueError):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a50d1a3_ed1671a6","line":264,"updated":"2015-07-21 13:57:26.000000000","message":"alignment here is a little dodgy","commit_id":"5c835fd1b47f787f109f9aafb826617fa7a605be"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"28e071005f78812c2d41b63dec63e4284c8a7868","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        instance_info \u003d {}"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        for prop in (\u0027vcpus\u0027, \u0027memory_mb\u0027, \u0027root_gb\u0027, \u0027swap_mb\u0027,"},{"line_number":264,"context_line":"            \u0027ephemeral_gb\u0027):"},{"line_number":265,"context_line":"            try:"},{"line_number":266,"context_line":"                instance_info[prop] \u003d int(node.instance_info.get(prop, 0))"},{"line_number":267,"context_line":"            except (TypeError, ValueError):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_6f66f22a","line":264,"updated":"2015-07-26 04:48:04.000000000","message":"indentation here is a little odd","commit_id":"d0139ceb3057467138ed41fb41c1cae476a0ec17"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"28e071005f78812c2d41b63dec63e4284c8a7868","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            vcpus_used \u003d vcpus \u003d instance_info[\u0027vcpus\u0027]"},{"line_number":325,"context_line":"            memory_mb_used \u003d memory_mb \u003d instance_info[\u0027memory_mb\u0027]"},{"line_number":326,"context_line":"            local_gb_used \u003d local_gb \u003d (instance_info[\u0027root_gb\u0027] +"},{"line_number":327,"context_line":"                instance_info[\u0027swap_mb\u0027] + instance_info[\u0027ephemeral_gb\u0027])"},{"line_number":328,"context_line":"        elif self._node_resources_unavailable(node):"},{"line_number":329,"context_line":"            # The node\u0027s current state is such that it should not present any"},{"line_number":330,"context_line":"            # of its resources to Nova"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_0f6dee03","line":327,"updated":"2015-07-26 04:48:04.000000000","message":"what is there are block devices?","commit_id":"d0139ceb3057467138ed41fb41c1cae476a0ec17"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cb4867defe8b8f71804dc0d37a76ea65dcf72cce","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            vcpus_used \u003d vcpus \u003d instance_info[\u0027vcpus\u0027]"},{"line_number":325,"context_line":"            memory_mb_used \u003d memory_mb \u003d instance_info[\u0027memory_mb\u0027]"},{"line_number":326,"context_line":"            local_gb_used \u003d local_gb \u003d (instance_info[\u0027root_gb\u0027] +"},{"line_number":327,"context_line":"                instance_info[\u0027swap_mb\u0027] + instance_info[\u0027ephemeral_gb\u0027])"},{"line_number":328,"context_line":"        elif self._node_resources_unavailable(node):"},{"line_number":329,"context_line":"            # The node\u0027s current state is such that it should not present any"},{"line_number":330,"context_line":"            # of its resources to Nova"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_2a3bd539","line":327,"updated":"2015-07-27 13:55:46.000000000","message":"This is not very accurate, local_gb represents the full size of the disk which is not necessarily the size of root + swap + ephemeral partitions (Ironic will also create a configdrive partition if it\u0027s enabled for example)\n\nI think we should save local_gb to instance_info as well and use it here.","commit_id":"ac079b34d9d668de509b719afd2e8962479feb71"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"e3908755dabc6f43e15ad38f2ebd813736fab570","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            vcpus_used \u003d vcpus \u003d instance_info[\u0027vcpus\u0027]"},{"line_number":325,"context_line":"            memory_mb_used \u003d memory_mb \u003d instance_info[\u0027memory_mb\u0027]"},{"line_number":326,"context_line":"            local_gb_used \u003d local_gb \u003d (instance_info[\u0027root_gb\u0027] +"},{"line_number":327,"context_line":"                instance_info[\u0027swap_mb\u0027] + instance_info[\u0027ephemeral_gb\u0027])"},{"line_number":328,"context_line":"        elif self._node_resources_unavailable(node):"},{"line_number":329,"context_line":"            # The node\u0027s current state is such that it should not present any"},{"line_number":330,"context_line":"            # of its resources to Nova"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_cbd3ef02","line":327,"in_reply_to":"3a50d1a3_2a3bd539","updated":"2015-07-29 09:34:16.000000000","message":"Done","commit_id":"ac079b34d9d668de509b719afd2e8962479feb71"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6033f5311c6741ed4f3eac34ca0fef7f828514f4","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                instance_info[prop] \u003d int(node.instance_info.get(prop, 0))"},{"line_number":266,"context_line":"            except (TypeError, ValueError):"},{"line_number":267,"context_line":"                LOG.warning(_LW(\u0027Node %(uuid)s has a malformed \"%(prop)s\". \u0027"},{"line_number":268,"context_line":"                                \u0027It should be an integer.\u0027),"},{"line_number":269,"context_line":"                            {\u0027uuid\u0027: node.uuid, \u0027prop\u0027: prop})"},{"line_number":270,"context_line":"                instance_info[prop] \u003d 0"},{"line_number":271,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_1d268c68","line":268,"updated":"2015-08-24 16:08:40.000000000","message":"Might be useful to mention the actual value, eg s/integer./integer but its value is \"%(value)s\"./\n\nOh, it looks to me like this code was copy/pasted from _parse_node_properties(). Don\u0027t know if it is worth splitting out into a smaller helper method or not. Maybe that is outside the scope of this patch, dunno. But I still think it is worth updating the log string :)","commit_id":"33ec527f3cb08696e527d523fe800b0750803804"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"57d1a6ce8a8551206637ce52b80781a5926730e2","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                instance_info[prop] \u003d int(node.instance_info.get(prop, 0))"},{"line_number":266,"context_line":"            except (TypeError, ValueError):"},{"line_number":267,"context_line":"                LOG.warning(_LW(\u0027Node %(uuid)s has a malformed \"%(prop)s\". \u0027"},{"line_number":268,"context_line":"                                \u0027It should be an integer.\u0027),"},{"line_number":269,"context_line":"                            {\u0027uuid\u0027: node.uuid, \u0027prop\u0027: prop})"},{"line_number":270,"context_line":"                instance_info[prop] \u003d 0"},{"line_number":271,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_f38bae1c","line":268,"in_reply_to":"fa1b9901_1d268c68","updated":"2015-08-25 04:19:35.000000000","message":"thanks for the comment ruby. we already mentioned the actual value by \u0027has a malformed \"%(prop)s\"\u0027.","commit_id":"33ec527f3cb08696e527d523fe800b0750803804"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"fa3bd4fb4055ed2f727660229c17c1dabba4691e","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                instance_info[prop] \u003d int(node.instance_info.get(prop, 0))"},{"line_number":266,"context_line":"            except (TypeError, ValueError):"},{"line_number":267,"context_line":"                LOG.warning(_LW(\u0027Node %(uuid)s has a malformed \"%(prop)s\". \u0027"},{"line_number":268,"context_line":"                                \u0027It should be an integer.\u0027),"},{"line_number":269,"context_line":"                            {\u0027uuid\u0027: node.uuid, \u0027prop\u0027: prop})"},{"line_number":270,"context_line":"                instance_info[prop] \u003d 0"},{"line_number":271,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_13dc2211","line":268,"in_reply_to":"fa1b9901_f38bae1c","updated":"2015-08-25 04:21:18.000000000","message":"oh sorry, seems is only the porp name, not memtioned the actual value, will update soon.","commit_id":"33ec527f3cb08696e527d523fe800b0750803804"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"6033f5311c6741ed4f3eac34ca0fef7f828514f4","unresolved":false,"context_lines":[{"line_number":322,"context_line":""},{"line_number":323,"context_line":"            vcpus_used \u003d vcpus \u003d instance_info[\u0027vcpus\u0027]"},{"line_number":324,"context_line":"            memory_mb_used \u003d memory_mb \u003d instance_info[\u0027memory_mb\u0027]"},{"line_number":325,"context_line":"            local_gb_used \u003d local_gb \u003d instance_info[\u0027local_gb\u0027]"},{"line_number":326,"context_line":"        elif self._node_resources_unavailable(node):"},{"line_number":327,"context_line":"            # The node\u0027s current state is such that it should not present any"},{"line_number":328,"context_line":"            # of its resources to Nova"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_bd1be0c9","line":325,"updated":"2015-08-24 16:08:40.000000000","message":"If I were to look at this code, without having seen the bug, I\u0027d be scratching my head with \u0027huh, why are we using the values from instance_info instead of properties.\u0027 I would like to see a comment that explains this.","commit_id":"33ec527f3cb08696e527d523fe800b0750803804"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9fbf28549f1aab4965eef538f1e45335cc30940e","unresolved":false,"context_lines":[{"line_number":322,"context_line":""},{"line_number":323,"context_line":"            vcpus_used \u003d vcpus \u003d instance_info[\u0027vcpus\u0027]"},{"line_number":324,"context_line":"            memory_mb_used \u003d memory_mb \u003d instance_info[\u0027memory_mb\u0027]"},{"line_number":325,"context_line":"            local_gb_used \u003d local_gb \u003d instance_info[\u0027local_gb\u0027]"},{"line_number":326,"context_line":"        elif self._node_resources_unavailable(node):"},{"line_number":327,"context_line":"            # The node\u0027s current state is such that it should not present any"},{"line_number":328,"context_line":"            # of its resources to Nova"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_1358bbf9","line":325,"in_reply_to":"fa1b9901_bd1be0c9","updated":"2015-08-24 16:09:17.000000000","message":"Unless it is obvious to everyone else? (Maybe it is just me.)","commit_id":"33ec527f3cb08696e527d523fe800b0750803804"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2779a5ebc9ba48f4ee8f45566b4681e96c25d5ad","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        properties \u003d self._parse_node_properties(node)"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        vcpus \u003d properties[\u0027cpus\u0027]"},{"line_number":281,"context_line":"        memory_mb \u003d properties[\u0027memory_mb\u0027]"},{"line_number":282,"context_line":"        local_gb \u003d properties[\u0027local_gb\u0027]"},{"line_number":283,"context_line":"        raw_cpu_arch \u003d properties[\u0027raw_cpu_arch\u0027]"},{"line_number":284,"context_line":"        cpu_arch \u003d properties[\u0027cpu_arch\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da20952f_25d107fc","line":281,"updated":"2015-09-02 13:41:54.000000000","message":"OK, so here, the ironic virt driver is calculating the resource amounts from the properties dict on the node. After this patch goes through, the only way that the properties notion of resources will be used is if the node is not being used and is not unavailable.\n\nWhat other states can a node be in that we would want to query the properties collection to get resource information?\n\nIn other words, why don\u0027t we just set vcpus/memory_mb/local_gb all to 0, like we do for vcpus_used/memory_mb_used/local_gb_used, and get rid of lines 331-334?","commit_id":"b99fb0a51c658301188bbc729d1437a9c8b75d00"}],"nova/virt/ironic/patcher.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"cb4867defe8b8f71804dc0d37a76ea65dcf72cce","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        patch.append({\u0027path\u0027: \u0027/instance_info/vcpus\u0027, \u0027op\u0027: \u0027add\u0027,"},{"line_number":66,"context_line":"                      \u0027value\u0027: str(instance.vcpus)})"},{"line_number":67,"context_line":"        patch.append({\u0027path\u0027: \u0027/instance_info/memory_mb\u0027, \u0027op\u0027: \u0027add\u0027,"},{"line_number":68,"context_line":"                      \u0027value\u0027: str(instance.memory_mb)})"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if instance.ephemeral_gb:"},{"line_number":71,"context_line":"            patch.append({\u0027path\u0027: \u0027/instance_info/ephemeral_gb\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_ea72cd10","line":68,"updated":"2015-07-27 13:55:46.000000000","message":"patch.append({\u0027path\u0027: \u0027/instance_info/local_gb\u0027, \u0027op\u0027: \u0027add\u0027, \u0027value\u0027: str(self.node.properties.get(\u0027local_gb\u0027, 0)))","commit_id":"ac079b34d9d668de509b719afd2e8962479feb71"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"e3908755dabc6f43e15ad38f2ebd813736fab570","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        patch.append({\u0027path\u0027: \u0027/instance_info/vcpus\u0027, \u0027op\u0027: \u0027add\u0027,"},{"line_number":66,"context_line":"                      \u0027value\u0027: str(instance.vcpus)})"},{"line_number":67,"context_line":"        patch.append({\u0027path\u0027: \u0027/instance_info/memory_mb\u0027, \u0027op\u0027: \u0027add\u0027,"},{"line_number":68,"context_line":"                      \u0027value\u0027: str(instance.memory_mb)})"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        if instance.ephemeral_gb:"},{"line_number":71,"context_line":"            patch.append({\u0027path\u0027: \u0027/instance_info/ephemeral_gb\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_7dbcdedb","line":68,"in_reply_to":"3a50d1a3_ea72cd10","updated":"2015-07-29 09:34:16.000000000","message":"Done","commit_id":"ac079b34d9d668de509b719afd2e8962479feb71"}]}
