)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"15b62989c6578d2ef31c62206754cc2034a9f419","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the boot interface when that merges in L."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Adds checks for cleaning steps in the heartbeat handler."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Adds parameters to the dhcp functions to pass in VIFs instead"},{"line_number":17,"context_line":"of relying on the cached ones in the Ironic port objects. As"},{"line_number":18,"context_line":"cleaning can start before Nova can unplug those ports, we"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9a80dd14_51b3c8e8","line":15,"updated":"2015-03-18 11:25:26.000000000","message":"nit: maybe split the patch at this point (i.e. move changes to _do_next_clean_step and dhcp in a separate patch)?","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":12,"context_line":"the boot interface when that merges in L."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Adds checks for cleaning steps in the heartbeat handler."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Adds parameters to the dhcp functions to pass in VIFs instead"},{"line_number":17,"context_line":"of relying on the cached ones in the Ironic port objects. As"},{"line_number":18,"context_line":"cleaning can start before Nova can unplug those ports, we"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9a80dd14_4c831da9","line":15,"in_reply_to":"9a80dd14_51b3c8e8","updated":"2015-03-18 22:52:35.000000000","message":"Agreed. https://review.openstack.org/#/c/165528/","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"}],"ironic/common/exception.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dfa331bc8e3f14008aa31f4425c3158ffb03decd","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"class NodeCleaningFailure(IronicException):"},{"line_number":191,"context_line":"    message \u003d _(\"Failed to clean node %(node)s: %(reason)s\")"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"class ImageUnacceptable(IronicException):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_56cc5e35","line":191,"updated":"2015-03-19 13:34:14.000000000","message":"https://review.openstack.org/#/c/157715/ is approved which already introduces this exception...","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"3306c1903fb781a4041b54d3cce1edb3b051982f","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"class NodeCleaningFailure(IronicException):"},{"line_number":191,"context_line":"    message \u003d _(\"Failed to clean node %(node)s: %(reason)s\")"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"class ImageUnacceptable(IronicException):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_bca2d997","line":191,"in_reply_to":"9a80dd14_56cc5e35","updated":"2015-03-19 13:53:24.000000000","message":"yes good catch Dmitry.","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"}],"ironic/conductor/manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"15b62989c6578d2ef31c62206754cc2034a9f419","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                task.context,"},{"line_number":853,"context_line":"                task.node.uuid,"},{"line_number":854,"context_line":"                task.node.driver_internal_info.get(\u0027clean_steps\u0027, []),"},{"line_number":855,"context_line":"                task.node.clean_step)"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"    def _do_node_clean(self, task):"},{"line_number":858,"context_line":"        \"\"\"Internal RPC method to perform automated cleaning of a node.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_51290836","line":855,"updated":"2015-03-18 11:25:26.000000000","message":"IIRC this function should accept task and use task.spawn_after to ensure a lock","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":852,"context_line":"                task.context,"},{"line_number":853,"context_line":"                task.node.uuid,"},{"line_number":854,"context_line":"                task.node.driver_internal_info.get(\u0027clean_steps\u0027, []),"},{"line_number":855,"context_line":"                task.node.clean_step)"},{"line_number":856,"context_line":""},{"line_number":857,"context_line":"    def _do_node_clean(self, task):"},{"line_number":858,"context_line":"        \"\"\"Internal RPC method to perform automated cleaning of a node.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_316722ec","line":855,"in_reply_to":"9a80dd14_51290836","updated":"2015-03-18 22:52:35.000000000","message":"Ahh that\u0027s what I wanted. Thanks.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"15b62989c6578d2ef31c62206754cc2034a9f419","unresolved":false,"context_lines":[{"line_number":903,"context_line":"            task.context,"},{"line_number":904,"context_line":"            task.node.uuid,"},{"line_number":905,"context_line":"            task.node.driver_internal_info.get(\u0027clean_steps\u0027, []),"},{"line_number":906,"context_line":"            task.node.clean_step)"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"    def _do_next_clean_step(self, context, node_id, steps, last_step):"},{"line_number":909,"context_line":"        \"\"\"Start executing cleaning/zapping steps from the last step (if any)."}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_717b6c29","line":906,"updated":"2015-03-18 11:25:26.000000000","message":"ditto","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":903,"context_line":"            task.context,"},{"line_number":904,"context_line":"            task.node.uuid,"},{"line_number":905,"context_line":"            task.node.driver_internal_info.get(\u0027clean_steps\u0027, []),"},{"line_number":906,"context_line":"            task.node.clean_step)"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"    def _do_next_clean_step(self, context, node_id, steps, last_step):"},{"line_number":909,"context_line":"        \"\"\"Start executing cleaning/zapping steps from the last step (if any)."}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_5162d6d9","line":906,"in_reply_to":"9a80dd14_717b6c29","updated":"2015-03-18 22:52:35.000000000","message":"Done","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":912,"context_line":"        :param node_id: the id or uuid of a node."},{"line_number":913,"context_line":"        :param steps: The complete list of steps that need to be executed"},{"line_number":914,"context_line":"            on the node"},{"line_number":915,"context_line":"        :param last_step: The last step that was executed. {} will start"},{"line_number":916,"context_line":"            from the beginning"},{"line_number":917,"context_line":"        \"\"\""},{"line_number":918,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_19eb3cdd","line":915,"updated":"2015-03-18 10:50:52.000000000","message":"Now this method can raise NodeNotFound, NodeLocked error.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":912,"context_line":"        :param node_id: the id or uuid of a node."},{"line_number":913,"context_line":"        :param steps: The complete list of steps that need to be executed"},{"line_number":914,"context_line":"            on the node"},{"line_number":915,"context_line":"        :param last_step: The last step that was executed. {} will start"},{"line_number":916,"context_line":"            from the beginning"},{"line_number":917,"context_line":"        \"\"\""},{"line_number":918,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_31956288","line":915,"in_reply_to":"9a80dd14_19eb3cdd","updated":"2015-03-18 22:52:35.000000000","message":"I\u0027m dropping the acquire here.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":915,"context_line":"        :param last_step: The last step that was executed. {} will start"},{"line_number":916,"context_line":"            from the beginning"},{"line_number":917,"context_line":"        \"\"\""},{"line_number":918,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":919,"context_line":"            node \u003d task.node"},{"line_number":920,"context_line":"            # Trim already executed steps"},{"line_number":921,"context_line":"            if last_step:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_f98e6878","line":918,"updated":"2015-03-18 10:50:52.000000000","message":"This is different from our conventional (usual) way of passing the task to the spawned task vs (sending the context and node_id to the spawned task).  Why are we doing it this way ? I am afraid of two things in doing spawn_after and letting _do_next_clean_step create it\u0027s own task\n\n* The parent method _do_node_clean() and continue_node_clean() doesn\u0027t finish quick enough and release the lock on the node before _do_next_clean_step tries to acquire the lock - thereby probably causing a NodeLocked error - just because parent hasn\u0027t finished.\n\n* Someone else coming an acquiring the lock inbetween the parent ( _do_node_clean() or continue_node_clean() finished and _do_next_clean_step acquired the lock.  In that case we wouldn\u0027t be able to continue cleaning at all.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":915,"context_line":"        :param last_step: The last step that was executed. {} will start"},{"line_number":916,"context_line":"            from the beginning"},{"line_number":917,"context_line":"        \"\"\""},{"line_number":918,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":919,"context_line":"            node \u003d task.node"},{"line_number":920,"context_line":"            # Trim already executed steps"},{"line_number":921,"context_line":"            if last_step:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_91b36e4c","line":918,"in_reply_to":"9a80dd14_f98e6878","updated":"2015-03-18 22:52:35.000000000","message":"Dmitry\u0027s comments should fix this.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"}],"ironic/dhcp/neutron.py":[{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"8bf429d25277a8ed3507d6bc9da3e2e15a03f256","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                    \u0027Running neutron in noauth mode (related to but not \u0027"},{"line_number":50,"context_line":"                    \u0027affected by this setting) is insecure and should only be \u0027"},{"line_number":51,"context_line":"                    \u0027used for testing.\u0027),"},{"line_number":52,"context_line":"    cfg.StrOpt(\u0027cleaning_network_uuid\u0027,"},{"line_number":53,"context_line":"               help\u003d\u0027UUID of the network to create Neutron ports on when\u0027"},{"line_number":54,"context_line":"                    \u0027booting to a ramdisk for cleaning/zapping using Neutron \u0027"},{"line_number":55,"context_line":"                    \u0027DHCP\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_9f514c32","line":52,"updated":"2015-03-16 03:12:21.000000000","message":"conf file to be updated?","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fe78b1246770e2f48b1e57484b01dd1bd4695e34","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                    \u0027Running neutron in noauth mode (related to but not \u0027"},{"line_number":50,"context_line":"                    \u0027affected by this setting) is insecure and should only be \u0027"},{"line_number":51,"context_line":"                    \u0027used for testing.\u0027),"},{"line_number":52,"context_line":"    cfg.StrOpt(\u0027cleaning_network_uuid\u0027,"},{"line_number":53,"context_line":"               help\u003d\u0027UUID of the network to create Neutron ports on when\u0027"},{"line_number":54,"context_line":"                    \u0027booting to a ramdisk for cleaning/zapping using Neutron \u0027"},{"line_number":55,"context_line":"                    \u0027DHCP\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_8c92cc49","line":52,"in_reply_to":"9a80dd14_9f514c32","updated":"2015-03-17 16:21:43.000000000","message":"Done","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"8bf429d25277a8ed3507d6bc9da3e2e15a03f256","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        return ip_addresses"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def create_cleaning_ports(self, task):"},{"line_number":284,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        body \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_df366402","line":283,"updated":"2015-03-16 03:12:21.000000000","message":"doc string?","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fe78b1246770e2f48b1e57484b01dd1bd4695e34","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        return ip_addresses"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def create_cleaning_ports(self, task):"},{"line_number":284,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        body \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_fcc4e342","line":283,"in_reply_to":"9a80dd14_df366402","updated":"2015-03-17 16:21:43.000000000","message":"Done","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"8bf429d25277a8ed3507d6bc9da3e2e15a03f256","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            LOG.exception(msg)"},{"line_number":302,"context_line":"            raise exception.NodeCleaningFailure(msg)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def delete_cleaning_ports(self, task):"},{"line_number":305,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        params \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_ff3968f2","line":304,"updated":"2015-03-16 03:12:21.000000000","message":"ditto","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fe78b1246770e2f48b1e57484b01dd1bd4695e34","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            LOG.exception(msg)"},{"line_number":302,"context_line":"            raise exception.NodeCleaningFailure(msg)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def delete_cleaning_ports(self, task):"},{"line_number":305,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        params \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_1cc29734","line":304,"in_reply_to":"9a80dd14_ff3968f2","updated":"2015-03-17 16:21:43.000000000","message":"Done","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5729ed29cec47096b04ecdec9f1ee46c80a055a9","unresolved":false,"context_lines":[{"line_number":290,"context_line":"    def create_cleaning_ports(self, task):"},{"line_number":291,"context_line":"        \"\"\"Create neutron ports for each port on task.node to boot the ramdisk."},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance."},{"line_number":294,"context_line":"        \"\"\""},{"line_number":295,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":296,"context_line":"        body \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_09fce53e","line":293,"updated":"2015-03-17 21:06:58.000000000","message":"returns ?","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"d7716fb49a167fbb2c2b96fa82d4037a2ac34db7","unresolved":false,"context_lines":[{"line_number":290,"context_line":"    def create_cleaning_ports(self, task):"},{"line_number":291,"context_line":"        \"\"\"Create neutron ports for each port on task.node to boot the ramdisk."},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance."},{"line_number":294,"context_line":"        \"\"\""},{"line_number":295,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":296,"context_line":"        body \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_44015a03","line":293,"in_reply_to":"9a80dd14_09fce53e","updated":"2015-03-18 06:27:58.000000000","message":"Done","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5729ed29cec47096b04ecdec9f1ee46c80a055a9","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance."},{"line_number":294,"context_line":"        \"\"\""},{"line_number":295,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":296,"context_line":"        body \u003d {"},{"line_number":297,"context_line":"            \u0027port\u0027: {"},{"line_number":298,"context_line":"                \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_49f6dd5e","line":295,"updated":"2015-03-17 21:06:58.000000000","message":"_build_client() takes an optional authentication token. Other methods (eg update_port_address()) have that token passes as a parameter. I suspect we should do a similar thing here.","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"d7716fb49a167fbb2c2b96fa82d4037a2ac34db7","unresolved":false,"context_lines":[{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance."},{"line_number":294,"context_line":"        \"\"\""},{"line_number":295,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":296,"context_line":"        body \u003d {"},{"line_number":297,"context_line":"            \u0027port\u0027: {"},{"line_number":298,"context_line":"                \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_24fe2606","line":295,"in_reply_to":"9a80dd14_49f6dd5e","updated":"2015-03-18 06:27:58.000000000","message":"Done","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5729ed29cec47096b04ecdec9f1ee46c80a055a9","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":296,"context_line":"        body \u003d {"},{"line_number":297,"context_line":"            \u0027port\u0027: {"},{"line_number":298,"context_line":"                \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid,"},{"line_number":299,"context_line":"                \u0027admin_state_up\u0027: True,"},{"line_number":300,"context_line":"            }"},{"line_number":301,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_699481e8","line":298,"updated":"2015-03-17 21:06:58.000000000","message":"this value could be None. Is that OK?","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5729ed29cec47096b04ecdec9f1ee46c80a055a9","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            try:"},{"line_number":305,"context_line":"                port \u003d neutron_client.create_port(body)"},{"line_number":306,"context_line":"                if not port.get(\u0027port\u0027) or not port[\u0027port\u0027].get(\u0027id\u0027):"},{"line_number":307,"context_line":"                    msg \u003d _(\u0027Failed to create cleaning ports\u0027)"},{"line_number":308,"context_line":"                    LOG.error(msg)"},{"line_number":309,"context_line":"                    return manager.cleaning_error_handler(task, msg)"},{"line_number":310,"context_line":"                # NOTE(JoshNang) when testing, I couldn\u0027t create the port with"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_098305aa","line":307,"updated":"2015-03-17 21:06:58.000000000","message":"\u0027for node %(node)s\u0027?","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"d7716fb49a167fbb2c2b96fa82d4037a2ac34db7","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            try:"},{"line_number":305,"context_line":"                port \u003d neutron_client.create_port(body)"},{"line_number":306,"context_line":"                if not port.get(\u0027port\u0027) or not port[\u0027port\u0027].get(\u0027id\u0027):"},{"line_number":307,"context_line":"                    msg \u003d _(\u0027Failed to create cleaning ports\u0027)"},{"line_number":308,"context_line":"                    LOG.error(msg)"},{"line_number":309,"context_line":"                    return manager.cleaning_error_handler(task, msg)"},{"line_number":310,"context_line":"                # NOTE(JoshNang) when testing, I couldn\u0027t create the port with"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_411a2c7d","line":307,"in_reply_to":"9a80dd14_098305aa","updated":"2015-03-18 06:27:58.000000000","message":"Done","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5729ed29cec47096b04ecdec9f1ee46c80a055a9","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                                         ironic_port.address)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"            except neutron_client_exc.ConnectionFailed as e:"},{"line_number":317,"context_line":"                msg \u003d (_(\u0027Could not create cleaning port on network  %(net)s \u0027"},{"line_number":318,"context_line":"                         \u0027from %(node)s. %(exc)s\u0027) %"},{"line_number":319,"context_line":"                       {\u0027net\u0027: CONF.neutron.cleaning_network_uuid,"},{"line_number":320,"context_line":"                        \u0027node\u0027: task.node.uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_498dfdd2","line":317,"updated":"2015-03-17 21:06:58.000000000","message":"looks like you have an extra blank space after \u0027network\u0027","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"d7716fb49a167fbb2c2b96fa82d4037a2ac34db7","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                                         ironic_port.address)"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"            except neutron_client_exc.ConnectionFailed as e:"},{"line_number":317,"context_line":"                msg \u003d (_(\u0027Could not create cleaning port on network  %(net)s \u0027"},{"line_number":318,"context_line":"                         \u0027from %(node)s. %(exc)s\u0027) %"},{"line_number":319,"context_line":"                       {\u0027net\u0027: CONF.neutron.cleaning_network_uuid,"},{"line_number":320,"context_line":"                        \u0027node\u0027: task.node.uuid,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_64081e29","line":317,"in_reply_to":"9a80dd14_498dfdd2","updated":"2015-03-18 06:27:58.000000000","message":"Done","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5729ed29cec47096b04ecdec9f1ee46c80a055a9","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        :param task: a TaskManager instance."},{"line_number":332,"context_line":"        \"\"\""},{"line_number":333,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        params \u003d {"},{"line_number":336,"context_line":"            \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_c9b80d78","line":333,"updated":"2015-03-17 21:06:58.000000000","message":"ditto about authentication token","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"d7716fb49a167fbb2c2b96fa82d4037a2ac34db7","unresolved":false,"context_lines":[{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        :param task: a TaskManager instance."},{"line_number":332,"context_line":"        \"\"\""},{"line_number":333,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        params \u003d {"},{"line_number":336,"context_line":"            \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_a4113655","line":333,"in_reply_to":"9a80dd14_c9b80d78","updated":"2015-03-18 06:27:58.000000000","message":"Done","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5729ed29cec47096b04ecdec9f1ee46c80a055a9","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        neutron_client \u003d _build_client()"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        params \u003d {"},{"line_number":336,"context_line":"            \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid"},{"line_number":337,"context_line":"        }"},{"line_number":338,"context_line":"        try:"},{"line_number":339,"context_line":"            ports \u003d neutron_client.list_ports(**params)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_29a9a924","line":336,"updated":"2015-03-17 21:06:58.000000000","message":"ditto about if conf is None","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5729ed29cec47096b04ecdec9f1ee46c80a055a9","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            LOG.exception(msg)"},{"line_number":346,"context_line":"            return manager.cleaning_error_handler(task, msg)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        for neutron_port in ports.get(\u0027ports\u0027, []):"},{"line_number":349,"context_line":"            try:"},{"line_number":350,"context_line":"                neutron_client.delete_port(neutron_port.get(\u0027id\u0027))"},{"line_number":351,"context_line":"            except neutron_client_exc.ConnectionFailed as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_8965351f","line":348,"updated":"2015-03-17 21:06:58.000000000","message":"is neutron_port supposed to be a dictionary?","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"d7716fb49a167fbb2c2b96fa82d4037a2ac34db7","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            LOG.exception(msg)"},{"line_number":346,"context_line":"            return manager.cleaning_error_handler(task, msg)"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        for neutron_port in ports.get(\u0027ports\u0027, []):"},{"line_number":349,"context_line":"            try:"},{"line_number":350,"context_line":"                neutron_client.delete_port(neutron_port.get(\u0027id\u0027))"},{"line_number":351,"context_line":"            except neutron_client_exc.ConnectionFailed as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_7570c6a4","line":348,"in_reply_to":"9a80dd14_8965351f","updated":"2015-03-18 06:27:58.000000000","message":"Yes, list_ports returns a port dictionary with with a default of {\u0027ports\u0027: []}, and the values will be a list of port dictionaries (or default empty list). I\u0027ll add comments.","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5729ed29cec47096b04ecdec9f1ee46c80a055a9","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        for neutron_port in ports.get(\u0027ports\u0027, []):"},{"line_number":349,"context_line":"            try:"},{"line_number":350,"context_line":"                neutron_client.delete_port(neutron_port.get(\u0027id\u0027))"},{"line_number":351,"context_line":"            except neutron_client_exc.ConnectionFailed as e:"},{"line_number":352,"context_line":"                msg \u003d (_(\u0027Could not remove cleaning ports on network %(net)s \u0027"},{"line_number":353,"context_line":"                         \u0027from %(node)s, possible network issue. %(exc)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_e975d1cc","line":350,"updated":"2015-03-17 21:06:58.000000000","message":"neutron handles .delete_port(None) and/or does it cause ConnectionFailed exception?","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"d7716fb49a167fbb2c2b96fa82d4037a2ac34db7","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        for neutron_port in ports.get(\u0027ports\u0027, []):"},{"line_number":349,"context_line":"            try:"},{"line_number":350,"context_line":"                neutron_client.delete_port(neutron_port.get(\u0027id\u0027))"},{"line_number":351,"context_line":"            except neutron_client_exc.ConnectionFailed as e:"},{"line_number":352,"context_line":"                msg \u003d (_(\u0027Could not remove cleaning ports on network %(net)s \u0027"},{"line_number":353,"context_line":"                         \u0027from %(node)s, possible network issue. %(exc)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_953ffab4","line":350,"in_reply_to":"9a80dd14_e975d1cc","updated":"2015-03-18 06:27:58.000000000","message":"If list_ports returns a list of None\u0027s, I think that should be a neutron bug.","commit_id":"49df13e5bd5598853aa375c1f0d299097c0bacd9"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        return ip_addresses"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def create_cleaning_ports(self, task):"},{"line_number":291,"context_line":"        \"\"\"Create neutron ports for each port on task.node to boot the ramdisk."},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance."}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2fcfd2b4","line":290,"updated":"2015-03-18 10:50:52.000000000","message":"can we add the entries for create_cleaning_ports and delete_cleaning_ports in base.py and create a no-op implementation for them\n* it will be documented.\n* we don\u0027t need to check if create_cleaning_ports exists with getattr","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        return ip_addresses"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"    def create_cleaning_ports(self, task):"},{"line_number":291,"context_line":"        \"\"\"Create neutron ports for each port on task.node to boot the ramdisk."},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance."}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_1aa3099f","line":290,"in_reply_to":"9a80dd14_2fcfd2b4","updated":"2015-03-18 22:52:35.000000000","message":"I think this is something we should loop back to next cycle and implement more generically. For example, rescue mode using IPA would require something similar, but possibly with a different network. We\u0027d also want different error handling. I don\u0027t want to add to the base interface just so we can break it in a not-backwards compatible way in a month.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            }"},{"line_number":302,"context_line":"        }"},{"line_number":303,"context_line":"        ports \u003d {}"},{"line_number":304,"context_line":"        for ironic_port in task.ports:"},{"line_number":305,"context_line":"            try:"},{"line_number":306,"context_line":"                body[\u0027port\u0027][\u0027mac_address\u0027] \u003d ironic_port.address"},{"line_number":307,"context_line":"                port \u003d neutron_client.create_port(body)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_d4f16b97","line":304,"updated":"2015-03-18 10:50:52.000000000","message":"We assign the same network to all the ports.  If the node has 4 ports, we would ask neutron to assign neutron ports for all the 4 macs on the same network.  Is this required ? \n\nI assume we need to give it for only 1 port, and neutron will handle the connectivity for that mac to the desired network (AFAIK this is what nova does too.  If user request connectivity to 4 networks and Ironic has 4 ports, it will choose randomly which port should connect to which network and then make sure the connectivity is there).","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            }"},{"line_number":302,"context_line":"        }"},{"line_number":303,"context_line":"        ports \u003d {}"},{"line_number":304,"context_line":"        for ironic_port in task.ports:"},{"line_number":305,"context_line":"            try:"},{"line_number":306,"context_line":"                body[\u0027port\u0027][\u0027mac_address\u0027] \u003d ironic_port.address"},{"line_number":307,"context_line":"                port \u003d neutron_client.create_port(body)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2b3406de","line":304,"in_reply_to":"9a80dd14_d4f16b97","updated":"2015-03-18 22:52:35.000000000","message":"I disagree, you can\u0027t know that PXE is enabled for all the ports. Nova has control over the network connections itself, where as we don\u0027t.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        for ironic_port in task.ports:"},{"line_number":305,"context_line":"            try:"},{"line_number":306,"context_line":"                body[\u0027port\u0027][\u0027mac_address\u0027] \u003d ironic_port.address"},{"line_number":307,"context_line":"                port \u003d neutron_client.create_port(body)"},{"line_number":308,"context_line":"                if not port.get(\u0027port\u0027) or not port[\u0027port\u0027].get(\u0027id\u0027):"},{"line_number":309,"context_line":"                    msg \u003d (_(\u0027Failed to create cleaning ports for node \u0027"},{"line_number":310,"context_line":"                             \u0027%(node)s\u0027) % task.node.uuid)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_b4d957f6","line":307,"updated":"2015-03-18 10:50:52.000000000","message":"better to keep only this line in try block as only this can raise.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        for ironic_port in task.ports:"},{"line_number":305,"context_line":"            try:"},{"line_number":306,"context_line":"                body[\u0027port\u0027][\u0027mac_address\u0027] \u003d ironic_port.address"},{"line_number":307,"context_line":"                port \u003d neutron_client.create_port(body)"},{"line_number":308,"context_line":"                if not port.get(\u0027port\u0027) or not port[\u0027port\u0027].get(\u0027id\u0027):"},{"line_number":309,"context_line":"                    msg \u003d (_(\u0027Failed to create cleaning ports for node \u0027"},{"line_number":310,"context_line":"                             \u0027%(node)s\u0027) % task.node.uuid)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_eb590e36","line":307,"in_reply_to":"9a80dd14_b4d957f6","updated":"2015-03-18 22:52:35.000000000","message":"Done","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                body[\u0027port\u0027][\u0027mac_address\u0027] \u003d ironic_port.address"},{"line_number":307,"context_line":"                port \u003d neutron_client.create_port(body)"},{"line_number":308,"context_line":"                if not port.get(\u0027port\u0027) or not port[\u0027port\u0027].get(\u0027id\u0027):"},{"line_number":309,"context_line":"                    msg \u003d (_(\u0027Failed to create cleaning ports for node \u0027"},{"line_number":310,"context_line":"                             \u0027%(node)s\u0027) % task.node.uuid)"},{"line_number":311,"context_line":"                    LOG.error(msg)"},{"line_number":312,"context_line":"                    return manager.cleaning_error_handler(task, msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_34c64717","line":309,"updated":"2015-03-18 10:50:52.000000000","message":"If we failed while creating the second port, I think we should roll back and delete the first port that we created.  If we were to trigger again, we would fail while creating those already-created-ports again in the second attempt.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                body[\u0027port\u0027][\u0027mac_address\u0027] \u003d ironic_port.address"},{"line_number":307,"context_line":"                port \u003d neutron_client.create_port(body)"},{"line_number":308,"context_line":"                if not port.get(\u0027port\u0027) or not port[\u0027port\u0027].get(\u0027id\u0027):"},{"line_number":309,"context_line":"                    msg \u003d (_(\u0027Failed to create cleaning ports for node \u0027"},{"line_number":310,"context_line":"                             \u0027%(node)s\u0027) % task.node.uuid)"},{"line_number":311,"context_line":"                    LOG.error(msg)"},{"line_number":312,"context_line":"                    return manager.cleaning_error_handler(task, msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2ba966dd","line":309,"in_reply_to":"9a80dd14_34c64717","updated":"2015-03-18 22:52:35.000000000","message":"Done","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid"},{"line_number":335,"context_line":"        }"},{"line_number":336,"context_line":"        try:"},{"line_number":337,"context_line":"            ports \u003d neutron_client.list_ports(**params)"},{"line_number":338,"context_line":"        except neutron_client_exc.ConnectionFailed as e:"},{"line_number":339,"context_line":"            msg \u003d (_(\u0027Could not get cleaning network vif for %(node)s \u0027"},{"line_number":340,"context_line":"                     \u0027from Neutron, possible network issue. %(exc)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_d4708bdc","line":337,"updated":"2015-03-18 10:50:52.000000000","message":"Can\u0027t we just save the ports created for cleaning in ports[\u0027extras\u0027] and only delete them.  That would be much simpler than looping over all the ports.  We do that for deploy.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid"},{"line_number":335,"context_line":"        }"},{"line_number":336,"context_line":"        try:"},{"line_number":337,"context_line":"            ports \u003d neutron_client.list_ports(**params)"},{"line_number":338,"context_line":"        except neutron_client_exc.ConnectionFailed as e:"},{"line_number":339,"context_line":"            msg \u003d (_(\u0027Could not get cleaning network vif for %(node)s \u0027"},{"line_number":340,"context_line":"                     \u0027from Neutron, possible network issue. %(exc)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_6be19e29","line":337,"in_reply_to":"9a80dd14_d4708bdc","updated":"2015-03-18 22:52:35.000000000","message":"I\u0027m not fond of that. Neutron should be the source of truth. What if an operator deletes one of these ports? Now we try to delete it, get an error (likely 404), and just have to assume that our cache is wrong.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"eca866f8ca7dacb8621588cf83e714786ea072f0","unresolved":false,"context_lines":[{"line_number":298,"context_line":"            \u0027port\u0027: {"},{"line_number":299,"context_line":"                \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid,"},{"line_number":300,"context_line":"                \u0027admin_state_up\u0027: True,"},{"line_number":301,"context_line":"            }"},{"line_number":302,"context_line":"        }"},{"line_number":303,"context_line":"        ports \u003d {}"},{"line_number":304,"context_line":"        for ironic_port in task.ports:"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_397c5220","line":301,"updated":"2015-03-19 03:10:01.000000000","message":"Should we put the node uuid in here as \u0027device_id\u0027? (not sure if this is ok or if neutron might use this otherwise)\n\nWould be useful in line 343; we could list ports matching the node.","commit_id":"3a752870b2261ab27973487062564d7b34f57df3"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"eca866f8ca7dacb8621588cf83e714786ea072f0","unresolved":false,"context_lines":[{"line_number":340,"context_line":"            \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid"},{"line_number":341,"context_line":"        }"},{"line_number":342,"context_line":"        try:"},{"line_number":343,"context_line":"            ports \u003d neutron_client.list_ports(**params)"},{"line_number":344,"context_line":"        except neutron_client_exc.ConnectionFailed as e:"},{"line_number":345,"context_line":"            msg \u003d (_(\u0027Could not get cleaning network vif for %(node)s \u0027"},{"line_number":346,"context_line":"                     \u0027from Neutron, possible network issue. %(exc)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_79724a4b","line":343,"updated":"2015-03-19 03:10:01.000000000","message":"See line 301. I think we could/should filter this harder.","commit_id":"3a752870b2261ab27973487062564d7b34f57df3"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    cfg.StrOpt(\u0027cleaning_network_uuid\u0027,"},{"line_number":54,"context_line":"               help\u003d\u0027UUID of the network to create Neutron ports on when \u0027"},{"line_number":55,"context_line":"                    \u0027booting to a ramdisk for cleaning/zapping using Neutron \u0027"},{"line_number":56,"context_line":"                    \u0027DHCP\u0027)"},{"line_number":57,"context_line":"    ]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_bcdc9975","line":56,"updated":"2015-03-19 14:37:53.000000000","message":"We should make it clear (in documentation?) that the neutron ports should not be created outside Ironic, since we create/delete. (And if a Neutron port already exists, I\u0027m not sure if/how we handle that.)","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dfa331bc8e3f14008aa31f4425c3158ffb03decd","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        neutron_client \u003d _build_client(task.context.auth_token)"},{"line_number":297,"context_line":"        body \u003d {"},{"line_number":298,"context_line":"            \u0027port\u0027: {"},{"line_number":299,"context_line":"                \u0027network_id\u0027: CONF.neutron.cleaning_network_uuid,"},{"line_number":300,"context_line":"                \u0027admin_state_up\u0027: True,"},{"line_number":301,"context_line":"            }"},{"line_number":302,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_d685aead","line":299,"updated":"2015-03-19 13:34:14.000000000","message":"should we validate this value before passing it to Neutron?","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":320,"context_line":"                except Exception:"},{"line_number":321,"context_line":"                    # Log the error, but continue to cleaning error handler"},{"line_number":322,"context_line":"                    LOG.exception(_LE(\u0027Failed to rollback cleaning port \u0027"},{"line_number":323,"context_line":"                                      \u0027changes for node %s\u0027) % task.node.uuid)"},{"line_number":324,"context_line":"                msg \u003d (_(\u0027Failed to create cleaning ports for node \u0027"},{"line_number":325,"context_line":"                         \u0027%(node)s\u0027) % task.node.uuid)"},{"line_number":326,"context_line":"                LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_769b2217","line":323,"updated":"2015-03-19 14:37:53.000000000","message":"might want to log the actual exception.\n\nHmm. It might be better if .delete_cleaning_ports() handled all exceptions, but that\u0027s just a thought. (Since it is already handling some exceptions.)","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        return ports"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def delete_cleaning_ports(self, task):"},{"line_number":333,"context_line":"        \"\"\"Deletes the neutron port created for booting the ramdisk."},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        :param task: a TaskManager instance."},{"line_number":336,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_564ffe91","line":333,"updated":"2015-03-19 14:37:53.000000000","message":"nit: s/port/ports/","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":363,"context_line":"                            \u0027node\u0027: task.node.uuid,"},{"line_number":364,"context_line":"                            \u0027exc\u0027: e})"},{"line_number":365,"context_line":"                    LOG.exception(msg)"},{"line_number":366,"context_line":"                    return manager.cleaning_error_handler(task, msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_19ff7703","line":366,"updated":"2015-03-19 14:37:53.000000000","message":"I didn\u0027t look into the neutron library; if it raises a different exception about the particular port being deleted, would we want to continue and try to delete the other ports?","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"9e86b18ae630a465220523220c8d8781cf7415dd","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                       {\u0027net\u0027: CONF.neutron.cleaning_network_uuid,"},{"line_number":316,"context_line":"                        \u0027node\u0027: task.node.uuid,"},{"line_number":317,"context_line":"                        \u0027exc\u0027: e})"},{"line_number":318,"context_line":"                LOG.exception(msg)"},{"line_number":319,"context_line":"                return manager.cleaning_error_handler(task, msg)"},{"line_number":320,"context_line":"            if not port.get(\u0027port\u0027) or not port[\u0027port\u0027].get(\u0027id\u0027):"},{"line_number":321,"context_line":"                # Rollback changes"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_a8cb73a2","line":318,"updated":"2015-03-19 15:07:42.000000000","message":"we need to roll back here too - we could have failed while attempting to create second port.","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"},{"author":{"_account_id":15862,"name":"jxiaobin","email":"jxiaobin@ebaysf.com","username":"jxiaobin"},"change_message_id":"a75595c9dfaa121d23b43d1342df9288569c8f36","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    cfg.StrOpt(\u0027cleaning_network_uuid\u0027,"},{"line_number":54,"context_line":"               help\u003d\u0027UUID of the network to create Neutron ports on when \u0027"},{"line_number":55,"context_line":"                    \u0027booting to a ramdisk for cleaning/zapping using Neutron \u0027"},{"line_number":56,"context_line":"                    \u0027DHCP\u0027)"},{"line_number":57,"context_line":"    ]"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":19,"id":"7aaa499b_4bebe3b0","line":56,"updated":"2015-04-15 02:16:16.000000000","message":"Hi Josh, not sure if I understand this correctly, does this option mean \"cleaning\" can only happen in a specified network?\nIn our case, we\u0027re running traditional network, a physical server can only live in a particular subnet, and for each subnet, there will be a corresponding  neutron network, specifying a single cleaning_network_uuid won\u0027t work with such case. We\u0027ll have to use the provisioning network id to clean.","commit_id":"534d9ee96ac738f24a23087a26c98804934ea72d"}],"ironic/drivers/modules/agent.py":[{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"50ebabad38318df1fffefd159333f8dd77c71c60","unresolved":false,"context_lines":[{"line_number":357,"context_line":"            task.context, task.node.id)"},{"line_number":358,"context_line":"        result \u003d agent_client.execute_clean_step(step, task.node, ports)"},{"line_number":359,"context_line":"        if not result.get(\u0027command_status\u0027):"},{"line_number":360,"context_line":"            raise exception.InvalidParameterValue(_LE("},{"line_number":361,"context_line":"                \u0027Agent on node %(node)s returned bad command result: \u0027"},{"line_number":362,"context_line":"                \u0027%(result)s\u0027) % {\u0027node\u0027: task.node.uuid,"},{"line_number":363,"context_line":"                                 \u0027result\u0027: result.get(\u0027command_error\u0027)})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_2f6b1ff2","line":360,"updated":"2015-03-13 02:41:24.000000000","message":"is this really an invalidparametervalue.  i think it should be nodecleaningfailure.  it must be something to with internal error in the agent i think if command_status is not there.\n\nand ditto as above, i think we should set the node to cleanfail here.","commit_id":"32f39d1c922c9af8a09cac5908e0b233e576c76a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9f2cd500bb353e8bea51bc301333638a7b647128","unresolved":false,"context_lines":[{"line_number":357,"context_line":"            task.context, task.node.id)"},{"line_number":358,"context_line":"        result \u003d agent_client.execute_clean_step(step, task.node, ports)"},{"line_number":359,"context_line":"        if not result.get(\u0027command_status\u0027):"},{"line_number":360,"context_line":"            raise exception.InvalidParameterValue(_LE("},{"line_number":361,"context_line":"                \u0027Agent on node %(node)s returned bad command result: \u0027"},{"line_number":362,"context_line":"                \u0027%(result)s\u0027) % {\u0027node\u0027: task.node.uuid,"},{"line_number":363,"context_line":"                                 \u0027result\u0027: result.get(\u0027command_error\u0027)})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_0801ec04","line":360,"in_reply_to":"9a80dd14_2f6b1ff2","updated":"2015-03-13 08:21:11.000000000","message":"Agreed on NodeCleaningFailure. This isn\u0027t asynchronous, so setting cleanfail isn\u0027t necessary (conductor will)","commit_id":"32f39d1c922c9af8a09cac5908e0b233e576c76a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"50ebabad38318df1fffefd159333f8dd77c71c60","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                node\u003dtask.node.uuid, reason\u003dresult.get(\u0027command_error\u0027))"},{"line_number":369,"context_line":"        else:"},{"line_number":370,"context_line":"            # Return None signifies the cleaning step is complete"},{"line_number":371,"context_line":"            return None"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def prepare_cleaning(self, task):"},{"line_number":374,"context_line":"        \"\"\"Boot into the agent to prepare for cleaning.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_d2a788a5","line":371,"updated":"2015-03-13 02:41:24.000000000","message":"i think we always execute clean step with wait\u003dTrue and there is no chance that it will return None.  is it a failure then ?","commit_id":"32f39d1c922c9af8a09cac5908e0b233e576c76a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9f2cd500bb353e8bea51bc301333638a7b647128","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                node\u003dtask.node.uuid, reason\u003dresult.get(\u0027command_error\u0027))"},{"line_number":369,"context_line":"        else:"},{"line_number":370,"context_line":"            # Return None signifies the cleaning step is complete"},{"line_number":371,"context_line":"            return None"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def prepare_cleaning(self, task):"},{"line_number":374,"context_line":"        \"\"\"Boot into the agent to prepare for cleaning.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_88debc6b","line":371,"in_reply_to":"9a80dd14_d2a788a5","updated":"2015-03-13 08:21:11.000000000","message":"We execute with wait\u003dFalse, but otherwise, you\u0027re right, it shouldn\u0027t be finished at this point.","commit_id":"32f39d1c922c9af8a09cac5908e0b233e576c76a"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"36785635081d3e76fc31a66fb4a13f8c968da536","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        # Filter steps to only return deploy steps"},{"line_number":351,"context_line":"        steps \u003d [step for step in steps_list"},{"line_number":352,"context_line":"                 if step.get(\u0027interface\u0027) \u003d\u003d \u0027deploy\u0027]"},{"line_number":353,"context_line":"        return steps"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def execute_clean_step(self, task, step):"},{"line_number":356,"context_line":"        \"\"\"Execute a clean step on the agent."}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_f9738313","line":353,"updated":"2015-03-13 10:57:27.000000000","message":"these 2 functions could be re-used by other drivers also right , can these be re-factored to be used for example in agent_ilo driver also?\n\nAnd also, if this needs to be implemented for every interface ( if they have clean steps) , it will be redundant to implement the same function?","commit_id":"e1d08a09ea3d9668be91f406e669e3500d3cfa0a"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"8bf429d25277a8ed3507d6bc9da3e2e15a03f256","unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        :param task: a TaskManager object containing the node"},{"line_number":338,"context_line":"        :param step: a clean step dictionary to execute"},{"line_number":339,"context_line":"        :returns: states.CLEANING to signify the step will be completed async"},{"line_number":340,"context_line":"        \"\"\""},{"line_number":341,"context_line":"        return deploy_utils.agent_execute_clean_step(task, step)"},{"line_number":342,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_1f147c4b","line":339,"updated":"2015-03-16 03:12:21.000000000","message":":raises InvalidParameterValue?","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fe78b1246770e2f48b1e57484b01dd1bd4695e34","unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        :param task: a TaskManager object containing the node"},{"line_number":338,"context_line":"        :param step: a clean step dictionary to execute"},{"line_number":339,"context_line":"        :returns: states.CLEANING to signify the step will be completed async"},{"line_number":340,"context_line":"        \"\"\""},{"line_number":341,"context_line":"        return deploy_utils.agent_execute_clean_step(task, step)"},{"line_number":342,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_8c63ac40","line":339,"in_reply_to":"9a80dd14_1f147c4b","updated":"2015-03-17 16:21:43.000000000","message":"Done","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    dhcp_opts \u003d pxe_utils.dhcp_options_for_instance(task)"},{"line_number":211,"context_line":"    provider \u003d dhcp_factory.DHCPFactory()"},{"line_number":212,"context_line":"    provider.update_dhcp(task, dhcp_opts, ports)"},{"line_number":213,"context_line":"    manager_utils.node_set_boot_device(task, \u0027pxe\u0027, persistent\u003dTrue)"},{"line_number":214,"context_line":"    manager_utils.node_power_action(task, states.REBOOT)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_14006301","line":213,"updated":"2015-03-18 10:50:52.000000000","message":"boot_devices.PXE","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    dhcp_opts \u003d pxe_utils.dhcp_options_for_instance(task)"},{"line_number":211,"context_line":"    provider \u003d dhcp_factory.DHCPFactory()"},{"line_number":212,"context_line":"    provider.update_dhcp(task, dhcp_opts, ports)"},{"line_number":213,"context_line":"    manager_utils.node_set_boot_device(task, \u0027pxe\u0027, persistent\u003dTrue)"},{"line_number":214,"context_line":"    manager_utils.node_power_action(task, states.REBOOT)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ab0716c8","line":213,"in_reply_to":"9a80dd14_14006301","updated":"2015-03-18 22:52:35.000000000","message":"Done","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        # Create cleaning ports if necessary"},{"line_number":377,"context_line":"        ports \u003d None"},{"line_number":378,"context_line":"        if getattr(provider.provider, \u0027create_cleaning_ports\u0027, None):"},{"line_number":379,"context_line":"            ports \u003d provider.provider.create_cleaning_ports(task)"},{"line_number":380,"context_line":"        _prepare_pxe_boot(task)"},{"line_number":381,"context_line":"        _do_pxe_boot(task, ports)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_cfbd5605","line":378,"updated":"2015-03-18 10:50:52.000000000","message":"as per my comment in neutron.py, better if we have a base implementation for create_cleaning_ports and delete_cleaning_ports with a no-op.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        # If we created cleaning ports, delete them"},{"line_number":391,"context_line":"        provider \u003d dhcp_factory.DHCPFactory()"},{"line_number":392,"context_line":"        if getattr(provider.provider, \u0027delete_cleaning_ports\u0027, None):"},{"line_number":393,"context_line":"            provider.provider.delete_cleaning_ports(task)"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_8f435e12","line":392,"updated":"2015-03-18 10:50:52.000000000","message":"ditto, not required if there was a no-op method.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        :returns: A list of clean step dictionaries"},{"line_number":349,"context_line":"        \"\"\""},{"line_number":350,"context_line":"        steps \u003d deploy_utils.agent_get_clean_steps(task)"},{"line_number":351,"context_line":"        if CONF.agent.agent_erase_devices_priority:"},{"line_number":352,"context_line":"            for step in steps:"},{"line_number":353,"context_line":"                if (step.get(\u0027step\u0027) \u003d\u003d \u0027erase_devices\u0027 and"},{"line_number":354,"context_line":"                        step.get(\u0027interface\u0027) \u003d\u003d \u0027deploy\u0027):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_5cf39d72","line":351,"updated":"2015-03-19 14:37:53.000000000","message":"if the value was set to 0, this if will be false, but don\u0027t you want to override the step priority with 0?","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                if (step.get(\u0027step\u0027) \u003d\u003d \u0027erase_devices\u0027 and"},{"line_number":354,"context_line":"                        step.get(\u0027interface\u0027) \u003d\u003d \u0027deploy\u0027):"},{"line_number":355,"context_line":"                    # Override with operator set priority"},{"line_number":356,"context_line":"                    step[\u0027priority\u0027] \u003d CONF.agent.agent_erase_devices_priority"},{"line_number":357,"context_line":"        return steps"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def execute_clean_step(self, task, step):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_3c7989fc","line":356,"updated":"2015-03-19 14:37:53.000000000","message":"Will there only be at most one step that does this? (Just wondering if you wanted to look through all the steps, or stop after finding one.)","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":372,"context_line":"        provider \u003d dhcp_factory.DHCPFactory()"},{"line_number":373,"context_line":"        # If we have left over ports from a previous cleaning, remove them"},{"line_number":374,"context_line":"        if getattr(provider.provider, \u0027delete_cleaning_ports\u0027, None):"},{"line_number":375,"context_line":"            provider.provider.delete_cleaning_ports(task)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        # Create cleaning ports if necessary"},{"line_number":378,"context_line":"        ports \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_c7409a37","line":375,"updated":"2015-03-19 14:37:53.000000000","message":"if there is a problem in .delete_cleaning_ports(), the provision_state will be set to CLEANFAIL. But we continue doing stuff here.","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"9e86b18ae630a465220523220c8d8781cf7415dd","unresolved":false,"context_lines":[{"line_number":205,"context_line":"def _do_pxe_boot(task, ports\u003dNone):"},{"line_number":206,"context_line":"    \"\"\"Reboot the node into the PXE ramdisk."},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    :param ports: a list of Neutron port dicts to update DHCP options on. If"},{"line_number":209,"context_line":"        None, will get the list of ports from the Ironic port objects."},{"line_number":210,"context_line":"    \"\"\""},{"line_number":211,"context_line":"    dhcp_opts \u003d pxe_utils.dhcp_options_for_instance(task)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_a859b3fe","line":208,"updated":"2015-03-19 15:07:42.000000000","message":"nit: missing task","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d1e4363564fe09e621f939714645c4547dcec0f0","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                if (step.get(\u0027step\u0027) \u003d\u003d \u0027erase_devices\u0027 and"},{"line_number":354,"context_line":"                        step.get(\u0027interface\u0027) \u003d\u003d \u0027deploy\u0027):"},{"line_number":355,"context_line":"                    # Override with operator set priority"},{"line_number":356,"context_line":"                    step[\u0027priority\u0027] \u003d CONF.agent.agent_erase_devices_priority"},{"line_number":357,"context_line":"        return steps"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def execute_clean_step(self, task, step):"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_6d942d37","line":356,"updated":"2015-03-19 14:46:40.000000000","message":"not sure I understand why we special-case erase_devices, but should n\u0027t it go to deploy_utils.agent_get_clean_steps?","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"9e86b18ae630a465220523220c8d8781cf7415dd","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                if (step.get(\u0027step\u0027) \u003d\u003d \u0027erase_devices\u0027 and"},{"line_number":354,"context_line":"                        step.get(\u0027interface\u0027) \u003d\u003d \u0027deploy\u0027):"},{"line_number":355,"context_line":"                    # Override with operator set priority"},{"line_number":356,"context_line":"                    step[\u0027priority\u0027] \u003d CONF.agent.agent_erase_devices_priority"},{"line_number":357,"context_line":"        return steps"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def execute_clean_step(self, task, step):"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_48d3d737","line":356,"in_reply_to":"9a80dd14_6d942d37","updated":"2015-03-19 15:07:42.000000000","message":"Dmitry, i guess this is agent driver specific. the ilo priority will be defined in ilo driver  https://review.openstack.org/#/c/164646/7/ironic/drivers/modules/ilo/deploy.py","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"daa943295ae60093598ac08f2976d521624621fa","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                if (step.get(\u0027step\u0027) \u003d\u003d \u0027erase_devices\u0027 and"},{"line_number":354,"context_line":"                        step.get(\u0027interface\u0027) \u003d\u003d \u0027deploy\u0027):"},{"line_number":355,"context_line":"                    # Override with operator set priority"},{"line_number":356,"context_line":"                    step[\u0027priority\u0027] \u003d CONF.agent.agent_erase_devices_priority"},{"line_number":357,"context_line":"        return steps"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def execute_clean_step(self, task, step):"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_4863d719","line":356,"in_reply_to":"9a80dd14_6d942d37","updated":"2015-03-19 15:03:49.000000000","message":"This is an agent-specific thing, it\u0027s just allowing the operator to override the erase_devices priority.","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"}],"ironic/drivers/modules/agent_base_vendor.py":[{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"50ebabad38318df1fffefd159333f8dd77c71c60","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            return"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        if command.get(\u0027command_status\u0027) \u003d\u003d \u0027FAILED\u0027:"},{"line_number":145,"context_line":"            raise exception.NodeCleaningFailure("},{"line_number":146,"context_line":"                node\u003dtask.node.uuid, reason\u003dcommand.get(\u0027command_error\u0027))"},{"line_number":147,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027CLEAN_VERSION_MISMATCH\u0027:"},{"line_number":148,"context_line":"            # Restart cleaning, agent must have rebooted to new version"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_72733c80","line":145,"updated":"2015-03-13 02:41:24.000000000","message":"and set state to CLEANFAIL and last_error? i think for async tasks, it\u0027s responsibility of caller to set it to CLEANFAIL","commit_id":"32f39d1c922c9af8a09cac5908e0b233e576c76a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9f2cd500bb353e8bea51bc301333638a7b647128","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            return"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        if command.get(\u0027command_status\u0027) \u003d\u003d \u0027FAILED\u0027:"},{"line_number":145,"context_line":"            raise exception.NodeCleaningFailure("},{"line_number":146,"context_line":"                node\u003dtask.node.uuid, reason\u003dcommand.get(\u0027command_error\u0027))"},{"line_number":147,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027CLEAN_VERSION_MISMATCH\u0027:"},{"line_number":148,"context_line":"            # Restart cleaning, agent must have rebooted to new version"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_3567e94e","line":145,"in_reply_to":"9a80dd14_72733c80","updated":"2015-03-13 08:21:11.000000000","message":"Done","commit_id":"32f39d1c922c9af8a09cac5908e0b233e576c76a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"50ebabad38318df1fffefd159333f8dd77c71c60","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            self.complete_prepare_cleaning(task)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027SUCCESS\u0027:"},{"line_number":152,"context_line":"            self._continue_cleaning(task)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def complete_prepare_cleaning(self, task, **kwargs):"},{"line_number":155,"context_line":"        \"\"\"Agent cleaning preparation complete, continue cleaning.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_92db507b","line":152,"updated":"2015-03-13 02:41:24.000000000","message":"should we add an else ? so that the node is not stuck at CLEANING for ever if agent returned something else.","commit_id":"32f39d1c922c9af8a09cac5908e0b233e576c76a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"9f2cd500bb353e8bea51bc301333638a7b647128","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            self.complete_prepare_cleaning(task)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027SUCCESS\u0027:"},{"line_number":152,"context_line":"            self._continue_cleaning(task)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def complete_prepare_cleaning(self, task, **kwargs):"},{"line_number":155,"context_line":"        \"\"\"Agent cleaning preparation complete, continue cleaning.\"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_1562e53d","line":152,"in_reply_to":"9a80dd14_92db507b","updated":"2015-03-13 08:21:11.000000000","message":"Done","commit_id":"32f39d1c922c9af8a09cac5908e0b233e576c76a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"50ebabad38318df1fffefd159333f8dd77c71c60","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        \"\"\"Returns None or a completed cleaning command from the agent.\"\"\""},{"line_number":279,"context_line":"        commands \u003d self._client.get_commands_status(task.node)"},{"line_number":280,"context_line":"        if not commands:"},{"line_number":281,"context_line":"            return None"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        last_command \u003d commands[-1]"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_5244781a","line":281,"updated":"2015-03-13 02:41:24.000000000","message":"returning None will cause the caller to think that last command is not done yet. should we raise an exception here and fail node cleaning ?","commit_id":"32f39d1c922c9af8a09cac5908e0b233e576c76a"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"289e4afe1faf8453fd552e8cf5df72449f502780","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        rpc.continue_node_clean(task.context, task.node.uuid, topic\u003dtopic)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def continue_cleaning(self, task, **kwargs):"},{"line_number":137,"context_line":"        \"\"\"Start the next cleaning step if the previous one is complete.\"\"\""},{"line_number":138,"context_line":"        command \u003d self._get_completed_cleaning_command(task)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        if not command or command.get(\u0027command_status\u0027) \u003d\u003d \u0027RUNNING\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_397b377c","line":137,"updated":"2015-03-13 23:17:39.000000000","message":"nit: should also indicate in the docstring that we\u0027ll restart if the agent version changed","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fe78b1246770e2f48b1e57484b01dd1bd4695e34","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        rpc.continue_node_clean(task.context, task.node.uuid, topic\u003dtopic)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def continue_cleaning(self, task, **kwargs):"},{"line_number":137,"context_line":"        \"\"\"Start the next cleaning step if the previous one is complete.\"\"\""},{"line_number":138,"context_line":"        command \u003d self._get_completed_cleaning_command(task)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        if not command or command.get(\u0027command_status\u0027) \u003d\u003d \u0027RUNNING\u0027:"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a80dd14_cc384440","line":137,"in_reply_to":"9a80dd14_397b377c","updated":"2015-03-17 16:21:43.000000000","message":"Done","commit_id":"7691b96508f5e752f89825df6f1d2426d0ae6ce3"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                                                    \u0027payload version: %s\u0027)"},{"line_number":129,"context_line":"                                                    % version)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _continue_cleaning(self, task):"},{"line_number":132,"context_line":"        uuid \u003d task.node.uuid"},{"line_number":133,"context_line":"        rpc \u003d rpcapi.ConductorAPI()"},{"line_number":134,"context_line":"        topic \u003d rpc.get_topic_for(task.node)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2fb992ec","line":131,"updated":"2015-03-18 10:50:52.000000000","message":"continue_cleaning and _continue_cleaning seems confusing.  can we rename _continue_cleaning to notify_conductor_resume_clean() or something more descriptive.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":128,"context_line":"                                                    \u0027payload version: %s\u0027)"},{"line_number":129,"context_line":"                                                    % version)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def _continue_cleaning(self, task):"},{"line_number":132,"context_line":"        uuid \u003d task.node.uuid"},{"line_number":133,"context_line":"        rpc \u003d rpcapi.ConductorAPI()"},{"line_number":134,"context_line":"        topic \u003d rpc.get_topic_for(task.node)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_8bb5f2d1","line":131,"in_reply_to":"9a80dd14_2fb992ec","updated":"2015-03-18 22:52:35.000000000","message":"Done","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        rpc \u003d rpcapi.ConductorAPI()"},{"line_number":134,"context_line":"        topic \u003d rpc.get_topic_for(task.node)"},{"line_number":135,"context_line":"        # Need to release the lock to let the conductor take it"},{"line_number":136,"context_line":"        task.release_resources()"},{"line_number":137,"context_line":"        rpc.continue_node_clean(task.context, uuid, topic\u003dtopic)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def continue_cleaning(self, task, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_6b953d87","line":136,"updated":"2015-03-18 10:50:52.000000000","message":"now releasing resource here again is a bit tricky.  what if some other thread acquires lock before the conductor\u0027s continue_node_clean() gets to it.  the continue_node_clean rpc will fail with NodeLocked error.  i think we will have the node heartbeating again, and once the lock is released by other thread and we should send another rpc message. (again just a note)","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"3ac8f44541de72db87828de7a6c6de5660ce39c1","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        rpc \u003d rpcapi.ConductorAPI()"},{"line_number":134,"context_line":"        topic \u003d rpc.get_topic_for(task.node)"},{"line_number":135,"context_line":"        # Need to release the lock to let the conductor take it"},{"line_number":136,"context_line":"        task.release_resources()"},{"line_number":137,"context_line":"        rpc.continue_node_clean(task.context, uuid, topic\u003dtopic)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def continue_cleaning(self, task, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_77da6a18","line":136,"in_reply_to":"9a80dd14_6b953d87","updated":"2015-03-18 17:46:14.000000000","message":"the conductor should not be using RPC messages just to talk to itself ....","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        rpc \u003d rpcapi.ConductorAPI()"},{"line_number":134,"context_line":"        topic \u003d rpc.get_topic_for(task.node)"},{"line_number":135,"context_line":"        # Need to release the lock to let the conductor take it"},{"line_number":136,"context_line":"        task.release_resources()"},{"line_number":137,"context_line":"        rpc.continue_node_clean(task.context, uuid, topic\u003dtopic)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def continue_cleaning(self, task, **kwargs):"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ebb029ff","line":136,"in_reply_to":"9a80dd14_77da6a18","updated":"2015-03-18 22:52:35.000000000","message":"As discussed in channel, going to test this out as is, or provide a reference to manager in task_manager.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        \"\"\""},{"line_number":149,"context_line":"        command \u003d self._get_completed_cleaning_command(task)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        if not command or command.get(\u0027command_status\u0027) \u003d\u003d \u0027RUNNING\u0027:"},{"line_number":152,"context_line":"            # Command is not done yet"},{"line_number":153,"context_line":"            return"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_eb368db3","line":151,"updated":"2015-03-18 10:50:52.000000000","message":"we already check if command.get(\u0027command_status\u0027) \u003d\u003d \u0027RUNNING\u0027 in self._get_completed_cleaning_command","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        \"\"\""},{"line_number":149,"context_line":"        command \u003d self._get_completed_cleaning_command(task)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        if not command or command.get(\u0027command_status\u0027) \u003d\u003d \u0027RUNNING\u0027:"},{"line_number":152,"context_line":"            # Command is not done yet"},{"line_number":153,"context_line":"            return"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2bc40640","line":151,"in_reply_to":"9a80dd14_eb368db3","updated":"2015-03-18 22:52:35.000000000","message":"Done","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            manager.cleaning_error_handler(task, msg)"},{"line_number":163,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027CLEAN_VERSION_MISMATCH\u0027:"},{"line_number":164,"context_line":"            # Restart cleaning, agent must have rebooted to new version"},{"line_number":165,"context_line":"            manager.set_node_cleaning_steps(task)"},{"line_number":166,"context_line":"            self._continue_cleaning(task)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027SUCCEEDED\u0027:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_6b3e1d2b","line":165,"updated":"2015-03-18 10:50:52.000000000","message":"seems like this can raise from deploy_utils.agent_get_clean_steps().  Should we handle it ? if not node will be left in cleaning for ever.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            manager.cleaning_error_handler(task, msg)"},{"line_number":163,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027CLEAN_VERSION_MISMATCH\u0027:"},{"line_number":164,"context_line":"            # Restart cleaning, agent must have rebooted to new version"},{"line_number":165,"context_line":"            manager.set_node_cleaning_steps(task)"},{"line_number":166,"context_line":"            self._continue_cleaning(task)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027SUCCEEDED\u0027:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_5730fce8","line":165,"in_reply_to":"9a80dd14_6b3e1d2b","updated":"2015-03-18 22:52:35.000000000","message":"Done","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027SUCCEEDED\u0027:"},{"line_number":169,"context_line":"            self._continue_cleaning(task)"},{"line_number":170,"context_line":"        else:"},{"line_number":171,"context_line":"            LOG.warning(\u0027Agent on node %(node)s returned an unknown command \u0027"},{"line_number":172,"context_line":"                        \u0027status: %(status)s.\u0027,"},{"line_number":173,"context_line":"                        {\u0027node\u0027: task.node.uuid,"},{"line_number":174,"context_line":"                         \u0027status\u0027: command.get(\u0027command_status\u0027)})"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_cbfd49b3","line":171,"updated":"2015-03-18 10:50:52.000000000","message":"Should we just fail cleaning here ? The node will be left in CLEANING state if we don\u0027t do it.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027SUCCEEDED\u0027:"},{"line_number":169,"context_line":"            self._continue_cleaning(task)"},{"line_number":170,"context_line":"        else:"},{"line_number":171,"context_line":"            LOG.warning(\u0027Agent on node %(node)s returned an unknown command \u0027"},{"line_number":172,"context_line":"                        \u0027status: %(status)s.\u0027,"},{"line_number":173,"context_line":"                        {\u0027node\u0027: task.node.uuid,"},{"line_number":174,"context_line":"                         \u0027status\u0027: command.get(\u0027command_status\u0027)})"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_8b2a52e5","line":171,"in_reply_to":"9a80dd14_cbfd49b3","updated":"2015-03-18 22:52:35.000000000","message":"Hmm, probably a good idea.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                self._continue_cleaning(task)"},{"line_number":222,"context_line":"            elif (node.provision_state \u003d\u003d states.CLEANING and"},{"line_number":223,"context_line":"                  node.clean_step !\u003d {}):"},{"line_number":224,"context_line":"                self.continue_cleaning(task, **kwargs)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        except Exception as e:"},{"line_number":227,"context_line":"            err_info \u003d {\u0027node\u0027: node.uuid, \u0027msg\u0027: msg, \u0027e\u0027: e}"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0b7761a0","line":224,"updated":"2015-03-18 10:50:52.000000000","message":"now we do this for every heartbeat. in normal cases, on the first heartbeat the message should go through and conductor should start cleaning and set node.clean_step.  but what if we get a second heartbeat before the rpc message is processed ? it will send a duplicate rpc message and would be rejected at the conductor i guess.  i don\u0027t think it will cause a problem afaik.  just wanted to note this.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                self._continue_cleaning(task)"},{"line_number":222,"context_line":"            elif (node.provision_state \u003d\u003d states.CLEANING and"},{"line_number":223,"context_line":"                  node.clean_step !\u003d {}):"},{"line_number":224,"context_line":"                self.continue_cleaning(task, **kwargs)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        except Exception as e:"},{"line_number":227,"context_line":"            err_info \u003d {\u0027node\u0027: node.uuid, \u0027msg\u0027: msg, \u0027e\u0027: e}"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0b8822c5","line":224,"in_reply_to":"9a80dd14_0b7761a0","updated":"2015-03-18 22:52:35.000000000","message":"Basically all of the agent driver has this \u0027bug\u0027, quite unfortunately. We can try to continue deploys/complete deploys multiple times, etc. It\u0027s something I want to improve a bunch next cycle.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        we restart cleaning."},{"line_number":148,"context_line":"        \"\"\""},{"line_number":149,"context_line":"        command \u003d self._get_completed_cleaning_command(task)"},{"line_number":150,"context_line":"        LOG.debug(\u0027Cleaning command status for node %(node)s on step %(step)s \u0027"},{"line_number":151,"context_line":"                  \u0027(command)%\u0027, {\u0027node\u0027: task.node.uuid,"},{"line_number":152,"context_line":"                                 \u0027step\u0027: task.node.clean_step,"},{"line_number":153,"context_line":"                                 \u0027command\u0027: command})"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_07ff12ac","line":150,"updated":"2015-03-19 14:37:53.000000000","message":"you might want to add \u0027is\u0027 or \u0027:\u0027 at the end here, otherwise it might be a bit difficult to understand. But it is only debug.","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":173,"context_line":"                         \u0027%(err)s.\u0027) %"},{"line_number":174,"context_line":"                       {\u0027node\u0027: task.node.uuid,"},{"line_number":175,"context_line":"                        \u0027err\u0027: command.get(\u0027command_error\u0027),"},{"line_number":176,"context_line":"                        \u0027step\u0027: task.node.clean_step})"},{"line_number":177,"context_line":"                LOG.exception(msg)"},{"line_number":178,"context_line":"                manager.cleaning_error_handler(task, msg)"},{"line_number":179,"context_line":"            self._notify_conductor_resume_clean(task)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_e7f4be88","line":176,"updated":"2015-03-19 14:37:53.000000000","message":"nit: step isn\u0027t used in the msg.","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dfa331bc8e3f14008aa31f4425c3158ffb03decd","unresolved":false,"context_lines":[{"line_number":231,"context_line":"                msg \u003d _(\u0027Node failed to move to active state.\u0027)"},{"line_number":232,"context_line":"                self.reboot_to_instance(task, **kwargs)"},{"line_number":233,"context_line":"            elif (node.provision_state \u003d\u003d states.CLEANING and"},{"line_number":234,"context_line":"                  node.clean_step \u003d\u003d {}):"},{"line_number":235,"context_line":"                # Agent booted from prepare_cleaning"},{"line_number":236,"context_line":"                manager.set_node_cleaning_steps(task)"},{"line_number":237,"context_line":"                self._notify_conductor_resume_clean(task)"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_192db78f","line":234,"updated":"2015-03-19 13:34:14.000000000","message":"nit: `not node.clean_step`","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dfa331bc8e3f14008aa31f4425c3158ffb03decd","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                manager.set_node_cleaning_steps(task)"},{"line_number":237,"context_line":"                self._notify_conductor_resume_clean(task)"},{"line_number":238,"context_line":"            elif (node.provision_state \u003d\u003d states.CLEANING and"},{"line_number":239,"context_line":"                  node.clean_step !\u003d {}):"},{"line_number":240,"context_line":"                self.continue_cleaning(task, **kwargs)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_394d1b73","line":239,"updated":"2015-03-19 13:34:14.000000000","message":"nit: similar here","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":300,"context_line":"            \u0027node\u0027: node"},{"line_number":301,"context_line":"        }"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def _get_completed_cleaning_command(self, task):"},{"line_number":304,"context_line":"        \"\"\"Returns None or a completed cleaning command from the agent.\"\"\""},{"line_number":305,"context_line":"        commands \u003d self._client.get_commands_status(task.node)"},{"line_number":306,"context_line":"        if not commands:"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_a26f14c3","line":303,"updated":"2015-03-19 14:37:53.000000000","message":"it looks to me like this gets the last completed command (regardless if it was a cleaning command or some other command)","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dfa331bc8e3f14008aa31f4425c3158ffb03decd","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        \"\"\"Returns None or a completed cleaning command from the agent.\"\"\""},{"line_number":305,"context_line":"        commands \u003d self._client.get_commands_status(task.node)"},{"line_number":306,"context_line":"        if not commands:"},{"line_number":307,"context_line":"            return None"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        last_command \u003d commands[-1]"},{"line_number":310,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_d93ddfbc","line":307,"updated":"2015-03-19 13:34:14.000000000","message":"nit: just \u0027return\u0027","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"9e86b18ae630a465220523220c8d8781cf7415dd","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                        \u0027err\u0027: command.get(\u0027command_error\u0027),"},{"line_number":176,"context_line":"                        \u0027step\u0027: task.node.clean_step})"},{"line_number":177,"context_line":"                LOG.exception(msg)"},{"line_number":178,"context_line":"                manager.cleaning_error_handler(task, msg)"},{"line_number":179,"context_line":"            self._notify_conductor_resume_clean(task)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"        elif command.get(\u0027command_status\u0027) \u003d\u003d \u0027SUCCEEDED\u0027:"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_08c0ff29","line":178,"updated":"2015-03-19 15:07:42.000000000","message":"Need to return \n\n  manager.cleaning_error_handler(task, msg)\n  return \n\nOtherwise it will send rpc message (which i guess might fail because state of node has changed)","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"c5a1550f897c12e63ef4e0661f1fa9d1cec9b2c7","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        \"\"\""},{"line_number":149,"context_line":"        command \u003d self._get_completed_cleaning_command(task)"},{"line_number":150,"context_line":"        LOG.debug(\u0027Cleaning command status for node %(node)s on step %(step)s \u0027"},{"line_number":151,"context_line":"                  \u0027(command)%\u0027, {\u0027node\u0027: task.node.uuid,"},{"line_number":152,"context_line":"                                 \u0027step\u0027: task.node.clean_step,"},{"line_number":153,"context_line":"                                 \u0027command\u0027: command})"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_35cc3735","line":151,"updated":"2015-03-19 16:10:03.000000000","message":"should be %(command)s","commit_id":"534d9ee96ac738f24a23087a26c98804934ea72d"}],"ironic/drivers/modules/deploy_utils.py":[{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":874,"context_line":""},{"line_number":875,"context_line":"    #TODO(JoshNang) move to BootInterface"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    :param task: a TaskManager object containing the node"},{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    :returns: A list of clean step dictionaries"},{"line_number":880,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ab4815cd","line":877,"updated":"2015-03-18 10:50:52.000000000","message":"missing raises and returns.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":874,"context_line":""},{"line_number":875,"context_line":"    #TODO(JoshNang) move to BootInterface"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"    :param task: a TaskManager object containing the node"},{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    :returns: A list of clean step dictionaries"},{"line_number":880,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_77442047","line":877,"in_reply_to":"9a80dd14_ab4815cd","updated":"2015-03-18 22:52:35.000000000","message":"returns is right below. Added raises.","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"1e13fc78c114c3bc68bd19f8082839474389ac8e","unresolved":false,"context_lines":[{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    if (\u0027clean_steps\u0027 not in result or"},{"line_number":887,"context_line":"            \u0027hardware_manager_version\u0027 not in result):"},{"line_number":888,"context_line":"        raise exception.NodeCleaningFailure(_LE("},{"line_number":889,"context_line":"            \u0027get_clean_steps for node %(node)s returned invalid result:\u0027"},{"line_number":890,"context_line":"            \u0027 %(result)s\u0027) % ({\u0027node\u0027: task.node.uuid, \u0027result\u0027: result}))"},{"line_number":891,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0b15a19a","line":888,"updated":"2015-03-18 10:50:52.000000000","message":"s/_LE/_","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"b3ec7a9b649503d415f576aa46572c0912358eb6","unresolved":false,"context_lines":[{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    if (\u0027clean_steps\u0027 not in result or"},{"line_number":887,"context_line":"            \u0027hardware_manager_version\u0027 not in result):"},{"line_number":888,"context_line":"        raise exception.NodeCleaningFailure(_LE("},{"line_number":889,"context_line":"            \u0027get_clean_steps for node %(node)s returned invalid result:\u0027"},{"line_number":890,"context_line":"            \u0027 %(result)s\u0027) % ({\u0027node\u0027: task.node.uuid, \u0027result\u0027: result}))"},{"line_number":891,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_77e0a026","line":888,"in_reply_to":"9a80dd14_0b15a19a","updated":"2015-03-18 22:52:35.000000000","message":"Done","commit_id":"865c8078ad064f7cf6ead1d2c0f5fd9476500676"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dfa331bc8e3f14008aa31f4425c3158ffb03decd","unresolved":false,"context_lines":[{"line_number":895,"context_line":""},{"line_number":896,"context_line":"    if (\u0027clean_steps\u0027 not in result or"},{"line_number":897,"context_line":"            \u0027hardware_manager_version\u0027 not in result):"},{"line_number":898,"context_line":"        raise exception.NodeCleaningFailure(_LE("},{"line_number":899,"context_line":"            \u0027get_clean_steps for node %(node)s returned invalid result:\u0027"},{"line_number":900,"context_line":"            \u0027 %(result)s\u0027) % ({\u0027node\u0027: task.node.uuid, \u0027result\u0027: result}))"},{"line_number":901,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_7978737e","line":898,"updated":"2015-03-19 13:34:14.000000000","message":"s/_LE/_/ ?","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":902,"context_line":"    driver_info \u003d task.node.driver_internal_info"},{"line_number":903,"context_line":"    driver_info[\u0027hardware_manager_version\u0027] \u003d result["},{"line_number":904,"context_line":"        \u0027hardware_manager_version\u0027]"},{"line_number":905,"context_line":"    task.node.driver_internal_info \u003d driver_info"},{"line_number":906,"context_line":"    task.node.save()"},{"line_number":907,"context_line":""},{"line_number":908,"context_line":"    # Clean steps looks like {\u0027HardwareManager\u0027: [{step1},{steps2}..]..}"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_cdaef9e6","line":905,"updated":"2015-03-19 14:37:53.000000000","message":"I could have missed it, but I don\u0027t see anywhere that this is cleared after the cleaning is done. But it might not matter.","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":912,"context_line":"                  for step in step_list]"},{"line_number":913,"context_line":"    # Filter steps to only return deploy steps"},{"line_number":914,"context_line":"    steps \u003d [step for step in steps_list"},{"line_number":915,"context_line":"             if step.get(\u0027interface\u0027) \u003d\u003d \u0027deploy\u0027]"},{"line_number":916,"context_line":"    return steps"},{"line_number":917,"context_line":""},{"line_number":918,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_826930fa","line":915,"updated":"2015-03-19 14:37:53.000000000","message":"Just wondering. why just deploy steps? (Maybe I need to read the spec again.)","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"dfa331bc8e3f14008aa31f4425c3158ffb03decd","unresolved":false,"context_lines":[{"line_number":931,"context_line":"        task.context, task.node.id)"},{"line_number":932,"context_line":"    result \u003d client.execute_clean_step(step, task.node, ports)"},{"line_number":933,"context_line":"    if not result.get(\u0027command_status\u0027):"},{"line_number":934,"context_line":"        raise exception.NodeCleaningFailure(_LE("},{"line_number":935,"context_line":"            \u0027Agent on node %(node)s returned bad command result: \u0027"},{"line_number":936,"context_line":"            \u0027%(result)s\u0027) % {\u0027node\u0027: task.node.uuid,"},{"line_number":937,"context_line":"                             \u0027result\u0027: result.get(\u0027command_error\u0027)})"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_59ee4f23","line":934,"updated":"2015-03-19 13:34:14.000000000","message":"ditto","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":931,"context_line":"        task.context, task.node.id)"},{"line_number":932,"context_line":"    result \u003d client.execute_clean_step(step, task.node, ports)"},{"line_number":933,"context_line":"    if not result.get(\u0027command_status\u0027):"},{"line_number":934,"context_line":"        raise exception.NodeCleaningFailure(_LE("},{"line_number":935,"context_line":"            \u0027Agent on node %(node)s returned bad command result: \u0027"},{"line_number":936,"context_line":"            \u0027%(result)s\u0027) % {\u0027node\u0027: task.node.uuid,"},{"line_number":937,"context_line":"                             \u0027result\u0027: result.get(\u0027command_error\u0027)})"}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_edd9fd83","line":934,"updated":"2015-03-19 14:37:53.000000000","message":"exception strings should be _()","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"032c5d4f5144ff31fb4018850ac25af120e55c64","unresolved":false,"context_lines":[{"line_number":934,"context_line":"        raise exception.NodeCleaningFailure(_LE("},{"line_number":935,"context_line":"            \u0027Agent on node %(node)s returned bad command result: \u0027"},{"line_number":936,"context_line":"            \u0027%(result)s\u0027) % {\u0027node\u0027: task.node.uuid,"},{"line_number":937,"context_line":"                             \u0027result\u0027: result.get(\u0027command_error\u0027)})"},{"line_number":938,"context_line":"    return states.CLEANING"},{"line_number":939,"context_line":""},{"line_number":940,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9a80dd14_2db79522","line":937,"updated":"2015-03-19 14:37:53.000000000","message":"does the error include the cleaning step?","commit_id":"706e85b6167d4b26cd483251153542bf86d3028d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d1e4363564fe09e621f939714645c4547dcec0f0","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def _get_agent_client():"},{"line_number":77,"context_line":"    return agent_client.AgentClient()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"# All functions are called from deploy() directly or indirectly."}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_edf49d88","line":77,"updated":"2015-03-19 14:46:40.000000000","message":"doesn\u0027t look a helpful helper :) why not inline it?","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"9e86b18ae630a465220523220c8d8781cf7415dd","unresolved":false,"context_lines":[{"line_number":899,"context_line":"            \u0027get_clean_steps for node %(node)s returned invalid result:\u0027"},{"line_number":900,"context_line":"            \u0027 %(result)s\u0027) % ({\u0027node\u0027: task.node.uuid, \u0027result\u0027: result}))"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":"    driver_info \u003d task.node.driver_internal_info"},{"line_number":903,"context_line":"    driver_info[\u0027hardware_manager_version\u0027] \u003d result["},{"line_number":904,"context_line":"        \u0027hardware_manager_version\u0027]"},{"line_number":905,"context_line":"    task.node.driver_internal_info \u003d driver_info"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_08a63f54","line":902,"updated":"2015-03-19 15:07:42.000000000","message":"nit: better if it was driver_internal_info or internal_info.  we already have a field named driver_info which is not what is read here :)","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"}],"ironic/tests/drivers/test_agent.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d1e4363564fe09e621f939714645c4547dcec0f0","unresolved":false,"context_lines":[{"line_number":226,"context_line":"                             self.driver.prepare_cleaning(task))"},{"line_number":227,"context_line":"            prepare_mock.assert_called_once_with(task)"},{"line_number":228,"context_line":"            boot_mock.assert_called_once_with(task, ports)"},{"line_number":229,"context_line":"            create_mock.assert_called_once()"},{"line_number":230,"context_line":"            delete_mock.assert_called_once()"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"    @mock.patch(\u0027ironic.dhcp.neutron.NeutronDHCPApi.delete_cleaning_ports\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_ed22ddff","line":229,"updated":"2015-03-19 14:46:40.000000000","message":"s/assert_called_once/assert_called_once_with/ here and below, there\u0027s no assert_called_once","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"}],"ironic/tests/drivers/test_agent_base_vendor.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d1e4363564fe09e621f939714645c4547dcec0f0","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        with task_manager.acquire(self.context, self.node[\u0027uuid\u0027],"},{"line_number":425,"context_line":"                                  shared\u003dFalse) as task:"},{"line_number":426,"context_line":"            self.passthru.continue_cleaning(task)"},{"line_number":427,"context_line":"            notify_mock.assert_not_called()"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    @mock.patch(\u0027ironic.conductor.manager.cleaning_error_handler\u0027)"},{"line_number":430,"context_line":"    @mock.patch.object(agent_client.AgentClient, \u0027get_commands_status\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_ad5b8584","line":427,"updated":"2015-03-19 14:46:40.000000000","message":"IIRC it\u0027s\n\n self.assertFalse(notify_mock.called)","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"}],"ironic/tests/drivers/test_deploy_utils.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"667870d33405916210a5430725eb1a45c8abed38","unresolved":false,"context_lines":[{"line_number":1540,"context_line":""},{"line_number":1541,"context_line":"    @mock.patch(\u0027ironic.objects.Port.list_by_node_id\u0027)"},{"line_number":1542,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.deploy_utils._get_agent_client\u0027)"},{"line_number":1543,"context_line":"    def test_get_clean_steps(self, get_client_mock, list_ports_mock):"},{"line_number":1544,"context_line":"        client_mock \u003d mock.Mock()"},{"line_number":1545,"context_line":"        client_mock.get_clean_steps.return_value \u003d {"},{"line_number":1546,"context_line":"            \u0027command_result\u0027: self.clean_steps}"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_3613815d","line":1543,"updated":"2015-03-19 02:00:28.000000000","message":"It\u0027d be nice to have a test to verify the agent_erase_devices_priority config option is being honored.","commit_id":"61d835ee4d364c6babbc0f5d4aa5fba864fff0e0"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"649cb926c2e59d985b2f86619f19f4367d71fee7","unresolved":false,"context_lines":[{"line_number":1540,"context_line":""},{"line_number":1541,"context_line":"    @mock.patch(\u0027ironic.objects.Port.list_by_node_id\u0027)"},{"line_number":1542,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.deploy_utils._get_agent_client\u0027)"},{"line_number":1543,"context_line":"    def test_get_clean_steps(self, get_client_mock, list_ports_mock):"},{"line_number":1544,"context_line":"        client_mock \u003d mock.Mock()"},{"line_number":1545,"context_line":"        client_mock.get_clean_steps.return_value \u003d {"},{"line_number":1546,"context_line":"            \u0027command_result\u0027: self.clean_steps}"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_f6ac898a","line":1543,"in_reply_to":"9a80dd14_3613815d","updated":"2015-03-19 02:24:02.000000000","message":"Good call.","commit_id":"61d835ee4d364c6babbc0f5d4aa5fba864fff0e0"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"d1e4363564fe09e621f939714645c4547dcec0f0","unresolved":false,"context_lines":[{"line_number":1559,"context_line":"            # ordering"},{"line_number":1560,"context_line":"            self.assertEqual(2, len(response))"},{"line_number":1561,"context_line":"            self.assertTrue(self.clean_steps[\u0027clean_steps\u0027]["},{"line_number":1562,"context_line":"                                \u0027GenericHardwareManager\u0027][0] in response)"},{"line_number":1563,"context_line":"            self.assertTrue(self.clean_steps[\u0027clean_steps\u0027]["},{"line_number":1564,"context_line":"                                \u0027SpecificHardwareManager\u0027][0] in response)"},{"line_number":1565,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_cd01993a","line":1562,"updated":"2015-03-19 14:46:40.000000000","message":"self.assertIn","commit_id":"74415457dfe6d7ceb76af24a345e9d4cacb2c388"}]}
