)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"211a7b228f7ff81aeddfbb3c9aac8c1f8f560b21","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This implements executing the clean steps in the conductor. It adds the"},{"line_number":10,"context_line":"Node.clean_step to track the current clean step. The RPC API version"},{"line_number":11,"context_line":"is bumped to 1.24 to allow async clean steps to call back to the"},{"line_number":12,"context_line":"conductor."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The conductor will get a list of clean steps from the node\u0027s drivers,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ba7be1f8_b0012eb1","line":11,"updated":"2015-02-24 18:06:05.000000000","message":"1.24 will conflict with https://review.openstack.org/#/c/149823","commit_id":"ac9e345700d1a696618491feb5ef021b88f9f288"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b7af426ca3a8b77c6a40ad96bed5a621988180aa","unresolved":false,"context_lines":[{"line_number":16,"context_line":"in order."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Adds a config option to skip cleaning in all cases, defaulting to"},{"line_number":19,"context_line":"False for Kilo, with a plan to default it to True in L (after it"},{"line_number":20,"context_line":"has been tested more and more drivers support it)."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Adding support in the drivers will be added in a follow up patch."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba7be1f8_0ae1b4d0","line":19,"updated":"2015-02-25 18:19:29.000000000","message":"This seems like it is backward.  Am I wrong?\n\nIt says \u0027skip cleaning\u0027","commit_id":"4c00a6d6e9757d306292bb8dddfb4ccc6a34393e"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"eba8bf3d111ee2568dbef54625cd030fb617a0e8","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implement execute clean steps"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This implements executing the clean steps in the conductor. The RPC "},{"line_number":10,"context_line":"API version is bumped to 1.24 to allow async clean steps to call back "},{"line_number":11,"context_line":"to the conductor."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_a8e17e2b","line":9,"updated":"2015-02-26 04:33:13.000000000","message":"nit: trailing whitespace and next line.","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"eba8bf3d111ee2568dbef54625cd030fb617a0e8","unresolved":false,"context_lines":[{"line_number":17,"context_line":"in order."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Adds a config option to skip cleaning in all cases, defaulting to"},{"line_number":20,"context_line":"False for Kilo, with a plan to default it to True in L (after it"},{"line_number":21,"context_line":"has been tested more and more drivers support it)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Implements blueprint implement-cleaning-states"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_68db067c","line":20,"updated":"2015-02-26 04:33:13.000000000","message":"This seems like it is backward. Am I wrong?\n\nIt says \u0027skip cleaning\u0027","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":17,"context_line":"in order."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Adds a config option to skip cleaning in all cases, defaulting to"},{"line_number":20,"context_line":"False for Kilo, with a plan to default it to True in L (after it"},{"line_number":21,"context_line":"has been tested more and more drivers support it)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Implements blueprint implement-cleaning-states"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba7be1f8_311cf277","line":20,"in_reply_to":"ba7be1f8_68db067c","updated":"2015-02-26 23:57:15.000000000","message":"Thanks, the config option is actually clean_nodes, so the True and False were correct, just not the skip cleaning part.","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4fe62e96421d8432dddea703288527d63448910f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"in order."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Adds a config option to enable cleaning, defaulting to"},{"line_number":20,"context_line":"False for Kilo, with a plan to default it to True in L (after it"},{"line_number":21,"context_line":"has been tested more and more drivers support it)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Implements blueprint implement-cleaning-states"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"ba7be1f8_bcf16b97","line":20,"updated":"2015-02-27 17:47:19.000000000","message":"+1!","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Implement execute clean steps"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This implements executing the clean steps in the conductor. The RPC"},{"line_number":10,"context_line":"API version is bumped to 1.24 to allow async clean steps to call back"},{"line_number":11,"context_line":"to the conductor."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Adds node.clean_step to store the current cleaning operation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9a80dd14_1ba19df8","line":10,"updated":"2015-03-05 03:22:41.000000000","message":"actually, it is 1.25 in this revision. I suggest s/bumped to 1.24/bumped/ so you don\u0027t have to keep this in sync with the code ;)\n\nOr maybe \u0027incremented\u0027 in case people don\u0027t understand \u0027bumped\u0027.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"60da89eb6a64193e18c6521eaf730fcffa0e4cdb","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Implement execute clean steps"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This implements executing the clean steps in the conductor. The RPC"},{"line_number":10,"context_line":"API version is bumped to 1.24 to allow async clean steps to call back"},{"line_number":11,"context_line":"to the conductor."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Adds node.clean_step to store the current cleaning operation."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"9a80dd14_5421f14b","line":10,"updated":"2015-03-05 21:57:49.000000000","message":"bumped to 1.25","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9f128ebbd2b3963b6829c16bf6ff646a71945c21","unresolved":false,"context_lines":[{"line_number":17,"context_line":"in order."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Adds a config option to enable cleaning, defaulting to"},{"line_number":20,"context_line":"False for Kilo, with a plan to default it to True in L (after it"},{"line_number":21,"context_line":"has been tested more and more drivers support it)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Implements blueprint implement-cleaning-states"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"9a80dd14_3c326910","line":20,"updated":"2015-03-13 11:29:29.000000000","message":"Since it\u0027s non-op on base class why not enable it by default?\n\nEven if we were doing some cleaning steps instead of non-op, the fact that by default Ironic won\u0027t erase the user data after the node is used could be consider a bug. I think that\u0027s an important security default/fix.","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"0c0b52cb1397c4d3ce70448edbf1e8fe6b6bb348","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Adds a config option to enable cleaning, defaulting to"},{"line_number":20,"context_line":"False for Kilo, with a plan to default it to True in L (after it"},{"line_number":21,"context_line":"has been tested more and more drivers support it)."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Implements blueprint implement-cleaning-states"},{"line_number":24,"context_line":"Change-Id: I96af133c501f86a6e620c4684ee65abad2111f7b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"9a80dd14_7fb20ee6","line":21,"updated":"2015-03-13 13:53:08.000000000","message":"the concern I have is the above line. though I was not thinking of the security aspect, only because we have not done this before. This is a conf setting and easily changeable so either is option is good with me.","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"}],"etc/ironic/ironic.conf.sample":[{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"f152f8c891d3f3af8115c8e053cc1c82ad18942d","unresolved":false,"context_lines":[{"line_number":613,"context_line":"#inspect_timeout\u003d1800"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"# Whether Ironic will attempt to \"clean\" a node between"},{"line_number":616,"context_line":"# workloads and when moving from MANAGEABLE to AVAILABLE or"},{"line_number":617,"context_line":"# DELETING to AVAILABLE. Cleaning is a configurable set of"},{"line_number":618,"context_line":"# steps, such as erasing disk drives, that are performed on"},{"line_number":619,"context_line":"# the node to ensure it is in a baseline state and ready to be"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"9a80dd14_a2f0d8c9","line":616,"updated":"2015-03-09 09:58:30.000000000","message":"it doesn\u0027t seem up-to-date with code. need to update the conf file again","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":613,"context_line":"#inspect_timeout\u003d1800"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"# Whether Ironic will attempt to \"clean\" a node between"},{"line_number":616,"context_line":"# workloads and when moving from MANAGEABLE to AVAILABLE or"},{"line_number":617,"context_line":"# DELETING to AVAILABLE. Cleaning is a configurable set of"},{"line_number":618,"context_line":"# steps, such as erasing disk drives, that are performed on"},{"line_number":619,"context_line":"# the node to ensure it is in a baseline state and ready to be"}],"source_content_type":"application/octet-stream","patch_set":14,"id":"9a80dd14_96f6728f","line":616,"in_reply_to":"9a80dd14_a2f0d8c9","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"}],"ironic/conductor/manager.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7c36707f3879368d25f73c859192f036287cd281","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    # Highest priority is executed first, in the event of a step priority tie"},{"line_number":183,"context_line":"    \u0027power\u0027: 3,"},{"line_number":184,"context_line":"    \u0027management\u0027: 2,"},{"line_number":185,"context_line":"    \u0027deploy\u0027: 1"},{"line_number":186,"context_line":"}"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_c158dd34","line":185,"updated":"2015-02-23 10:33:00.000000000","message":"priority is chosen per driver and not per step?","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":182,"context_line":"    # Highest priority is executed first, in the event of a step priority tie"},{"line_number":183,"context_line":"    \u0027power\u0027: 3,"},{"line_number":184,"context_line":"    \u0027management\u0027: 2,"},{"line_number":185,"context_line":"    \u0027deploy\u0027: 1"},{"line_number":186,"context_line":"}"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_d396d7ef","line":185,"in_reply_to":"ba7be1f8_c158dd34","updated":"2015-02-24 01:59:10.000000000","message":"This is for ties in priority between drivers, I\u0027ll update the comments.","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7c36707f3879368d25f73c859192f036287cd281","unresolved":false,"context_lines":[{"line_number":805,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":806,"context_line":"                 async task"},{"line_number":807,"context_line":"        :raises: InvalidStateRequested when the requested state is not a valid"},{"line_number":808,"context_line":"                 target from the current state."},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"        \"\"\""},{"line_number":811,"context_line":"        LOG.debug(\"RPC do_node_clean called for node %s.\" % node_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_c63c73e5","line":808,"updated":"2015-02-23 10:33:00.000000000","message":"nit: can raise NodeLocked too","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":805,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":806,"context_line":"                 async task"},{"line_number":807,"context_line":"        :raises: InvalidStateRequested when the requested state is not a valid"},{"line_number":808,"context_line":"                 target from the current state."},{"line_number":809,"context_line":""},{"line_number":810,"context_line":"        \"\"\""},{"line_number":811,"context_line":"        LOG.debug(\"RPC do_node_clean called for node %s.\" % node_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_bd020c09","line":808,"in_reply_to":"ba7be1f8_c63c73e5","updated":"2015-02-24 01:59:10.000000000","message":"Done","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"7386ad910020d5caf4224fe961509fe6f94f51ed","unresolved":false,"context_lines":[{"line_number":815,"context_line":""},{"line_number":816,"context_line":"    def _do_node_clean(self, task):"},{"line_number":817,"context_line":"        \"\"\"Internal RPC method to perform automated cleaning of a node.\"\"\""},{"line_number":818,"context_line":"        if not CONF.clean_nodes:"},{"line_number":819,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":820,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %S to AVAILABLE.\u0027) %"},{"line_number":821,"context_line":"                     task.node.uuid)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_7ad55742","line":818,"updated":"2015-02-20 09:04:10.000000000","message":"it should be CONF.conductor.clean_nodes?","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7c36707f3879368d25f73c859192f036287cd281","unresolved":false,"context_lines":[{"line_number":815,"context_line":""},{"line_number":816,"context_line":"    def _do_node_clean(self, task):"},{"line_number":817,"context_line":"        \"\"\"Internal RPC method to perform automated cleaning of a node.\"\"\""},{"line_number":818,"context_line":"        if not CONF.clean_nodes:"},{"line_number":819,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":820,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %S to AVAILABLE.\u0027) %"},{"line_number":821,"context_line":"                     task.node.uuid)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_864b5b86","line":818,"in_reply_to":"ba7be1f8_7ad55742","updated":"2015-02-23 10:33:00.000000000","message":"+1","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":815,"context_line":""},{"line_number":816,"context_line":"    def _do_node_clean(self, task):"},{"line_number":817,"context_line":"        \"\"\"Internal RPC method to perform automated cleaning of a node.\"\"\""},{"line_number":818,"context_line":"        if not CONF.clean_nodes:"},{"line_number":819,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":820,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %S to AVAILABLE.\u0027) %"},{"line_number":821,"context_line":"                     task.node.uuid)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_38254aab","line":818,"in_reply_to":"ba7be1f8_864b5b86","updated":"2015-02-24 01:59:10.000000000","message":"Done","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7c36707f3879368d25f73c859192f036287cd281","unresolved":false,"context_lines":[{"line_number":831,"context_line":"                \"Can not clean instance. Error: %(msg)s\") % {\u0027msg\u0027: e})"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        # Get the prioritized steps, store them."},{"line_number":834,"context_line":"        task.node.driver_info[\u0027clean_steps\u0027] \u003d _get_cleaning_steps("},{"line_number":835,"context_line":"            task)"},{"line_number":836,"context_line":"        steps \u003d task.node.driver_info[\u0027clean_steps\u0027]"},{"line_number":837,"context_line":"        self._do_clean_step(task, steps, last_step\u003dtask.node.clean_step)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_26738fe8","line":834,"updated":"2015-02-23 10:33:00.000000000","message":"I wonder if we should use driver_internal_info for to keep the tasks","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":831,"context_line":"                \"Can not clean instance. Error: %(msg)s\") % {\u0027msg\u0027: e})"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        # Get the prioritized steps, store them."},{"line_number":834,"context_line":"        task.node.driver_info[\u0027clean_steps\u0027] \u003d _get_cleaning_steps("},{"line_number":835,"context_line":"            task)"},{"line_number":836,"context_line":"        steps \u003d task.node.driver_info[\u0027clean_steps\u0027]"},{"line_number":837,"context_line":"        self._do_clean_step(task, steps, last_step\u003dtask.node.clean_step)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_425ccf25","line":834,"in_reply_to":"ba7be1f8_26738fe8","updated":"2015-02-24 01:59:10.000000000","message":"I think that makes sense. Operators will have an API endpoint to see the list of cleaning steps for a node, no point in digging around in the DB for it.","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"460057d493bf7ceab15ebbe8a4e77f7a779e05fe","unresolved":false,"context_lines":[{"line_number":834,"context_line":"        task.node.driver_info[\u0027clean_steps\u0027] \u003d _get_cleaning_steps("},{"line_number":835,"context_line":"            task)"},{"line_number":836,"context_line":"        steps \u003d task.node.driver_info[\u0027clean_steps\u0027]"},{"line_number":837,"context_line":"        self._do_clean_step(task, steps, last_step\u003dtask.node.clean_step)"},{"line_number":838,"context_line":""},{"line_number":839,"context_line":"    def _do_next_clean_step(self, task, steps, last_step\u003dNone):"},{"line_number":840,"context_line":"        \"\"\"Execute next clean or zap step."}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_de64e5e6","line":837,"updated":"2015-02-18 13:26:11.000000000","message":"i think you meant _do_next_clean_step?","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":834,"context_line":"        task.node.driver_info[\u0027clean_steps\u0027] \u003d _get_cleaning_steps("},{"line_number":835,"context_line":"            task)"},{"line_number":836,"context_line":"        steps \u003d task.node.driver_info[\u0027clean_steps\u0027]"},{"line_number":837,"context_line":"        self._do_clean_step(task, steps, last_step\u003dtask.node.clean_step)"},{"line_number":838,"context_line":""},{"line_number":839,"context_line":"    def _do_next_clean_step(self, task, steps, last_step\u003dNone):"},{"line_number":840,"context_line":"        \"\"\"Execute next clean or zap step."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_826407e6","line":837,"in_reply_to":"ba7be1f8_e67177e1","updated":"2015-02-24 01:59:10.000000000","message":"Done","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7c36707f3879368d25f73c859192f036287cd281","unresolved":false,"context_lines":[{"line_number":834,"context_line":"        task.node.driver_info[\u0027clean_steps\u0027] \u003d _get_cleaning_steps("},{"line_number":835,"context_line":"            task)"},{"line_number":836,"context_line":"        steps \u003d task.node.driver_info[\u0027clean_steps\u0027]"},{"line_number":837,"context_line":"        self._do_clean_step(task, steps, last_step\u003dtask.node.clean_step)"},{"line_number":838,"context_line":""},{"line_number":839,"context_line":"    def _do_next_clean_step(self, task, steps, last_step\u003dNone):"},{"line_number":840,"context_line":"        \"\"\"Execute next clean or zap step."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_e67177e1","line":837,"in_reply_to":"da86d52c_de64e5e6","updated":"2015-02-23 10:33:00.000000000","message":"+1","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"7386ad910020d5caf4224fe961509fe6f94f51ed","unresolved":false,"context_lines":[{"line_number":861,"context_line":"        for step in steps:"},{"line_number":862,"context_line":"            # Save which step we\u0027re about to start so we can restart"},{"line_number":863,"context_line":"            # if necessary"},{"line_number":864,"context_line":"            task.node.clean_step \u003d (\"(%(driver)s.%(step)s\" %"},{"line_number":865,"context_line":"                                    {\u0027driver\u0027: step.driver,"},{"line_number":866,"context_line":"                                     \u0027step\u0027: step.step})"},{"line_number":867,"context_line":"            task.node.save()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_9a584bfc","line":864,"updated":"2015-02-20 09:04:10.000000000","message":"extra \u0027 ( \u0027 here","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":861,"context_line":"        for step in steps:"},{"line_number":862,"context_line":"            # Save which step we\u0027re about to start so we can restart"},{"line_number":863,"context_line":"            # if necessary"},{"line_number":864,"context_line":"            task.node.clean_step \u003d (\"(%(driver)s.%(step)s\" %"},{"line_number":865,"context_line":"                                    {\u0027driver\u0027: step.driver,"},{"line_number":866,"context_line":"                                     \u0027step\u0027: step.step})"},{"line_number":867,"context_line":"            task.node.save()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_a263cbda","line":864,"in_reply_to":"ba7be1f8_2147f91e","updated":"2015-02-24 01:59:10.000000000","message":"Done","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7c36707f3879368d25f73c859192f036287cd281","unresolved":false,"context_lines":[{"line_number":861,"context_line":"        for step in steps:"},{"line_number":862,"context_line":"            # Save which step we\u0027re about to start so we can restart"},{"line_number":863,"context_line":"            # if necessary"},{"line_number":864,"context_line":"            task.node.clean_step \u003d (\"(%(driver)s.%(step)s\" %"},{"line_number":865,"context_line":"                                    {\u0027driver\u0027: step.driver,"},{"line_number":866,"context_line":"                                     \u0027step\u0027: step.step})"},{"line_number":867,"context_line":"            task.node.save()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_2147f91e","line":864,"in_reply_to":"ba7be1f8_9a584bfc","updated":"2015-02-23 10:33:00.000000000","message":"+1","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"7386ad910020d5caf4224fe961509fe6f94f51ed","unresolved":false,"context_lines":[{"line_number":869,"context_line":"            driver \u003d getattr(task.driver, step.driver)"},{"line_number":870,"context_line":"            execute_clean_step \u003d getattr(driver, \u0027execute_clean_step\u0027)"},{"line_number":871,"context_line":"            try:"},{"line_number":872,"context_line":"                result \u003d execute_clean_step(step.step)"},{"line_number":873,"context_line":"            except Exception as e:"},{"line_number":874,"context_line":"                task.node.last_error \u003d \u0027Node failed cleaning: %s\u0027 % e"},{"line_number":875,"context_line":"                task.process_event(\u0027fail\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_ba5d0fec","line":872,"updated":"2015-02-20 09:04:10.000000000","message":"should send only step, not step.step","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":869,"context_line":"            driver \u003d getattr(task.driver, step.driver)"},{"line_number":870,"context_line":"            execute_clean_step \u003d getattr(driver, \u0027execute_clean_step\u0027)"},{"line_number":871,"context_line":"            try:"},{"line_number":872,"context_line":"                result \u003d execute_clean_step(step.step)"},{"line_number":873,"context_line":"            except Exception as e:"},{"line_number":874,"context_line":"                task.node.last_error \u003d \u0027Node failed cleaning: %s\u0027 % e"},{"line_number":875,"context_line":"                task.process_event(\u0027fail\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_187ec66b","line":872,"in_reply_to":"ba7be1f8_ba5d0fec","updated":"2015-02-24 01:59:10.000000000","message":"Done","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"7386ad910020d5caf4224fe961509fe6f94f51ed","unresolved":false,"context_lines":[{"line_number":876,"context_line":""},{"line_number":877,"context_line":"            # Check if the step is done or not. The step should return"},{"line_number":878,"context_line":"            # states.CLEANING if the step was completed, anything else if not."},{"line_number":879,"context_line":"            if result !\u003d states.CLEANING:"},{"line_number":880,"context_line":"                # Kill this worker, the async step will RPC call back to this"},{"line_number":881,"context_line":"                # method to continue when"},{"line_number":882,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_9a268b67","line":879,"updated":"2015-02-20 09:04:10.000000000","message":"result should be declared outside try to use it here","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":876,"context_line":""},{"line_number":877,"context_line":"            # Check if the step is done or not. The step should return"},{"line_number":878,"context_line":"            # states.CLEANING if the step was completed, anything else if not."},{"line_number":879,"context_line":"            if result !\u003d states.CLEANING:"},{"line_number":880,"context_line":"                # Kill this worker, the async step will RPC call back to this"},{"line_number":881,"context_line":"                # method to continue when"},{"line_number":882,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_42aa0fd5","line":879,"in_reply_to":"ba7be1f8_9a268b67","updated":"2015-02-24 01:59:10.000000000","message":"Ahh, I\u0027m missing a return after task.process_event(\u0027fail\u0027), which should guarantee result is defined on line 872.","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"7386ad910020d5caf4224fe961509fe6f94f51ed","unresolved":false,"context_lines":[{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"def _compare_clean_steps(step1, step2):"},{"line_number":1793,"context_line":""},{"line_number":1794,"context_line":"        if step1.driver \u003d\u003d step2.driver:"},{"line_number":1795,"context_line":"            return (CLEANING_DRIVER_PRIORITY[step1.driver] -"},{"line_number":1796,"context_line":"                    CLEANING_DRIVER_PRIORITY[step2.driver])"},{"line_number":1797,"context_line":"        return step1.priority - step2.priority"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_1a761b3f","line":1794,"updated":"2015-02-20 09:04:10.000000000","message":"step1.priority \u003d\u003d step2.priority","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"def _compare_clean_steps(step1, step2):"},{"line_number":1793,"context_line":""},{"line_number":1794,"context_line":"        if step1.driver \u003d\u003d step2.driver:"},{"line_number":1795,"context_line":"            return (CLEANING_DRIVER_PRIORITY[step1.driver] -"},{"line_number":1796,"context_line":"                    CLEANING_DRIVER_PRIORITY[step2.driver])"},{"line_number":1797,"context_line":"        return step1.priority - step2.priority"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_58975e90","line":1794,"in_reply_to":"ba7be1f8_1a761b3f","updated":"2015-02-24 01:59:10.000000000","message":"Done","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"211a7b228f7ff81aeddfbb3c9aac8c1f8f560b21","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    \"\"\"Ironic Conductor manager main class.\"\"\""},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    # NOTE(rloo): This must be in sync with rpcapi.ConductorAPI\u0027s."},{"line_number":195,"context_line":"    RPC_API_VERSION \u003d \u00271.24\u0027"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_10903a49","line":195,"updated":"2015-02-24 18:06:05.000000000","message":"see comment on commit message","commit_id":"ac9e345700d1a696618491feb5ef021b88f9f288"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"2f54d3d40a1a83dfe43cf78e153635d28662337c","unresolved":false,"context_lines":[{"line_number":1815,"context_line":"def _get_cleaning_steps(task):"},{"line_number":1816,"context_line":"    steps \u003d list()"},{"line_number":1817,"context_line":""},{"line_number":1818,"context_line":"    steps.append(task.driver.power.get_clean_steps())"},{"line_number":1819,"context_line":"    steps.append(task.driver.management.get_clean_steps())"},{"line_number":1820,"context_line":"    steps.append(task.driver.deploy.get_clean_steps())"},{"line_number":1821,"context_line":"    return sorted(steps, key\u003dfunctools.cmp_to_key("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_59ae7686","line":1818,"updated":"2015-02-24 10:28:12.000000000","message":"append doesn\u0027t work here , as it appends the lists itself as get_clean_steps returns list in each case . As it needs to be merged as single list + operator should be fine i guess ?","commit_id":"ac9e345700d1a696618491feb5ef021b88f9f288"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"60b0dab1d6c66f6309d943b6b89e1265dc5a25b1","unresolved":false,"context_lines":[{"line_number":1815,"context_line":"def _get_cleaning_steps(task):"},{"line_number":1816,"context_line":"    steps \u003d list()"},{"line_number":1817,"context_line":""},{"line_number":1818,"context_line":"    steps.append(task.driver.power.get_clean_steps())"},{"line_number":1819,"context_line":"    steps.append(task.driver.management.get_clean_steps())"},{"line_number":1820,"context_line":"    steps.append(task.driver.deploy.get_clean_steps())"},{"line_number":1821,"context_line":"    return sorted(steps, key\u003dfunctools.cmp_to_key("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_40b3b909","line":1818,"in_reply_to":"ba7be1f8_59ae7686","updated":"2015-02-25 17:21:31.000000000","message":"Heh that\u0027s what I get for writing code without tests. Fixed.","commit_id":"ac9e345700d1a696618491feb5ef021b88f9f288"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"2f54d3d40a1a83dfe43cf78e153635d28662337c","unresolved":false,"context_lines":[{"line_number":1819,"context_line":"    steps.append(task.driver.management.get_clean_steps())"},{"line_number":1820,"context_line":"    steps.append(task.driver.deploy.get_clean_steps())"},{"line_number":1821,"context_line":"    return sorted(steps, key\u003dfunctools.cmp_to_key("},{"line_number":1822,"context_line":"        _compare_clean_steps))"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_99de2e10","line":1822,"updated":"2015-02-24 10:28:12.000000000","message":"might want to use reverse \u003d True here , if the highest priority step needs to be executed first","commit_id":"ac9e345700d1a696618491feb5ef021b88f9f288"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        cfg.BoolOpt(\u0027clean_nodes\u0027,"},{"line_number":167,"context_line":"                    default\u003dFalse,"},{"line_number":168,"context_line":"                    help\u003d\u0027Whether Ironic will attempt to \"clean\" a node \u0027"},{"line_number":169,"context_line":"                         \u0027between workloads and when moving from MANAGEABLE \u0027"},{"line_number":170,"context_line":"                         \u0027to AVAILABLE. Cleaning is a configurable set of \u0027"},{"line_number":171,"context_line":"                         \u0027steps, such as erasing disk drives, that are \u0027"},{"line_number":172,"context_line":"                         \u0027performed on the node to ensure it is in a baseline \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_de31085b","line":169,"updated":"2015-02-26 13:35:43.000000000","message":"DELETING to AVAILABLE or \nMANAGEABLE to AVAILABLE","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        cfg.BoolOpt(\u0027clean_nodes\u0027,"},{"line_number":167,"context_line":"                    default\u003dFalse,"},{"line_number":168,"context_line":"                    help\u003d\u0027Whether Ironic will attempt to \"clean\" a node \u0027"},{"line_number":169,"context_line":"                         \u0027between workloads and when moving from MANAGEABLE \u0027"},{"line_number":170,"context_line":"                         \u0027to AVAILABLE. Cleaning is a configurable set of \u0027"},{"line_number":171,"context_line":"                         \u0027steps, such as erasing disk drives, that are \u0027"},{"line_number":172,"context_line":"                         \u0027performed on the node to ensure it is in a baseline \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_7cb801e6","line":169,"in_reply_to":"ba7be1f8_de31085b","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"11feaf5fcdadf53e20b34b5723e48d1f4fb67d73","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                         \u0027steps, such as erasing disk drives, that are \u0027"},{"line_number":172,"context_line":"                         \u0027performed on the node to ensure it is in a baseline \u0027"},{"line_number":173,"context_line":"                         \u0027state and ready to be deployed to. See the \u0027"},{"line_number":174,"context_line":"                         \u0027individual driver\\\u0027s documentation for supported \u0027"},{"line_number":175,"context_line":"                         \u0027cleaning steps.\u0027),"},{"line_number":176,"context_line":"]"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_680a2627","line":174,"updated":"2015-02-26 07:24:23.000000000","message":":nit: remove \\","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"f37eadc80f84ac65e7f653f39f74fbaeb74ccad6","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                         \u0027steps, such as erasing disk drives, that are \u0027"},{"line_number":172,"context_line":"                         \u0027performed on the node to ensure it is in a baseline \u0027"},{"line_number":173,"context_line":"                         \u0027state and ready to be deployed to. See the \u0027"},{"line_number":174,"context_line":"                         \u0027individual driver\\\u0027s documentation for supported \u0027"},{"line_number":175,"context_line":"                         \u0027cleaning steps.\u0027),"},{"line_number":176,"context_line":"]"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_c83dc0de","line":174,"in_reply_to":"ba7be1f8_31adeee9","updated":"2015-02-26 13:43:53.000000000","message":"right . sorry :P","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                         \u0027steps, such as erasing disk drives, that are \u0027"},{"line_number":172,"context_line":"                         \u0027performed on the node to ensure it is in a baseline \u0027"},{"line_number":173,"context_line":"                         \u0027state and ready to be deployed to. See the \u0027"},{"line_number":174,"context_line":"                         \u0027individual driver\\\u0027s documentation for supported \u0027"},{"line_number":175,"context_line":"                         \u0027cleaning steps.\u0027),"},{"line_number":176,"context_line":"]"},{"line_number":177,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_31adeee9","line":174,"in_reply_to":"ba7be1f8_680a2627","updated":"2015-02-26 10:28:14.000000000","message":"it\u0027s escaping \u0027 in \u0027\u0027 string, how do you suggest to remove it?","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":178,"context_line":"CONF \u003d cfg.CONF"},{"line_number":179,"context_line":"CONF.register_opts(conductor_opts, \u0027conductor\u0027)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"CLEANING_DRIVER_PRIORITY \u003d {"},{"line_number":182,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":183,"context_line":"    # by which driver is implementing the clean step. The step with highest"},{"line_number":184,"context_line":"    # cleaning driver priority is executed first in that case."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_8831085c","line":181,"updated":"2015-02-26 13:35:43.000000000","message":"s/DRIVER/INTERFACE here as well :)","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":178,"context_line":"CONF \u003d cfg.CONF"},{"line_number":179,"context_line":"CONF.register_opts(conductor_opts, \u0027conductor\u0027)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"CLEANING_DRIVER_PRIORITY \u003d {"},{"line_number":182,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":183,"context_line":"    # by which driver is implementing the clean step. The step with highest"},{"line_number":184,"context_line":"    # cleaning driver priority is executed first in that case."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_1c870514","line":181,"in_reply_to":"ba7be1f8_8831085c","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":181,"context_line":"CLEANING_DRIVER_PRIORITY \u003d {"},{"line_number":182,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":183,"context_line":"    # by which driver is implementing the clean step. The step with highest"},{"line_number":184,"context_line":"    # cleaning driver priority is executed first in that case."},{"line_number":185,"context_line":"    \u0027power\u0027: 3,"},{"line_number":186,"context_line":"    \u0027management\u0027: 2,"},{"line_number":187,"context_line":"    \u0027deploy\u0027: 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_518fc274","line":184,"updated":"2015-02-26 10:28:14.000000000","message":"s/driver/interface/ here","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":181,"context_line":"CLEANING_DRIVER_PRIORITY \u003d {"},{"line_number":182,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":183,"context_line":"    # by which driver is implementing the clean step. The step with highest"},{"line_number":184,"context_line":"    # cleaning driver priority is executed first in that case."},{"line_number":185,"context_line":"    \u0027power\u0027: 3,"},{"line_number":186,"context_line":"    \u0027management\u0027: 2,"},{"line_number":187,"context_line":"    \u0027deploy\u0027: 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_7c864115","line":184,"in_reply_to":"ba7be1f8_518fc274","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":184,"context_line":"    # cleaning driver priority is executed first in that case."},{"line_number":185,"context_line":"    \u0027power\u0027: 3,"},{"line_number":186,"context_line":"    \u0027management\u0027: 2,"},{"line_number":187,"context_line":"    \u0027deploy\u0027: 1"},{"line_number":188,"context_line":"}"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_31940e8a","line":187,"updated":"2015-02-26 10:28:14.000000000","message":"I wonder if we need more interfaces here. Like I can imaging inspect interface do short sanity check on existing RAM vs recorded RAM","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":184,"context_line":"    # cleaning driver priority is executed first in that case."},{"line_number":185,"context_line":"    \u0027power\u0027: 3,"},{"line_number":186,"context_line":"    \u0027management\u0027: 2,"},{"line_number":187,"context_line":"    \u0027deploy\u0027: 1"},{"line_number":188,"context_line":"}"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_bc8439b2","line":187,"in_reply_to":"ba7be1f8_31940e8a","updated":"2015-02-26 23:57:15.000000000","message":"I\u0027m more than open to adding more (RAID will definitely need it for zapping), but they can easily be follow up patches while adding their clean_steps to the interfaces.","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":809,"context_line":""},{"line_number":810,"context_line":"        :param context: an admin context."},{"line_number":811,"context_line":"        :param node_id: the id or uuid of a node."},{"line_number":812,"context_line":"        :raises: InstanceDeployFailure"},{"line_number":813,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":814,"context_line":"                 async task"},{"line_number":815,"context_line":"        :raises: InvalidStateRequested when the requested state is not a valid"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_b1d63e4d","line":812,"updated":"2015-02-26 10:28:14.000000000","message":"s/Deploy/Clean/","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":809,"context_line":""},{"line_number":810,"context_line":"        :param context: an admin context."},{"line_number":811,"context_line":"        :param node_id: the id or uuid of a node."},{"line_number":812,"context_line":"        :raises: InstanceDeployFailure"},{"line_number":813,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":814,"context_line":"                 async task"},{"line_number":815,"context_line":"        :raises: InvalidStateRequested when the requested state is not a valid"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_7cbac16f","line":812,"in_reply_to":"ba7be1f8_b1d63e4d","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":813,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":814,"context_line":"                 async task"},{"line_number":815,"context_line":"        :raises: InvalidStateRequested when the requested state is not a valid"},{"line_number":816,"context_line":"                 target from the current state."},{"line_number":817,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_114e2a3b","line":816,"updated":"2015-02-26 10:28:14.000000000","message":"not sure this can be raised","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":813,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":814,"context_line":"                 async task"},{"line_number":815,"context_line":"        :raises: InvalidStateRequested when the requested state is not a valid"},{"line_number":816,"context_line":"                 target from the current state."},{"line_number":817,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_dca80d23","line":816,"in_reply_to":"ba7be1f8_114e2a3b","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":817,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"        \"\"\""},{"line_number":820,"context_line":"        LOG.debug(\"RPC do_node_clean called for node %s.\" % node_id)"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":823,"context_line":"            if task.node.provision_state !\u003d states.CLEANING:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_0893585b","line":820,"updated":"2015-02-26 13:35:43.000000000","message":"s/do_node_clean/continue_node_clean","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":817,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"        \"\"\""},{"line_number":820,"context_line":"        LOG.debug(\"RPC do_node_clean called for node %s.\" % node_id)"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":823,"context_line":"            if task.node.provision_state !\u003d states.CLEANING:"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_57087628","line":820,"in_reply_to":"ba7be1f8_0893585b","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":821,"context_line":""},{"line_number":822,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":823,"context_line":"            if task.node.provision_state !\u003d states.CLEANING:"},{"line_number":824,"context_line":"                raise exception.InstanceCleanFailure(_("},{"line_number":825,"context_line":"                    \u0027Cannot continue cleaning on %(node)s, node is in \u0027"},{"line_number":826,"context_line":"                    \u0027%(state)s state, should be states.CLEANING\u0027) %"},{"line_number":827,"context_line":"                    {\u0027node\u0027: task.node.uuid,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_7129269a","line":824,"updated":"2015-02-26 13:35:43.000000000","message":"Does this come under InstanceCleanFailure ? somebody just sent a bad rpc message. may be InvalidStateRequested or WrongProvisionState, something like that ?","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":821,"context_line":""},{"line_number":822,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":823,"context_line":"            if task.node.provision_state !\u003d states.CLEANING:"},{"line_number":824,"context_line":"                raise exception.InstanceCleanFailure(_("},{"line_number":825,"context_line":"                    \u0027Cannot continue cleaning on %(node)s, node is in \u0027"},{"line_number":826,"context_line":"                    \u0027%(state)s state, should be states.CLEANING\u0027) %"},{"line_number":827,"context_line":"                    {\u0027node\u0027: task.node.uuid,"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_d749c661","line":824,"in_reply_to":"ba7be1f8_7129269a","updated":"2015-02-26 23:57:15.000000000","message":"InvalidStateRequested (400 error code) seems reasonable","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":835,"context_line":""},{"line_number":836,"context_line":"        if not CONF.conductor.clean_nodes:"},{"line_number":837,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":838,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %s to AVAILABLE.\u0027) %"},{"line_number":839,"context_line":"                     node.uuid)"},{"line_number":840,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":841,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_68b934cb","line":838,"updated":"2015-02-26 13:35:43.000000000","message":"May be just clear off task.node.clean_step and task.node.driver_internal_info[\u0027clean_steps\u0027]. Just thinking of scenario where cleaning was enabled before a conductor restart and got disabled afterwards.","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":835,"context_line":""},{"line_number":836,"context_line":"        if not CONF.conductor.clean_nodes:"},{"line_number":837,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":838,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %s to AVAILABLE.\u0027) %"},{"line_number":839,"context_line":"                     node.uuid)"},{"line_number":840,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":841,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_d15732c8","line":838,"updated":"2015-02-26 10:28:14.000000000","message":"nit: s/%/,/","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":835,"context_line":""},{"line_number":836,"context_line":"        if not CONF.conductor.clean_nodes:"},{"line_number":837,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":838,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %s to AVAILABLE.\u0027) %"},{"line_number":839,"context_line":"                     node.uuid)"},{"line_number":840,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":841,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_f7b40a37","line":838,"in_reply_to":"ba7be1f8_68b934cb","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":873,"context_line":""},{"line_number":874,"context_line":"        # Trim already executed steps"},{"line_number":875,"context_line":"        if last_step is not None:"},{"line_number":876,"context_line":"            LOG.debug(\u0027Resuming cleaning on node %(node)s from %(step)s\u0027 %"},{"line_number":877,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":878,"context_line":"            step_index \u003d None"},{"line_number":879,"context_line":"            prev_driver, prev_step \u003d last_step.split(\u0027.\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_d10e52e4","line":876,"updated":"2015-02-26 10:28:14.000000000","message":"nit: s/%/,/","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":873,"context_line":""},{"line_number":874,"context_line":"        # Trim already executed steps"},{"line_number":875,"context_line":"        if last_step is not None:"},{"line_number":876,"context_line":"            LOG.debug(\u0027Resuming cleaning on node %(node)s from %(step)s\u0027 %"},{"line_number":877,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":878,"context_line":"            step_index \u003d None"},{"line_number":879,"context_line":"            prev_driver, prev_step \u003d last_step.split(\u0027.\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_d7e54639","line":876,"in_reply_to":"ba7be1f8_d10e52e4","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":877,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":878,"context_line":"            step_index \u003d None"},{"line_number":879,"context_line":"            prev_driver, prev_step \u003d last_step.split(\u0027.\u0027)"},{"line_number":880,"context_line":"            # TODO(JoshNang) this can be simplified"},{"line_number":881,"context_line":"            for index, step in enumerate(steps):"},{"line_number":882,"context_line":"                if step.driver \u003d\u003d prev_driver and step.step \u003d\u003d prev_step:"},{"line_number":883,"context_line":"                    step_index \u003d index"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_ad3a5ee4","line":880,"updated":"2015-02-26 13:35:43.000000000","message":"Why don\u0027t we remove off the cleaning tasks that are executed from task.node.driver_internal_info[\u0027clean_steps\u0027] everytime we complete a cleaning task (synchronously or asynchronously) ? When we do that everytime, I think we just need to take the first element in the list and continue.\n\nThat simplifies it a whole lot I think.","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":877,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":878,"context_line":"            step_index \u003d None"},{"line_number":879,"context_line":"            prev_driver, prev_step \u003d last_step.split(\u0027.\u0027)"},{"line_number":880,"context_line":"            # TODO(JoshNang) this can be simplified"},{"line_number":881,"context_line":"            for index, step in enumerate(steps):"},{"line_number":882,"context_line":"                if step.driver \u003d\u003d prev_driver and step.step \u003d\u003d prev_step:"},{"line_number":883,"context_line":"                    step_index \u003d index"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_823f0ed6","line":880,"in_reply_to":"ba7be1f8_ad3a5ee4","updated":"2015-02-26 23:57:15.000000000","message":"I actually think that makes it more complicated. You\u0027d need to make a copy of clean_steps, because you don\u0027t want to modify a list while you\u0027re iterating (which you would for sync steps), and now you have to make sure you\u0027re trimming off the completed steps at the right time (changes based on sync or async). It seems like that will be cause more problems than walking a list and keeping track of where in the list you are.","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":891,"context_line":"                return"},{"line_number":892,"context_line":"            # Cut off current step (is now finished)"},{"line_number":893,"context_line":"            steps \u003d steps[step_index + 1:]"},{"line_number":894,"context_line":"            LOG.info(_LI(\u0027Remaining clean steps for node %(node)s: %(steps)s\u0027)"},{"line_number":895,"context_line":"                     % {\u0027node\u0027: node.uuid, \u0027steps\u0027: steps})"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        # Execute each step until we hit an async step or run out of steps"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_f1119604","line":894,"updated":"2015-02-26 10:28:14.000000000","message":"nit: s/%/,/","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":891,"context_line":"                return"},{"line_number":892,"context_line":"            # Cut off current step (is now finished)"},{"line_number":893,"context_line":"            steps \u003d steps[step_index + 1:]"},{"line_number":894,"context_line":"            LOG.info(_LI(\u0027Remaining clean steps for node %(node)s: %(steps)s\u0027)"},{"line_number":895,"context_line":"                     % {\u0027node\u0027: node.uuid, \u0027steps\u0027: steps})"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        # Execute each step until we hit an async step or run out of steps"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_17cfdeb4","line":894,"in_reply_to":"ba7be1f8_f1119604","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":904,"context_line":"            node.save()"},{"line_number":905,"context_line":"            driver \u003d getattr(task.driver, step.driver)"},{"line_number":906,"context_line":"            execute_clean_step \u003d getattr(driver, \u0027execute_clean_step\u0027)"},{"line_number":907,"context_line":"            LOG.debug(\u0027Executing %(step)s on node %(node)s\u0027 %"},{"line_number":908,"context_line":"                      {\u0027step\u0027: step, \u0027node\u0027: node.uuid})"},{"line_number":909,"context_line":"            try:"},{"line_number":910,"context_line":"                result \u003d execute_clean_step(step)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_510262b4","line":907,"updated":"2015-02-26 10:28:14.000000000","message":"nit: s/%/,/","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":904,"context_line":"            node.save()"},{"line_number":905,"context_line":"            driver \u003d getattr(task.driver, step.driver)"},{"line_number":906,"context_line":"            execute_clean_step \u003d getattr(driver, \u0027execute_clean_step\u0027)"},{"line_number":907,"context_line":"            LOG.debug(\u0027Executing %(step)s on node %(node)s\u0027 %"},{"line_number":908,"context_line":"                      {\u0027step\u0027: step, \u0027node\u0027: node.uuid})"},{"line_number":909,"context_line":"            try:"},{"line_number":910,"context_line":"                result \u003d execute_clean_step(step)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_57c956ab","line":907,"in_reply_to":"ba7be1f8_510262b4","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"11feaf5fcdadf53e20b34b5723e48d1f4fb67d73","unresolved":false,"context_lines":[{"line_number":907,"context_line":"            LOG.debug(\u0027Executing %(step)s on node %(node)s\u0027 %"},{"line_number":908,"context_line":"                      {\u0027step\u0027: step, \u0027node\u0027: node.uuid})"},{"line_number":909,"context_line":"            try:"},{"line_number":910,"context_line":"                result \u003d execute_clean_step(step)"},{"line_number":911,"context_line":"            except Exception as e:"},{"line_number":912,"context_line":"                msg \u003d (_LE(\u0027Node %(node)s failed cleaning: %(exc)s\u0027) %"},{"line_number":913,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027exc\u0027: e})"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_834adb52","line":910,"updated":"2015-02-26 07:24:23.000000000","message":"execute_clean_step takes 2 arguments (task, step)","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":907,"context_line":"            LOG.debug(\u0027Executing %(step)s on node %(node)s\u0027 %"},{"line_number":908,"context_line":"                      {\u0027step\u0027: step, \u0027node\u0027: node.uuid})"},{"line_number":909,"context_line":"            try:"},{"line_number":910,"context_line":"                result \u003d execute_clean_step(step)"},{"line_number":911,"context_line":"            except Exception as e:"},{"line_number":912,"context_line":"                msg \u003d (_LE(\u0027Node %(node)s failed cleaning: %(exc)s\u0027) %"},{"line_number":913,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027exc\u0027: e})"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_d701c6b0","line":910,"in_reply_to":"ba7be1f8_834adb52","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":917,"context_line":"                return"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"            # Check if the step is done or not. The step should return"},{"line_number":920,"context_line":"            # states.CLEANING if the step was completed, anything else if not."},{"line_number":921,"context_line":"            if result !\u003d states.CLEANING:"},{"line_number":922,"context_line":"                # Kill this worker, the async step will RPC call back to this"},{"line_number":923,"context_line":"                # method to continue when"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_11238a56","line":920,"updated":"2015-02-26 10:28:14.000000000","message":"Does not look obvious, especially since in inspect we return INSPECTING, when we\u0027re not done :) maybe reverse it: return None, when we\u0027re done, CLEANING when we\u0027re still cleaning (sounds more obvious to me)","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":917,"context_line":"                return"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"            # Check if the step is done or not. The step should return"},{"line_number":920,"context_line":"            # states.CLEANING if the step was completed, anything else if not."},{"line_number":921,"context_line":"            if result !\u003d states.CLEANING:"},{"line_number":922,"context_line":"                # Kill this worker, the async step will RPC call back to this"},{"line_number":923,"context_line":"                # method to continue when"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_7713ba0d","line":920,"in_reply_to":"ba7be1f8_11238a56","updated":"2015-02-26 23:57:15.000000000","message":"Works for me!","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":924,"context_line":"                return"},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"        # Clear clean_step"},{"line_number":927,"context_line":"        node.clean_step \u003d None"},{"line_number":928,"context_line":"        node.save()"},{"line_number":929,"context_line":"        LOG.info(_LI(\u0027Node %s cleaning complete\u0027) % node.uuid)"},{"line_number":930,"context_line":"        # Cleaning complete, move to AVAILABLE"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_08943889","line":927,"updated":"2015-02-26 13:35:43.000000000","message":"As per my comment above in L880, we should remove this clean_step from task.node.driver_internal_info[\u0027clean_steps\u0027] now.","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":924,"context_line":"                return"},{"line_number":925,"context_line":""},{"line_number":926,"context_line":"        # Clear clean_step"},{"line_number":927,"context_line":"        node.clean_step \u003d None"},{"line_number":928,"context_line":"        node.save()"},{"line_number":929,"context_line":"        LOG.info(_LI(\u0027Node %s cleaning complete\u0027) % node.uuid)"},{"line_number":930,"context_line":"        # Cleaning complete, move to AVAILABLE"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_17035e77","line":927,"in_reply_to":"ba7be1f8_08943889","updated":"2015-02-26 23:57:15.000000000","message":"This is the end of all cleaning, but I will remove it earlier. :)","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":926,"context_line":"        # Clear clean_step"},{"line_number":927,"context_line":"        node.clean_step \u003d None"},{"line_number":928,"context_line":"        node.save()"},{"line_number":929,"context_line":"        LOG.info(_LI(\u0027Node %s cleaning complete\u0027) % node.uuid)"},{"line_number":930,"context_line":"        # Cleaning complete, move to AVAILABLE"},{"line_number":931,"context_line":"        task.process_event(\u0027done\u0027)"},{"line_number":932,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_71fda6b0","line":929,"updated":"2015-02-26 10:28:14.000000000","message":"nit: s/%/,/","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":926,"context_line":"        # Clear clean_step"},{"line_number":927,"context_line":"        node.clean_step \u003d None"},{"line_number":928,"context_line":"        node.save()"},{"line_number":929,"context_line":"        LOG.info(_LI(\u0027Node %s cleaning complete\u0027) % node.uuid)"},{"line_number":930,"context_line":"        # Cleaning complete, move to AVAILABLE"},{"line_number":931,"context_line":"        task.process_event(\u0027done\u0027)"},{"line_number":932,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_37086291","line":929,"in_reply_to":"ba7be1f8_71fda6b0","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"11feaf5fcdadf53e20b34b5723e48d1f4fb67d73","unresolved":false,"context_lines":[{"line_number":1825,"context_line":"    return count"},{"line_number":1826,"context_line":""},{"line_number":1827,"context_line":""},{"line_number":1828,"context_line":"def _compare_clean_steps(step1, step2):"},{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"        if step1.priority \u003d\u003d step2.priority:"},{"line_number":1831,"context_line":"            return (CLEANING_DRIVER_PRIORITY[step1.driver] -"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_83549bca","line":1828,"updated":"2015-02-26 07:24:23.000000000","message":"docstring here would be better?","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":1825,"context_line":"    return count"},{"line_number":1826,"context_line":""},{"line_number":1827,"context_line":""},{"line_number":1828,"context_line":"def _compare_clean_steps(step1, step2):"},{"line_number":1829,"context_line":""},{"line_number":1830,"context_line":"        if step1.priority \u003d\u003d step2.priority:"},{"line_number":1831,"context_line":"            return (CLEANING_DRIVER_PRIORITY[step1.driver] -"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_b2c29d84","line":1828,"in_reply_to":"ba7be1f8_83549bca","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":1830,"context_line":"        if step1.priority \u003d\u003d step2.priority:"},{"line_number":1831,"context_line":"            return (CLEANING_DRIVER_PRIORITY[step1.driver] -"},{"line_number":1832,"context_line":"                    CLEANING_DRIVER_PRIORITY[step2.driver])"},{"line_number":1833,"context_line":"        return step1.priority - step2.priority"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_b1a71ebc","line":1833,"updated":"2015-02-26 10:28:14.000000000","message":"nit: one-liners for the win:\n\n return ((step1.priority - step2.priority) or \n     (CLEANING_DRIVER_PRIORITY[step1.driver] - CLEANING_DRIVER_PRIORITY[step2.driver]))\n\ndon\u0027t do it, just kidding. Actually using cmp-style sorting is deprecated, let\u0027s better have a key function:\n\n def _step_key(step):\n     return step.priority, CLEANING_DRIVER_PRIORITY[step.driver]","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":1830,"context_line":"        if step1.priority \u003d\u003d step2.priority:"},{"line_number":1831,"context_line":"            return (CLEANING_DRIVER_PRIORITY[step1.driver] -"},{"line_number":1832,"context_line":"                    CLEANING_DRIVER_PRIORITY[step2.driver])"},{"line_number":1833,"context_line":"        return step1.priority - step2.priority"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_68d3f45f","line":1833,"in_reply_to":"ba7be1f8_b1a71ebc","updated":"2015-02-26 13:35:43.000000000","message":"+1 ;-)","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":1830,"context_line":"        if step1.priority \u003d\u003d step2.priority:"},{"line_number":1831,"context_line":"            return (CLEANING_DRIVER_PRIORITY[step1.driver] -"},{"line_number":1832,"context_line":"                    CLEANING_DRIVER_PRIORITY[step2.driver])"},{"line_number":1833,"context_line":"        return step1.priority - step2.priority"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_4f7d3ee7","line":1833,"in_reply_to":"ba7be1f8_b1a71ebc","updated":"2015-02-26 23:57:15.000000000","message":"Heh, who doesn\u0027t love a good one liner? Done (with key\u003d, of course)","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"11feaf5fcdadf53e20b34b5723e48d1f4fb67d73","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"        return step1.priority - step2.priority"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task):"},{"line_number":1837,"context_line":"    steps \u003d list()"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    steps +\u003d task.driver.power.get_clean_steps()"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_03418b0a","line":1836,"updated":"2015-02-26 07:24:23.000000000","message":"ditto","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"        return step1.priority - step2.priority"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task):"},{"line_number":1837,"context_line":"    steps \u003d list()"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    steps +\u003d task.driver.power.get_clean_steps()"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_92ce79b3","line":1836,"in_reply_to":"ba7be1f8_03418b0a","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":1836,"context_line":"def _get_cleaning_steps(task):"},{"line_number":1837,"context_line":"    steps \u003d list()"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    steps +\u003d task.driver.power.get_clean_steps()"},{"line_number":1840,"context_line":"    steps +\u003d task.driver.management.get_clean_steps()"},{"line_number":1841,"context_line":"    steps +\u003d task.driver.deploy.get_clean_steps()"},{"line_number":1842,"context_line":"    # Reverse the keys so we can execute from first to last"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_680854da","line":1839,"updated":"2015-02-26 13:35:43.000000000","message":"I think a better one:\n\n  for interface in CLEANING_DRIVER_PRIORITY.keys():\n    driver_impl_of_interface \u003d getattr(task.driver, interface)\n    if driver_impl_of_interface:\n        get_clean_steps_func \u003d getattr(driver_impl_of_interface, \u0027get_clean_steps\u0027)\n        steps.extend(get_clean_steps_func())","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"11feaf5fcdadf53e20b34b5723e48d1f4fb67d73","unresolved":false,"context_lines":[{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    steps +\u003d task.driver.power.get_clean_steps()"},{"line_number":1840,"context_line":"    steps +\u003d task.driver.management.get_clean_steps()"},{"line_number":1841,"context_line":"    steps +\u003d task.driver.deploy.get_clean_steps()"},{"line_number":1842,"context_line":"    # Reverse the keys so we can execute from first to last"},{"line_number":1843,"context_line":"    return sorted(steps, key\u003dfunctools.cmp_to_key("},{"line_number":1844,"context_line":"        _compare_clean_steps), reverse\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_bc11bd5e","line":1841,"updated":"2015-02-26 07:24:23.000000000","message":"Its better to return the clean steps which are actually enabled excluding with priority 0","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":1841,"context_line":"    steps +\u003d task.driver.deploy.get_clean_steps()"},{"line_number":1842,"context_line":"    # Reverse the keys so we can execute from first to last"},{"line_number":1843,"context_line":"    return sorted(steps, key\u003dfunctools.cmp_to_key("},{"line_number":1844,"context_line":"        _compare_clean_steps), reverse\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_31c88e54","line":1844,"updated":"2015-02-26 10:28:14.000000000","message":"see above about using key function directly","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":1841,"context_line":"    steps +\u003d task.driver.deploy.get_clean_steps()"},{"line_number":1842,"context_line":"    # Reverse the keys so we can execute from first to last"},{"line_number":1843,"context_line":"    return sorted(steps, key\u003dfunctools.cmp_to_key("},{"line_number":1844,"context_line":"        _compare_clean_steps), reverse\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_52d40147","line":1844,"in_reply_to":"ba7be1f8_31c88e54","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"186a163694f327edfc9ada938ac0483f6ef5cfef","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                         \u0027drives, that are performed on the node to ensure it \u0027"},{"line_number":172,"context_line":"                         \u0027is in a baseline state and ready to be deployed to. \u0027"},{"line_number":173,"context_line":"                         \u0027See the individual driver\\\u0027s documentation for \u0027"},{"line_number":174,"context_line":"                         \u0027supported cleaning steps.\u0027),"},{"line_number":175,"context_line":"]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_2eb56131","line":174,"updated":"2015-02-27 05:48:40.000000000","message":"config file ironic.conf.sample should be updated, to get this reflected?","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"eeba35b8f819d0e63f6a69489222aa571b51d0e0","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                         \u0027drives, that are performed on the node to ensure it \u0027"},{"line_number":172,"context_line":"                         \u0027is in a baseline state and ready to be deployed to. \u0027"},{"line_number":173,"context_line":"                         \u0027See the individual driver\\\u0027s documentation for \u0027"},{"line_number":174,"context_line":"                         \u0027supported cleaning steps.\u0027),"},{"line_number":175,"context_line":"]"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_077cd771","line":174,"in_reply_to":"ba7be1f8_2eb56131","updated":"2015-02-28 01:33:35.000000000","message":"+1","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"9b1802cdef07a63b0f3b9ada4ac54fde9a59705f","unresolved":false,"context_lines":[{"line_number":180,"context_line":"CLEANING_INTERFACE_PRIORITY \u003d {"},{"line_number":181,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":182,"context_line":"    # by which driver is implementing the clean step. The step with highest"},{"line_number":183,"context_line":"    # cleaning interface priority is executed first in that case."},{"line_number":184,"context_line":"    \u0027power\u0027: 3,"},{"line_number":185,"context_line":"    \u0027management\u0027: 2,"},{"line_number":186,"context_line":"    \u0027deploy\u0027: 1"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_92baf96c","line":183,"updated":"2015-02-27 00:06:54.000000000","message":"What is the definition of \u0027highest\u0027?  Is 3 higher than 1?  Or other way around?","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"eeba35b8f819d0e63f6a69489222aa571b51d0e0","unresolved":false,"context_lines":[{"line_number":180,"context_line":"CLEANING_INTERFACE_PRIORITY \u003d {"},{"line_number":181,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":182,"context_line":"    # by which driver is implementing the clean step. The step with highest"},{"line_number":183,"context_line":"    # cleaning interface priority is executed first in that case."},{"line_number":184,"context_line":"    \u0027power\u0027: 3,"},{"line_number":185,"context_line":"    \u0027management\u0027: 2,"},{"line_number":186,"context_line":"    \u0027deploy\u0027: 1"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_a7722b47","line":183,"in_reply_to":"ba7be1f8_92baf96c","updated":"2015-02-28 01:33:35.000000000","message":"For this, 3 is higher than 1. I\u0027ll switch to \u0027largest\u0027..I think that\u0027s more clear.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2afb876ec1be448a6030b51daa2a4d680b7f9594","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    # cleaning interface priority is executed first in that case."},{"line_number":184,"context_line":"    \u0027power\u0027: 3,"},{"line_number":185,"context_line":"    \u0027management\u0027: 2,"},{"line_number":186,"context_line":"    \u0027deploy\u0027: 1"},{"line_number":187,"context_line":"}"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_9e5e14e8","line":186,"updated":"2015-03-02 17:51:49.000000000","message":"\u0027base\u0027 is missing from here. not necessary now, but one will get a vague error trying to add clean step to inspect interface :)","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"4f6c9c58dea5659b60ee69d9346069411496a75a","unresolved":false,"context_lines":[{"line_number":183,"context_line":"    # cleaning interface priority is executed first in that case."},{"line_number":184,"context_line":"    \u0027power\u0027: 3,"},{"line_number":185,"context_line":"    \u0027management\u0027: 2,"},{"line_number":186,"context_line":"    \u0027deploy\u0027: 1"},{"line_number":187,"context_line":"}"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_b9669227","line":186,"in_reply_to":"ba7be1f8_9e5e14e8","updated":"2015-03-02 18:32:04.000000000","message":"I don\u0027t think we want to allow clean steps on the base interface. I\u0027ll improve the error handling for interfaces that aren\u0027t in this list though.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2afb876ec1be448a6030b51daa2a4d680b7f9594","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    \"\"\"Ironic Conductor manager main class.\"\"\""},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    # NOTE(rloo): This must be in sync with rpcapi.ConductorAPI\u0027s."},{"line_number":194,"context_line":"    RPC_API_VERSION \u003d \u00271.24\u0027"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    target \u003d messaging.Target(version\u003dRPC_API_VERSION)"},{"line_number":197,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_be0838da","line":194,"updated":"2015-03-02 17:51:49.000000000","message":"likely to get outdated by approved inspection patch...","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4fe62e96421d8432dddea703288527d63448910f","unresolved":false,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @messaging.expected_exceptions(exception.NoFreeConductorWorker,"},{"line_number":800,"context_line":"                                   exception.NodeLocked,"},{"line_number":801,"context_line":"                                   exception.InvalidStateRequested)"},{"line_number":802,"context_line":"    def continue_node_clean(self, context, node_id):"},{"line_number":803,"context_line":"        \"\"\"RPC method to continue cleaning a node."},{"line_number":804,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_bf023db2","line":801,"updated":"2015-02-27 17:47:19.000000000","message":"task_manager.acquire can also raise NodeNotFound, for example if a node is deleted between steps or something. Not sure if prevent this while things are happening, but probably good to be defensive about it.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"eeba35b8f819d0e63f6a69489222aa571b51d0e0","unresolved":false,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @messaging.expected_exceptions(exception.NoFreeConductorWorker,"},{"line_number":800,"context_line":"                                   exception.NodeLocked,"},{"line_number":801,"context_line":"                                   exception.InvalidStateRequested)"},{"line_number":802,"context_line":"    def continue_node_clean(self, context, node_id):"},{"line_number":803,"context_line":"        \"\"\"RPC method to continue cleaning a node."},{"line_number":804,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_c78e3f27","line":801,"in_reply_to":"ba7be1f8_bf023db2","updated":"2015-02-28 01:33:35.000000000","message":"Done","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4fe62e96421d8432dddea703288527d63448910f","unresolved":false,"context_lines":[{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # Get the prioritized steps, store them."},{"line_number":855,"context_line":"        task.node.driver_internal_info[\u0027clean_steps\u0027] \u003d _get_cleaning_steps("},{"line_number":856,"context_line":"            task, enabled\u003dTrue)"},{"line_number":857,"context_line":"        task.node.save()"},{"line_number":858,"context_line":"        self._do_next_clean_step(task,"},{"line_number":859,"context_line":"                                 task.node.driver_internal_info[\u0027clean_steps\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_1f7ee9e4","line":856,"updated":"2015-02-27 17:47:19.000000000","message":"_get_cleaning_steps returns a list of named tuples, are these compatible with our JSON fields? Thinking not...","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"eeba35b8f819d0e63f6a69489222aa571b51d0e0","unresolved":false,"context_lines":[{"line_number":853,"context_line":""},{"line_number":854,"context_line":"        # Get the prioritized steps, store them."},{"line_number":855,"context_line":"        task.node.driver_internal_info[\u0027clean_steps\u0027] \u003d _get_cleaning_steps("},{"line_number":856,"context_line":"            task, enabled\u003dTrue)"},{"line_number":857,"context_line":"        task.node.save()"},{"line_number":858,"context_line":"        self._do_next_clean_step(task,"},{"line_number":859,"context_line":"                                 task.node.driver_internal_info[\u0027clean_steps\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_19ad1789","line":856,"in_reply_to":"ba7be1f8_1f7ee9e4","updated":"2015-02-28 01:33:35.000000000","message":"Great catch, I\u0027ll switch to dictionaries for clean steps. Namedtuples had a small amount of value for a cleaner interface, but this having to marshal them to and from JSON every time we want to use them outweighs this a lot.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2afb876ec1be448a6030b51daa2a4d680b7f9594","unresolved":false,"context_lines":[{"line_number":859,"context_line":"                                 task.node.driver_internal_info[\u0027clean_steps\u0027],"},{"line_number":860,"context_line":"                                 last_step\u003dtask.node.clean_step)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"    def _do_next_clean_step(self, task, steps, last_step\u003dNone):"},{"line_number":863,"context_line":"        \"\"\"Execute next clean or zap step."},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"        :param task: a TaskManager instance with an exclusive lock"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_5e1adc17","line":862,"updated":"2015-03-02 17:51:49.000000000","message":"kind-of-nit, but still: could you split this big function?","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"4f6c9c58dea5659b60ee69d9346069411496a75a","unresolved":false,"context_lines":[{"line_number":859,"context_line":"                                 task.node.driver_internal_info[\u0027clean_steps\u0027],"},{"line_number":860,"context_line":"                                 last_step\u003dtask.node.clean_step)"},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"    def _do_next_clean_step(self, task, steps, last_step\u003dNone):"},{"line_number":863,"context_line":"        \"\"\"Execute next clean or zap step."},{"line_number":864,"context_line":""},{"line_number":865,"context_line":"        :param task: a TaskManager instance with an exclusive lock"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_994aae81","line":862,"in_reply_to":"ba7be1f8_5e1adc17","updated":"2015-03-02 18:32:04.000000000","message":"Done","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"9990dc733ecad0fd240d849b672d077c9c578176","unresolved":false,"context_lines":[{"line_number":871,"context_line":"        node \u003d task.node"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        # Trim already executed steps"},{"line_number":874,"context_line":"        if last_step is not None:"},{"line_number":875,"context_line":"            LOG.debug(\u0027Resuming cleaning on node %(node)s from %(step)s\u0027,"},{"line_number":876,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":877,"context_line":"            # Determine where in the list of clean_steps we are"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_2ea64154","line":874,"updated":"2015-02-27 05:56:55.000000000","message":"Continuing discussion from previous patchset:\n\nI mean we cannot do it in the usual way of talking the list.  But we should be able to if we consider the reverse sort the list in the order in which we want to execute and then pop each item from the end (use list as a stack).\n\nFor example,\n\nIf we want to execute 3 tasks in the following order\n\n#. management.reset_bios\n#. managament.raid\n#. management.update_firmware\n\nStore the steps in reverse order in list and consider them as stack:\n\n  clean_steps \u003d [management.update_firmware, managament.raid, management.reset_bios]\n\nAlgorithm can be:\n\n  if last_step:\n    last_step_in_db \u003d clean_steps[-1]\n    if last_step_in_db !\u003d last_step:\n      \u003cerror\u003e\n    clean_steps.pop()\n    save clean_steps to db\n  \n  while (clean_steps)\n    current_step \u003d clean_steps[-1]   # this is our stack peep :)\n    \u003cexecute step\u003e\n    clean_steps.pop()\n    save clean_steps to db","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4fe62e96421d8432dddea703288527d63448910f","unresolved":false,"context_lines":[{"line_number":871,"context_line":"        node \u003d task.node"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        # Trim already executed steps"},{"line_number":874,"context_line":"        if last_step is not None:"},{"line_number":875,"context_line":"            LOG.debug(\u0027Resuming cleaning on node %(node)s from %(step)s\u0027,"},{"line_number":876,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":877,"context_line":"            # Determine where in the list of clean_steps we are"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_9f5ad94e","line":874,"in_reply_to":"ba7be1f8_2ea64154","updated":"2015-02-27 17:47:19.000000000","message":"This seems sane, though I wonder if it\u0027s valuable to the operator to be able to see all clean steps during cleaning. In other words, to the operator could see all the steps and compare to the current step, so they know if a given step has been executed.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ac4a8b9f2836023a5c9d75c73b3b411569d0db69","unresolved":false,"context_lines":[{"line_number":871,"context_line":"        node \u003d task.node"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        # Trim already executed steps"},{"line_number":874,"context_line":"        if last_step is not None:"},{"line_number":875,"context_line":"            LOG.debug(\u0027Resuming cleaning on node %(node)s from %(step)s\u0027,"},{"line_number":876,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":877,"context_line":"            # Determine where in the list of clean_steps we are"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_a48222fe","line":874,"in_reply_to":"ba7be1f8_990ca796","updated":"2015-02-28 02:15:26.000000000","message":"@Jim, currently we store clean_steps in driver_internal_info and the operator cannot see that.  But that said, if we want to show that, I think it would make better sense if we show the operator as \"executed_clean_steps\" and \"remaining_clean_steps\".  That would be helpful for the operator to himself/herself parse through the list and figure out where it is currently.  May be we can have an API for it.  \n\n@Josh, Yeah, your suggested approach looks good to me as well.  I feel it\u0027s better either we NEVER remove off anything driver_internal_info[\u0027clean_steps\u0027] (YOUR APPROACH) during cleaning or we always remove when a step is done (for both sync and async steps) (MY APPROACH).  For the latter, we might need to store the executed steps somewhere else like driver_internal_info[\u0027executed_steps\u0027]","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"eeba35b8f819d0e63f6a69489222aa571b51d0e0","unresolved":false,"context_lines":[{"line_number":871,"context_line":"        node \u003d task.node"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        # Trim already executed steps"},{"line_number":874,"context_line":"        if last_step is not None:"},{"line_number":875,"context_line":"            LOG.debug(\u0027Resuming cleaning on node %(node)s from %(step)s\u0027,"},{"line_number":876,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":877,"context_line":"            # Determine where in the list of clean_steps we are"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_990ca796","line":874,"in_reply_to":"ba7be1f8_9f5ad94e","updated":"2015-02-28 01:33:35.000000000","message":"What if we stop storing the clean state as a \"interface.step\" and just store the step dictionary? Then we can do steps.index(clean_step) and keep the steps in the DB for the duration of cleaning in the correct order. It should also make anything parsing the node.clean_step a bit easier: it\u0027s a dictionary instead of needing to split on a period.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ddc573ab7bc4e8a52a9c68f2fc2d11d7ff9644fd","unresolved":false,"context_lines":[{"line_number":871,"context_line":"        node \u003d task.node"},{"line_number":872,"context_line":""},{"line_number":873,"context_line":"        # Trim already executed steps"},{"line_number":874,"context_line":"        if last_step is not None:"},{"line_number":875,"context_line":"            LOG.debug(\u0027Resuming cleaning on node %(node)s from %(step)s\u0027,"},{"line_number":876,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":877,"context_line":"            # Determine where in the list of clean_steps we are"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_6a9b93c9","line":874,"in_reply_to":"ba7be1f8_a48222fe","updated":"2015-02-28 04:05:50.000000000","message":"Alright! I\u0027m going to consider this over the weekend and put up something Monday. Thanks for helping me improve this bit, I think it\u0027s going to be much better.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4fe62e96421d8432dddea703288527d63448910f","unresolved":false,"context_lines":[{"line_number":905,"context_line":"                                \u0027step\u0027: step.step})"},{"line_number":906,"context_line":"            node.save()"},{"line_number":907,"context_line":"            interface \u003d getattr(task.driver, step.interface)"},{"line_number":908,"context_line":"            execute_clean_step \u003d getattr(interface, \u0027execute_clean_step\u0027)"},{"line_number":909,"context_line":"            LOG.debug(\u0027Executing %(step)s on node %(node)s\u0027,"},{"line_number":910,"context_line":"                      {\u0027step\u0027: step, \u0027node\u0027: node.uuid})"},{"line_number":911,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_ea81554e","line":908,"updated":"2015-02-27 17:47:19.000000000","message":"This can just be interface.execute_clean_step, no? And can be just shoved down to line 912, so that would be: result \u003d interface.execute_clean_step(task, step)","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"eeba35b8f819d0e63f6a69489222aa571b51d0e0","unresolved":false,"context_lines":[{"line_number":905,"context_line":"                                \u0027step\u0027: step.step})"},{"line_number":906,"context_line":"            node.save()"},{"line_number":907,"context_line":"            interface \u003d getattr(task.driver, step.interface)"},{"line_number":908,"context_line":"            execute_clean_step \u003d getattr(interface, \u0027execute_clean_step\u0027)"},{"line_number":909,"context_line":"            LOG.debug(\u0027Executing %(step)s on node %(node)s\u0027,"},{"line_number":910,"context_line":"                      {\u0027step\u0027: step, \u0027node\u0027: node.uuid})"},{"line_number":911,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_59794ffb","line":908,"in_reply_to":"ba7be1f8_ea81554e","updated":"2015-02-28 01:33:35.000000000","message":"Yup, getattr isn\u0027t necessary here.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"605adcd3068bace8885ae84fe90c4d603d61b481","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"    return step.priority, CLEANING_INTERFACE_PRIORITY[step.interface]"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task, enabled\u003dFalse):"},{"line_number":1837,"context_line":"    \"\"\"Get sorted cleaning steps for task.node"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    :param task: A TaskManager object"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_6f93d34f","line":1836,"updated":"2015-02-27 07:46:31.000000000","message":"Thinking more, I feel this needn\u0027t be generated everytime. This can be cached for a driver and we will just need to retrieve them.  May be generate them in BaseDriver.__new__() just like we did for BaseInterface ?","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ddc573ab7bc4e8a52a9c68f2fc2d11d7ff9644fd","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"    return step.priority, CLEANING_INTERFACE_PRIORITY[step.interface]"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task, enabled\u003dFalse):"},{"line_number":1837,"context_line":"    \"\"\"Get sorted cleaning steps for task.node"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    :param task: A TaskManager object"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_bfcdcbb9","line":1836,"in_reply_to":"ba7be1f8_64b66ade","updated":"2015-02-28 04:05:50.000000000","message":"That\u0027s why execute_clean_step() and get_clean_steps() are in the interface..interfaces that have to do something different can override it. In the agent\u0027s case, execute_clean_step passes it through the command to the agent and get_clean_steps() passes through the response from the agent. Since IPA decides it\u0027s clean steps based on the enabled hardware managers and whether the hardware managers support the hardware on the node (allowing you to have one ramdisk across multiple flavors...makes ops much easier), the steps can really only be generated at the time cleaning starts, hence this design.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"eeba35b8f819d0e63f6a69489222aa571b51d0e0","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"    return step.priority, CLEANING_INTERFACE_PRIORITY[step.interface]"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task, enabled\u003dFalse):"},{"line_number":1837,"context_line":"    \"\"\"Get sorted cleaning steps for task.node"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    :param task: A TaskManager object"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_d96c5f39","line":1836,"in_reply_to":"ba7be1f8_6f93d34f","updated":"2015-02-28 01:33:35.000000000","message":"This won\u0027t work in the IPA case: the IPA driver is going to call out to the ramdisk running on the disk to generate the list. It will change over the lifetime of a conductor (by design).","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"bcf13c67b9aa4599231fe679163171ee69c24880","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"    return step.priority, CLEANING_INTERFACE_PRIORITY[step.interface]"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task, enabled\u003dFalse):"},{"line_number":1837,"context_line":"    \"\"\"Get sorted cleaning steps for task.node"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    :param task: A TaskManager object"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_ca7f1f65","line":1836,"in_reply_to":"ba7be1f8_bfcdcbb9","updated":"2015-02-28 04:08:58.000000000","message":"Great, got it now.  Thanks.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"ac4a8b9f2836023a5c9d75c73b3b411569d0db69","unresolved":false,"context_lines":[{"line_number":1833,"context_line":"    return step.priority, CLEANING_INTERFACE_PRIORITY[step.interface]"},{"line_number":1834,"context_line":""},{"line_number":1835,"context_line":""},{"line_number":1836,"context_line":"def _get_cleaning_steps(task, enabled\u003dFalse):"},{"line_number":1837,"context_line":"    \"\"\"Get sorted cleaning steps for task.node"},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"    :param task: A TaskManager object"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_64b66ade","line":1836,"in_reply_to":"ba7be1f8_d96c5f39","updated":"2015-02-28 02:15:26.000000000","message":"I didn\u0027t get this completely. According to our current design we cache the list of clean steps when an interface is created, and we use it here to accumulate a list of cached steps (when interface was created).  I don\u0027t get how IPA will add something to this list according to the current design.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4fe62e96421d8432dddea703288527d63448910f","unresolved":false,"context_lines":[{"line_number":1849,"context_line":"        driver_interface \u003d getattr(task.driver, interface)"},{"line_number":1850,"context_line":"        if driver_interface:"},{"line_number":1851,"context_line":"            get_clean_steps_func \u003d getattr(driver_interface, \u0027get_clean_steps\u0027)"},{"line_number":1852,"context_line":"            steps.extend(get_clean_steps_func())"},{"line_number":1853,"context_line":""},{"line_number":1854,"context_line":"    # Reverse the keys so we can execute from first to last"},{"line_number":1855,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_6a71e576","line":1852,"updated":"2015-02-27 17:47:19.000000000","message":"Can simplify these last two lines to: steps.extend(driver_interface.get_clean_steps())","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"eeba35b8f819d0e63f6a69489222aa571b51d0e0","unresolved":false,"context_lines":[{"line_number":1849,"context_line":"        driver_interface \u003d getattr(task.driver, interface)"},{"line_number":1850,"context_line":"        if driver_interface:"},{"line_number":1851,"context_line":"            get_clean_steps_func \u003d getattr(driver_interface, \u0027get_clean_steps\u0027)"},{"line_number":1852,"context_line":"            steps.extend(get_clean_steps_func())"},{"line_number":1853,"context_line":""},{"line_number":1854,"context_line":"    # Reverse the keys so we can execute from first to last"},{"line_number":1855,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_1977d703","line":1852,"in_reply_to":"ba7be1f8_6a71e576","updated":"2015-02-28 01:33:35.000000000","message":"+1","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"3f31e3e30051aa47c802ee125c301680d08c131b","unresolved":false,"context_lines":[{"line_number":1850,"context_line":"        if driver_interface:"},{"line_number":1851,"context_line":"            get_clean_steps_func \u003d getattr(driver_interface, \u0027get_clean_steps\u0027)"},{"line_number":1852,"context_line":"            steps.extend(get_clean_steps_func())"},{"line_number":1853,"context_line":""},{"line_number":1854,"context_line":"    # Reverse the keys so we can execute from first to last"},{"line_number":1855,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_e89d0868","line":1853,"updated":"2015-02-26 23:58:14.000000000","message":"Should filter these based on enabled. I\u0027ll fix that in the morning.","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"730f68c0697b5a643b96fcfceda601f708e353af","unresolved":false,"context_lines":[{"line_number":862,"context_line":"            return"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        # Get the prioritized steps, store them."},{"line_number":865,"context_line":"        task.node.driver_internal_info[\u0027clean_steps\u0027] \u003d _get_cleaning_steps("},{"line_number":866,"context_line":"            task, enabled\u003dTrue)"},{"line_number":867,"context_line":"        task.node.save()"},{"line_number":868,"context_line":"        self._do_next_clean_step(task,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_75dd6b42","line":865,"updated":"2015-03-04 13:27:26.000000000","message":"Seems like we shouldn\u0027t really overwrite clean_steps if it does exist on the node because anyway we will trim off till the current portion of clean_steps very soon looking at node.clean_step.  More clean steps can get enabled during cleaning process and we really should consider only those that were enabled at the time of starting the cleaning on this node.\n\nIn my opinion it should look like:\n\n  driver_internal_info \u003d task.node.driver_internal_info\n  if \u0027clean_steps\u0027 not in driver_internal_info:\n    driver_internal_info[\u0027clean_steps\u0027] \u003d  _get_cleaning_steps(task, enabled\u003dTrue)\n    task.node.driver_internal_info \u003d driver_internal_info\n    task.node.save()","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"4bb7db8e105bbf2d3bdb01a30a4097bdc3d68471","unresolved":false,"context_lines":[{"line_number":862,"context_line":"            return"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"        # Get the prioritized steps, store them."},{"line_number":865,"context_line":"        task.node.driver_internal_info[\u0027clean_steps\u0027] \u003d _get_cleaning_steps("},{"line_number":866,"context_line":"            task, enabled\u003dTrue)"},{"line_number":867,"context_line":"        task.node.save()"},{"line_number":868,"context_line":"        self._do_next_clean_step(task,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_bb87b660","line":865,"in_reply_to":"9a80dd14_75dd6b42","updated":"2015-03-05 01:56:20.000000000","message":"I disagree. The main problem here is that I\u0027m calling _do_node_clean instead of _do_next_clean_step in continue_node_clean. _do_node_clean should be a one time shot per delete like tear_down.","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"730f68c0697b5a643b96fcfceda601f708e353af","unresolved":false,"context_lines":[{"line_number":885,"context_line":"            try:"},{"line_number":886,"context_line":"                steps \u003d _get_remaining_clean_steps(task, steps, last_step)"},{"line_number":887,"context_line":"            except ValueError:"},{"line_number":888,"context_line":"                # Error is handled in _get_remaining_clean_steps, end here"},{"line_number":889,"context_line":"                return"},{"line_number":890,"context_line":"        # Execute each step until we hit an async step or run out of steps"},{"line_number":891,"context_line":"        for step in steps:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_2982c452","line":888,"updated":"2015-03-04 13:27:26.000000000","message":"nit: it seems a bit odd to return doing nothing from an exception.  in my opinion, it would have been better if _get_remaining_clean_steps just raised ValueError (which is fine because last_step passed to _get_remaining_clean_steps wasn\u0027t there in steps) and we processed it here.","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"4bb7db8e105bbf2d3bdb01a30a4097bdc3d68471","unresolved":false,"context_lines":[{"line_number":885,"context_line":"            try:"},{"line_number":886,"context_line":"                steps \u003d _get_remaining_clean_steps(task, steps, last_step)"},{"line_number":887,"context_line":"            except ValueError:"},{"line_number":888,"context_line":"                # Error is handled in _get_remaining_clean_steps, end here"},{"line_number":889,"context_line":"                return"},{"line_number":890,"context_line":"        # Execute each step until we hit an async step or run out of steps"},{"line_number":891,"context_line":"        for step in steps:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_15a16ef8","line":888,"in_reply_to":"9a80dd14_2982c452","updated":"2015-03-05 01:56:20.000000000","message":"Done","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"730f68c0697b5a643b96fcfceda601f708e353af","unresolved":false,"context_lines":[{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                result \u003d interface.execute_clean_step(task, step)"},{"line_number":901,"context_line":"            except Exception as e:"},{"line_number":902,"context_line":"                msg \u003d (_LE(\u0027Node %(node)s failed cleaning: %(exc)s\u0027) %"},{"line_number":903,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027exc\u0027: e})"},{"line_number":904,"context_line":"                LOG.exception(msg)"},{"line_number":905,"context_line":"                node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_1a2c5cab","line":902,"updated":"2015-03-04 13:27:26.000000000","message":"Better to log the clean step which failed in node.last_error.","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"4bb7db8e105bbf2d3bdb01a30a4097bdc3d68471","unresolved":false,"context_lines":[{"line_number":899,"context_line":"            try:"},{"line_number":900,"context_line":"                result \u003d interface.execute_clean_step(task, step)"},{"line_number":901,"context_line":"            except Exception as e:"},{"line_number":902,"context_line":"                msg \u003d (_LE(\u0027Node %(node)s failed cleaning: %(exc)s\u0027) %"},{"line_number":903,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027exc\u0027: e})"},{"line_number":904,"context_line":"                LOG.exception(msg)"},{"line_number":905,"context_line":"                node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_95ac7eef","line":902,"in_reply_to":"9a80dd14_1a2c5cab","updated":"2015-03-05 01:56:20.000000000","message":"Done","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"730f68c0697b5a643b96fcfceda601f708e353af","unresolved":false,"context_lines":[{"line_number":1960,"context_line":"    try:"},{"line_number":1961,"context_line":"        step_index \u003d steps.index(last_step)"},{"line_number":1962,"context_line":"    except ValueError:"},{"line_number":1963,"context_line":"        msg \u003d (_LE(\u0027Node %(node)s got an invalid last step for \u0027"},{"line_number":1964,"context_line":"                   \u0027cleaning/zapping: %(step)s.\u0027) %"},{"line_number":1965,"context_line":"               {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":1966,"context_line":"        LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_d5c0d77e","line":1963,"updated":"2015-03-04 13:27:26.000000000","message":"Okay, so what do we way out of this ? I can think of the operator putting the node back to manage from cleanfail which should cause it to set clean_steps and clean_step to None.  We could clear these off too, so when the operator pushes it back to cleaning, it will start from the first one again.","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"4bb7db8e105bbf2d3bdb01a30a4097bdc3d68471","unresolved":false,"context_lines":[{"line_number":1960,"context_line":"    try:"},{"line_number":1961,"context_line":"        step_index \u003d steps.index(last_step)"},{"line_number":1962,"context_line":"    except ValueError:"},{"line_number":1963,"context_line":"        msg \u003d (_LE(\u0027Node %(node)s got an invalid last step for \u0027"},{"line_number":1964,"context_line":"                   \u0027cleaning/zapping: %(step)s.\u0027) %"},{"line_number":1965,"context_line":"               {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":1966,"context_line":"        LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_f5821a51","line":1963,"in_reply_to":"9a80dd14_d5c0d77e","updated":"2015-03-05 01:56:20.000000000","message":"Clean step should be reset so it\u0027ll restart from the beginning, but there\u0027s no need to reset clean_steps. Especially since a lot of this code is going to be shared with zapping, keeping it generic here is prudent.","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        cfg.BoolOpt(\u0027clean_nodes\u0027,"},{"line_number":171,"context_line":"                    default\u003dFalse,"},{"line_number":172,"context_line":"                    help\u003d\u0027Whether Ironic will attempt to \"clean\" a node \u0027"},{"line_number":173,"context_line":"                         \u0027between workloads and when moving from MANAGEABLE \u0027"},{"line_number":174,"context_line":"                         \u0027to AVAILABLE or DELETING to AVAILABLE. Cleaning is \u0027"},{"line_number":175,"context_line":"                         \u0027a configurable set of steps, such as erasing disk \u0027"},{"line_number":176,"context_line":"                         \u0027drives, that are performed on the node to ensure it \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_5b823550","line":173,"updated":"2015-03-05 03:22:41.000000000","message":"what do you mean by \u0027between workloads\u0027 that isn\u0027t captured by the \u0027when moving from MANAGEABLE... \u0027 part?","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        cfg.BoolOpt(\u0027clean_nodes\u0027,"},{"line_number":171,"context_line":"                    default\u003dFalse,"},{"line_number":172,"context_line":"                    help\u003d\u0027Whether Ironic will attempt to \"clean\" a node \u0027"},{"line_number":173,"context_line":"                         \u0027between workloads and when moving from MANAGEABLE \u0027"},{"line_number":174,"context_line":"                         \u0027to AVAILABLE or DELETING to AVAILABLE. Cleaning is \u0027"},{"line_number":175,"context_line":"                         \u0027a configurable set of steps, such as erasing disk \u0027"},{"line_number":176,"context_line":"                         \u0027drives, that are performed on the node to ensure it \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_6b429d3f","line":173,"in_reply_to":"9a80dd14_5b823550","updated":"2015-03-05 21:08:21.000000000","message":"Good point :)","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                    default\u003dFalse,"},{"line_number":172,"context_line":"                    help\u003d\u0027Whether Ironic will attempt to \"clean\" a node \u0027"},{"line_number":173,"context_line":"                         \u0027between workloads and when moving from MANAGEABLE \u0027"},{"line_number":174,"context_line":"                         \u0027to AVAILABLE or DELETING to AVAILABLE. Cleaning is \u0027"},{"line_number":175,"context_line":"                         \u0027a configurable set of steps, such as erasing disk \u0027"},{"line_number":176,"context_line":"                         \u0027drives, that are performed on the node to ensure it \u0027"},{"line_number":177,"context_line":"                         \u0027is in a baseline state and ready to be deployed to. \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_9b93cda2","line":174,"updated":"2015-03-05 03:22:41.000000000","message":"I am unsure as to how to describe this in a way that our readers/operators will understand. I guess we assume they will understand the provisioning states of a node. So maybe just append \u0027provisioning states\u0027 at the end of the above sentence?\n\nOr we try to describe this in English, something like \u0027Whether to \"clean\" a node before it is made available for deployment. This includes the first time and after a node deployment is no longer needed.\u0027 (Hopefully you can do better...)","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                    default\u003dFalse,"},{"line_number":172,"context_line":"                    help\u003d\u0027Whether Ironic will attempt to \"clean\" a node \u0027"},{"line_number":173,"context_line":"                         \u0027between workloads and when moving from MANAGEABLE \u0027"},{"line_number":174,"context_line":"                         \u0027to AVAILABLE or DELETING to AVAILABLE. Cleaning is \u0027"},{"line_number":175,"context_line":"                         \u0027a configurable set of steps, such as erasing disk \u0027"},{"line_number":176,"context_line":"                         \u0027drives, that are performed on the node to ensure it \u0027"},{"line_number":177,"context_line":"                         \u0027is in a baseline state and ready to be deployed to. \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_abae5583","line":174,"in_reply_to":"9a80dd14_9b93cda2","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":184,"context_line":"CLEANING_INTERFACE_PRIORITY \u003d {"},{"line_number":185,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":186,"context_line":"    # by which driver is implementing the clean step. The step with largest"},{"line_number":187,"context_line":"    # cleaning interface priority is executed first in that case."},{"line_number":188,"context_line":"    \u0027power\u0027: 3,"},{"line_number":189,"context_line":"    \u0027management\u0027: 2,"},{"line_number":190,"context_line":"    \u0027deploy\u0027: 1"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_7bdd3970","line":187,"updated":"2015-03-05 03:22:41.000000000","message":"How about s/The step with/The clean step of the interface with the highest value here, will be executed first in that case./","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":184,"context_line":"CLEANING_INTERFACE_PRIORITY \u003d {"},{"line_number":185,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":186,"context_line":"    # by which driver is implementing the clean step. The step with largest"},{"line_number":187,"context_line":"    # cleaning interface priority is executed first in that case."},{"line_number":188,"context_line":"    \u0027power\u0027: 3,"},{"line_number":189,"context_line":"    \u0027management\u0027: 2,"},{"line_number":190,"context_line":"    \u0027deploy\u0027: 1"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ebde8d10","line":187,"in_reply_to":"9a80dd14_7bdd3970","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":830,"context_line":"            if task.node.provision_state !\u003d states.CLEANING:"},{"line_number":831,"context_line":"                raise exception.InvalidStateRequested(_("},{"line_number":832,"context_line":"                    \u0027Cannot continue cleaning on %(node)s, node is in \u0027"},{"line_number":833,"context_line":"                    \u0027%(state)s state, should be states.CLEANING\u0027) %"},{"line_number":834,"context_line":"                    {\u0027node\u0027: task.node.uuid,"},{"line_number":835,"context_line":"                     \u0027state\u0027: task.node.provision_state})"},{"line_number":836,"context_line":"            self._spawn_worker("}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_3bcbc1a6","line":833,"updated":"2015-03-05 03:22:41.000000000","message":"I think we want the value of states.CLEANING, not \u0027states.CLEANING\".\n\nHow about \u0027Cannot continue cleaning node %(node)s. It should be in provisioning state \"(exp_state)s\" but it is in \"(cur_state)s\" instead.\u0027","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":830,"context_line":"            if task.node.provision_state !\u003d states.CLEANING:"},{"line_number":831,"context_line":"                raise exception.InvalidStateRequested(_("},{"line_number":832,"context_line":"                    \u0027Cannot continue cleaning on %(node)s, node is in \u0027"},{"line_number":833,"context_line":"                    \u0027%(state)s state, should be states.CLEANING\u0027) %"},{"line_number":834,"context_line":"                    {\u0027node\u0027: task.node.uuid,"},{"line_number":835,"context_line":"                     \u0027state\u0027: task.node.provision_state})"},{"line_number":836,"context_line":"            self._spawn_worker("}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_6bd29d01","line":833,"in_reply_to":"9a80dd14_3bcbc1a6","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        LOG.debug(\u0027Starting cleaning for node %s\u0027, node.uuid)"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        if not CONF.conductor.clean_nodes:"},{"line_number":848,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":849,"context_line":"            node.clean_step \u003d None"},{"line_number":850,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %s to AVAILABLE.\u0027),"},{"line_number":851,"context_line":"                     node.uuid)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_9b482d2f","line":848,"updated":"2015-03-05 03:22:41.000000000","message":"how about \u0027Skip cleaning, move to AVAILABLE. Do not pass go\u0027. Ignore that 2nd sentence;)","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":845,"context_line":"        LOG.debug(\u0027Starting cleaning for node %s\u0027, node.uuid)"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        if not CONF.conductor.clean_nodes:"},{"line_number":848,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":849,"context_line":"            node.clean_step \u003d None"},{"line_number":850,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %s to AVAILABLE.\u0027),"},{"line_number":851,"context_line":"                     node.uuid)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2b37c54f","line":848,"in_reply_to":"9a80dd14_9b482d2f","updated":"2015-03-05 21:08:21.000000000","message":"Heh I was really tempted to add that second sentence :P","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":848,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":849,"context_line":"            node.clean_step \u003d None"},{"line_number":850,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %s to AVAILABLE.\u0027),"},{"line_number":851,"context_line":"                     node.uuid)"},{"line_number":852,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":853,"context_line":"            return"},{"line_number":854,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_3b5901ff","line":851,"updated":"2015-03-05 03:22:41.000000000","message":"I think it is better to put this at the end, as an informative msg to indicate that something was done or finished. So something like \u0027Cleaning is disabled, node has been successfully moved to AVAILABLE state.\u0027","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":848,"context_line":"            # Cleaning skipping, move to AVAILABLE"},{"line_number":849,"context_line":"            node.clean_step \u003d None"},{"line_number":850,"context_line":"            LOG.info(_LI(\u0027Cleaning disabled, moving node %s to AVAILABLE.\u0027),"},{"line_number":851,"context_line":"                     node.uuid)"},{"line_number":852,"context_line":"            task.process_event(\u0027done\u0027)"},{"line_number":853,"context_line":"            return"},{"line_number":854,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_6b40dda5","line":851,"in_reply_to":"9a80dd14_3b5901ff","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":859,"context_line":"        except (exception.InvalidParameterValue,"},{"line_number":860,"context_line":"                exception.MissingParameterValue) as e:"},{"line_number":861,"context_line":"            node.last_error \u003d (_(\u0027Failed to validate power driver interface. \u0027"},{"line_number":862,"context_line":"                               \u0027Can not clean instance. Error: %(msg)s\u0027) %"},{"line_number":863,"context_line":"                               {\u0027msg\u0027: e})"},{"line_number":864,"context_line":"            task.process_event(\u0027fail\u0027)"},{"line_number":865,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_db69c58c","line":862,"updated":"2015-03-05 03:22:41.000000000","message":"I know you didn\u0027t add it in this patch, but are we cleaning the instance or the node?","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":859,"context_line":"        except (exception.InvalidParameterValue,"},{"line_number":860,"context_line":"                exception.MissingParameterValue) as e:"},{"line_number":861,"context_line":"            node.last_error \u003d (_(\u0027Failed to validate power driver interface. \u0027"},{"line_number":862,"context_line":"                               \u0027Can not clean instance. Error: %(msg)s\u0027) %"},{"line_number":863,"context_line":"                               {\u0027msg\u0027: e})"},{"line_number":864,"context_line":"            task.process_event(\u0027fail\u0027)"},{"line_number":865,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0b7e81e4","line":862,"in_reply_to":"9a80dd14_db69c58c","updated":"2015-03-05 21:08:21.000000000","message":"I think that\u0027s debatable, but node is probably clearest, fixed.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":865,"context_line":"            return"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"        # Both IPA Agent and IPA iSCSI deploy drivers will require powering"},{"line_number":868,"context_line":"        # on the node to get clean steps."},{"line_number":869,"context_line":"        # Save the node\u0027s current power state, return it to that after cleaning"},{"line_number":870,"context_line":"        driver_info \u003d node.driver_internal_info"},{"line_number":871,"context_line":"        driver_info[\u0027post_cleaning_power_state\u0027] \u003d node.power_state"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_9b1d8d12","line":868,"updated":"2015-03-05 03:22:41.000000000","message":"Do you get the steps from the node-hw? Or do you mean s/to get clean steps/in order to clean the node/","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":865,"context_line":"            return"},{"line_number":866,"context_line":""},{"line_number":867,"context_line":"        # Both IPA Agent and IPA iSCSI deploy drivers will require powering"},{"line_number":868,"context_line":"        # on the node to get clean steps."},{"line_number":869,"context_line":"        # Save the node\u0027s current power state, return it to that after cleaning"},{"line_number":870,"context_line":"        driver_info \u003d node.driver_internal_info"},{"line_number":871,"context_line":"        driver_info[\u0027post_cleaning_power_state\u0027] \u003d node.power_state"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_6bb1bd8e","line":868,"in_reply_to":"9a80dd14_9b1d8d12","updated":"2015-03-05 21:08:21.000000000","message":"Well, both. It queries the agent for the available steps.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":899,"context_line":"        # Trim already executed steps"},{"line_number":900,"context_line":"        if last_step:"},{"line_number":901,"context_line":"            try:"},{"line_number":902,"context_line":"                steps \u003d _get_remaining_clean_steps(task, steps, last_step)"},{"line_number":903,"context_line":"            except ValueError:"},{"line_number":904,"context_line":"                msg \u003d (_(\u0027Node %(node)s got an invalid last step for \u0027"},{"line_number":905,"context_line":"                           \u0027cleaning/zapping: %(step)s.\u0027) %"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_9ee49b0e","line":902,"updated":"2015-03-05 03:22:41.000000000","message":"there\u0027s something odd here. The first time _do_next_clean_step() is called, last_step\u003d\u003d{}, so this will cause ValueError to be raised. Which isn\u0027t what you want, I don\u0027t think. Unless you added {} to the list of steps somehow.\n\nIt seems like all you need is an index (number) into steps (a list). I don\u0027t see why node.clean_step needs to be the step itself. But maybe I\u0027m missing something.\n\nAnd I don\u0027t see anywhere, that you\u0027re handling the case where there are 0 clean steps to do.\n\nMaybe I\u0027m too tired; I\u0027ll look at this tomorrow...","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":902,"context_line":"                steps \u003d _get_remaining_clean_steps(task, steps, last_step)"},{"line_number":903,"context_line":"            except ValueError:"},{"line_number":904,"context_line":"                msg \u003d (_(\u0027Node %(node)s got an invalid last step for \u0027"},{"line_number":905,"context_line":"                           \u0027cleaning/zapping: %(step)s.\u0027) %"},{"line_number":906,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":907,"context_line":"                LOG.exception(msg)"},{"line_number":908,"context_line":"                cleaning_error_handler(task, msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_7b6d3932","line":905,"updated":"2015-03-05 03:22:41.000000000","message":"Won\u0027t it be confusing to see \u0027cleaning/zapping\u0027? You know what state the node is in via provision_state, so why not use that instead.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":902,"context_line":"                steps \u003d _get_remaining_clean_steps(task, steps, last_step)"},{"line_number":903,"context_line":"            except ValueError:"},{"line_number":904,"context_line":"                msg \u003d (_(\u0027Node %(node)s got an invalid last step for \u0027"},{"line_number":905,"context_line":"                           \u0027cleaning/zapping: %(step)s.\u0027) %"},{"line_number":906,"context_line":"                       {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":907,"context_line":"                LOG.exception(msg)"},{"line_number":908,"context_line":"                cleaning_error_handler(task, msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0e04cf13","line":905,"in_reply_to":"9a80dd14_7b6d3932","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":927,"context_line":"                return"},{"line_number":928,"context_line":""},{"line_number":929,"context_line":"            # Check if the step is done or not. The step should return"},{"line_number":930,"context_line":"            # states.CLEANING if the step was is still being executed, or"},{"line_number":931,"context_line":"            # None if the step is done."},{"line_number":932,"context_line":"            if result is not None:"},{"line_number":933,"context_line":"                # Kill this worker, the async step will RPC call back to this"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_3e272f66","line":930,"updated":"2015-03-05 03:22:41.000000000","message":"s/was //","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":927,"context_line":"                return"},{"line_number":928,"context_line":""},{"line_number":929,"context_line":"            # Check if the step is done or not. The step should return"},{"line_number":930,"context_line":"            # states.CLEANING if the step was is still being executed, or"},{"line_number":931,"context_line":"            # None if the step is done."},{"line_number":932,"context_line":"            if result is not None:"},{"line_number":933,"context_line":"                # Kill this worker, the async step will RPC call back to this"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0e2bef82","line":930,"in_reply_to":"9a80dd14_3e272f66","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":931,"context_line":"            # None if the step is done."},{"line_number":932,"context_line":"            if result is not None:"},{"line_number":933,"context_line":"                # Kill this worker, the async step will RPC call back to this"},{"line_number":934,"context_line":"                # method to continue when"},{"line_number":935,"context_line":"                return"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"        # Clear clean_step"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_5eba23df","line":934,"updated":"2015-03-05 03:22:41.000000000","message":"the RPC call is to continue_node_clean(), which causes this to be called.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":931,"context_line":"            # None if the step is done."},{"line_number":932,"context_line":"            if result is not None:"},{"line_number":933,"context_line":"                # Kill this worker, the async step will RPC call back to this"},{"line_number":934,"context_line":"                # method to continue when"},{"line_number":935,"context_line":"                return"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"        # Clear clean_step"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_ee4e9b6e","line":934,"in_reply_to":"9a80dd14_5eba23df","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":934,"context_line":"                # method to continue when"},{"line_number":935,"context_line":"                return"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"        # Clear clean_step"},{"line_number":938,"context_line":"        _finish_cleaning(task)"},{"line_number":939,"context_line":""},{"line_number":940,"context_line":"    @messaging.expected_exceptions(exception.NoFreeConductorWorker,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_7e68c7ba","line":937,"updated":"2015-03-05 03:22:41.000000000","message":"This comment doesn\u0027t seem to add much value.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":934,"context_line":"                # method to continue when"},{"line_number":935,"context_line":"                return"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"        # Clear clean_step"},{"line_number":938,"context_line":"        _finish_cleaning(task)"},{"line_number":939,"context_line":""},{"line_number":940,"context_line":"    @messaging.expected_exceptions(exception.NoFreeConductorWorker,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0e520f13","line":937,"in_reply_to":"9a80dd14_7e68c7ba","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":1979,"context_line":""},{"line_number":1980,"context_line":""},{"line_number":1981,"context_line":"def cleaning_error_handler(task, msg):"},{"line_number":1982,"context_line":"    \"\"\"Put a failed node in CLEANFAIL and maintenance.\"\"\""},{"line_number":1983,"context_line":"    # Reset clean step, msg should include current step"},{"line_number":1984,"context_line":"    task.node.clean_step \u003d {}"},{"line_number":1985,"context_line":"    task.node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_5ba5d551","line":1982,"updated":"2015-03-05 03:22:41.000000000","message":"Maybe I\u0027m wrong, but I think this might be used if a node is in zapping or cleaning, so it won\u0027t always be in CLEANFAIL.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":1979,"context_line":""},{"line_number":1980,"context_line":""},{"line_number":1981,"context_line":"def cleaning_error_handler(task, msg):"},{"line_number":1982,"context_line":"    \"\"\"Put a failed node in CLEANFAIL and maintenance.\"\"\""},{"line_number":1983,"context_line":"    # Reset clean step, msg should include current step"},{"line_number":1984,"context_line":"    task.node.clean_step \u003d {}"},{"line_number":1985,"context_line":"    task.node.last_error \u003d msg"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_6e42ab3f","line":1982,"in_reply_to":"9a80dd14_5ba5d551","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":1998,"context_line":"    node \u003d task.node"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"    LOG.debug(\u0027Resuming cleaning/zapping on node %(node)s from \u0027"},{"line_number":2001,"context_line":"              \u0027%(step)s\u0027, {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":2002,"context_line":"    # Determine where in the list of steps we are"},{"line_number":2003,"context_line":"    # Will raise ValueError here if last_step doesn\u0027t exist in steps."},{"line_number":2004,"context_line":"    step_index \u003d steps.index(last_step)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_fb63e917","line":2001,"updated":"2015-03-05 03:22:41.000000000","message":"This doesn\u0027t match what the method is actually doing. What is done with the list outside this method, shouldn\u0027t be logged here.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":1998,"context_line":"    node \u003d task.node"},{"line_number":1999,"context_line":""},{"line_number":2000,"context_line":"    LOG.debug(\u0027Resuming cleaning/zapping on node %(node)s from \u0027"},{"line_number":2001,"context_line":"              \u0027%(step)s\u0027, {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step})"},{"line_number":2002,"context_line":"    # Determine where in the list of steps we are"},{"line_number":2003,"context_line":"    # Will raise ValueError here if last_step doesn\u0027t exist in steps."},{"line_number":2004,"context_line":"    step_index \u003d steps.index(last_step)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_0eee8f22","line":2001,"in_reply_to":"9a80dd14_fb63e917","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":2006,"context_line":"    # Cut off current step (is now finished)"},{"line_number":2007,"context_line":"    steps \u003d steps[step_index + 1:]"},{"line_number":2008,"context_line":"    LOG.info(_LI(\u0027Remaining clean/zap steps for node %(node)s: \u0027"},{"line_number":2009,"context_line":"                 \u0027%(steps)s\u0027), {\u0027node\u0027: node.uuid, \u0027steps\u0027: steps})"},{"line_number":2010,"context_line":"    return steps"},{"line_number":2011,"context_line":""},{"line_number":2012,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_9b5bcd53","line":2009,"updated":"2015-03-05 03:22:41.000000000","message":"This seems more like a debug than an info. Info should be used for eg status of an operation. This method is only returning a list of stuff.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":2006,"context_line":"    # Cut off current step (is now finished)"},{"line_number":2007,"context_line":"    steps \u003d steps[step_index + 1:]"},{"line_number":2008,"context_line":"    LOG.info(_LI(\u0027Remaining clean/zap steps for node %(node)s: \u0027"},{"line_number":2009,"context_line":"                 \u0027%(steps)s\u0027), {\u0027node\u0027: node.uuid, \u0027steps\u0027: steps})"},{"line_number":2010,"context_line":"    return steps"},{"line_number":2011,"context_line":""},{"line_number":2012,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_8ec0bf7d","line":2009,"in_reply_to":"9a80dd14_9b5bcd53","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":2034,"context_line":"            for step in driver_interface.get_clean_steps():"},{"line_number":2035,"context_line":"                if not enabled or step[\u0027priority\u0027] \u003e 0:"},{"line_number":2036,"context_line":"                    steps.append(step)"},{"line_number":2037,"context_line":"    # Reverse the keys so we can execute from first to last"},{"line_number":2038,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"},{"line_number":2039,"context_line":""},{"line_number":2040,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_1b1efd70","line":2037,"updated":"2015-03-05 03:22:41.000000000","message":"How about \u0027sort the steps from higher priority to lower priority\u0027.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":2034,"context_line":"            for step in driver_interface.get_clean_steps():"},{"line_number":2035,"context_line":"                if not enabled or step[\u0027priority\u0027] \u003e 0:"},{"line_number":2036,"context_line":"                    steps.append(step)"},{"line_number":2037,"context_line":"    # Reverse the keys so we can execute from first to last"},{"line_number":2038,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"},{"line_number":2039,"context_line":""},{"line_number":2040,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2e5a73f3","line":2037,"in_reply_to":"9a80dd14_1b1efd70","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":2038,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"},{"line_number":2039,"context_line":""},{"line_number":2040,"context_line":""},{"line_number":2041,"context_line":"def _finish_cleaning(task):"},{"line_number":2042,"context_line":"    node \u003d task.node"},{"line_number":2043,"context_line":"    node.clean_step \u003d None"},{"line_number":2044,"context_line":"    LOG.info(_LI(\u0027Node %s cleaning complete\u0027) % node.uuid)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_fe8f5721","line":2041,"updated":"2015-03-05 03:22:41.000000000","message":"if the cleaning finishes (either successfully or not), do you still want to keep the cleaning steps around in node.driver_internal_info?","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":2038,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"},{"line_number":2039,"context_line":""},{"line_number":2040,"context_line":""},{"line_number":2041,"context_line":"def _finish_cleaning(task):"},{"line_number":2042,"context_line":"    node \u003d task.node"},{"line_number":2043,"context_line":"    node.clean_step \u003d None"},{"line_number":2044,"context_line":"    LOG.info(_LI(\u0027Node %s cleaning complete\u0027) % node.uuid)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_6e262bd0","line":2041,"in_reply_to":"9a80dd14_fe8f5721","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"    if not target_power_state:"},{"line_number":2053,"context_line":"        LOG.warning(_LW(\u0027Node %(node)s does not have a \u0027"},{"line_number":2054,"context_line":"                        \u0027\"post_cleaning_power_state\", leaving it in power \u0027"},{"line_number":2055,"context_line":"                        \u0027states %(state)s after cleaning.\u0027),"},{"line_number":2056,"context_line":"                    {\u0027node\u0027: node.uuid, \u0027state\u0027: node.power_state})"},{"line_number":2057,"context_line":"    if target_power_state and node.power_state !\u003d target_power_state:"},{"line_number":2058,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_3e0acf21","line":2055,"updated":"2015-03-05 03:22:41.000000000","message":"s/states/state/","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":2052,"context_line":"    if not target_power_state:"},{"line_number":2053,"context_line":"        LOG.warning(_LW(\u0027Node %(node)s does not have a \u0027"},{"line_number":2054,"context_line":"                        \u0027\"post_cleaning_power_state\", leaving it in power \u0027"},{"line_number":2055,"context_line":"                        \u0027states %(state)s after cleaning.\u0027),"},{"line_number":2056,"context_line":"                    {\u0027node\u0027: node.uuid, \u0027state\u0027: node.power_state})"},{"line_number":2057,"context_line":"    if target_power_state and node.power_state !\u003d target_power_state:"},{"line_number":2058,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_2e28b333","line":2055,"in_reply_to":"9a80dd14_3e0acf21","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ea4d363af3210d9482ce10f5281e9e7b256e8c07","unresolved":false,"context_lines":[{"line_number":2063,"context_line":"                   {\u0027node\u0027: node.uuid, \u0027state\u0027: target_power_state})"},{"line_number":2064,"context_line":"            LOG.exception(msg)"},{"line_number":2065,"context_line":"            cleaning_error_handler(task, msg)"},{"line_number":2066,"context_line":"    task.process_event(\u0027done\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_3e580f32","line":2066,"updated":"2015-03-05 03:22:41.000000000","message":"Do you want this to be done even if the exception occurred above? cleaning_error_handler() would have set the node to *FAIL, so this won\u0027t work.","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ab7f4c5f43daa4c62b585afedd4b0a8c4441cab7","unresolved":false,"context_lines":[{"line_number":2063,"context_line":"                   {\u0027node\u0027: node.uuid, \u0027state\u0027: target_power_state})"},{"line_number":2064,"context_line":"            LOG.exception(msg)"},{"line_number":2065,"context_line":"            cleaning_error_handler(task, msg)"},{"line_number":2066,"context_line":"    task.process_event(\u0027done\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9a80dd14_4e2b2730","line":2066,"in_reply_to":"9a80dd14_3e580f32","updated":"2015-03-05 21:08:21.000000000","message":"Done","commit_id":"52c20a668439a14a3a4e82b54a8e468231c1a1f5"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"60da89eb6a64193e18c6521eaf730fcffa0e4cdb","unresolved":false,"context_lines":[{"line_number":825,"context_line":"        :raises: NodeNotFound if the node no longer appears in the database"},{"line_number":826,"context_line":""},{"line_number":827,"context_line":"        \"\"\""},{"line_number":828,"context_line":"        LOG.debug(\"RPC continue_node_clean called for node %s.\" % node_id)"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":831,"context_line":"            if task.node.provision_state !\u003d states.CLEANING:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_f42f45f4","line":828,"updated":"2015-03-05 21:57:49.000000000","message":"nit: should use , nit % here","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fd95a9285999ab4e67630d815e054256d57c40a0","unresolved":false,"context_lines":[{"line_number":825,"context_line":"        :raises: NodeNotFound if the node no longer appears in the database"},{"line_number":826,"context_line":""},{"line_number":827,"context_line":"        \"\"\""},{"line_number":828,"context_line":"        LOG.debug(\"RPC continue_node_clean called for node %s.\" % node_id)"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dFalse) as task:"},{"line_number":831,"context_line":"            if task.node.provision_state !\u003d states.CLEANING:"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_c3b52532","line":828,"in_reply_to":"9a80dd14_f42f45f4","updated":"2015-03-05 23:38:43.000000000","message":"Done","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"97ebcf13e61408cdefd737795f68aa3f2560f3ce","unresolved":false,"context_lines":[{"line_number":871,"context_line":"            task.driver.deploy.prepare_cleaning(task)"},{"line_number":872,"context_line":"        except Exception:"},{"line_number":873,"context_line":"            msg \u003d _(\u0027Failed to prepare for cleaning for node %s\u0027) % node.uuid"},{"line_number":874,"context_line":"            LOG.exception(msg)"},{"line_number":875,"context_line":"            return cleaning_error_handler(task, msg)"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_c078c0f4","line":874,"updated":"2015-03-05 21:59:04.000000000","message":"I don\u0027t like this.  Could have a syntax error here and this could be raised.  Of course the unit tests should catch it :)\n\nI think should pass the Exception\u0027s message in the \u0027msg\u0027.","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fd95a9285999ab4e67630d815e054256d57c40a0","unresolved":false,"context_lines":[{"line_number":871,"context_line":"            task.driver.deploy.prepare_cleaning(task)"},{"line_number":872,"context_line":"        except Exception:"},{"line_number":873,"context_line":"            msg \u003d _(\u0027Failed to prepare for cleaning for node %s\u0027) % node.uuid"},{"line_number":874,"context_line":"            LOG.exception(msg)"},{"line_number":875,"context_line":"            return cleaning_error_handler(task, msg)"},{"line_number":876,"context_line":""},{"line_number":877,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_a3e83111","line":874,"in_reply_to":"9a80dd14_c078c0f4","updated":"2015-03-05 23:38:43.000000000","message":"Done","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ffc8bb88f637f25f2d51e8911fd637fccd781b63","unresolved":false,"context_lines":[{"line_number":881,"context_line":"        node.save()"},{"line_number":882,"context_line":"        self._do_next_clean_step(task,"},{"line_number":883,"context_line":"                                 node.driver_internal_info[\u0027clean_steps\u0027],"},{"line_number":884,"context_line":"                                 node.clean_step)"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    def _do_next_clean_step(self, task, steps, last_step):"},{"line_number":887,"context_line":"        \"\"\"Execute next clean or zap step."}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_e8ef6685","line":884,"updated":"2015-03-05 23:17:05.000000000","message":"Maybe this should just be:\n {})\n\nThoughts??","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fd95a9285999ab4e67630d815e054256d57c40a0","unresolved":false,"context_lines":[{"line_number":881,"context_line":"        node.save()"},{"line_number":882,"context_line":"        self._do_next_clean_step(task,"},{"line_number":883,"context_line":"                                 node.driver_internal_info[\u0027clean_steps\u0027],"},{"line_number":884,"context_line":"                                 node.clean_step)"},{"line_number":885,"context_line":""},{"line_number":886,"context_line":"    def _do_next_clean_step(self, task, steps, last_step):"},{"line_number":887,"context_line":"        \"\"\"Execute next clean or zap step."}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_635f1942","line":884,"in_reply_to":"9a80dd14_e8ef6685","updated":"2015-03-05 23:38:43.000000000","message":"I think it\u0027s more easily understandable as it is, even though yes, it is pretty much a static parameter.","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ffc8bb88f637f25f2d51e8911fd637fccd781b63","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                return"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"            # Check if the step is done or not. The step should return"},{"line_number":932,"context_line":"            # states.CLEANING if the step is still being executed, or"},{"line_number":933,"context_line":"            # None if the step is done."},{"line_number":934,"context_line":"            if result is not None:"},{"line_number":935,"context_line":"                # Kill this worker, the async step will make an RPC call to"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_6369d9bd","line":932,"updated":"2015-03-05 23:17:05.000000000","message":"Should the return value states.CLEANING be checked for?","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fd95a9285999ab4e67630d815e054256d57c40a0","unresolved":false,"context_lines":[{"line_number":929,"context_line":"                return"},{"line_number":930,"context_line":""},{"line_number":931,"context_line":"            # Check if the step is done or not. The step should return"},{"line_number":932,"context_line":"            # states.CLEANING if the step is still being executed, or"},{"line_number":933,"context_line":"            # None if the step is done."},{"line_number":934,"context_line":"            if result is not None:"},{"line_number":935,"context_line":"                # Kill this worker, the async step will make an RPC call to"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_a3303102","line":932,"in_reply_to":"9a80dd14_6369d9bd","updated":"2015-03-05 23:38:43.000000000","message":"Done","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"60da89eb6a64193e18c6521eaf730fcffa0e4cdb","unresolved":false,"context_lines":[{"line_number":948,"context_line":"                   % node.uuid)"},{"line_number":949,"context_line":"            LOG.exception(msg)"},{"line_number":950,"context_line":"            return cleaning_error_handler(task, msg)"},{"line_number":951,"context_line":"        LOG.info(_LI(\u0027Node %s cleaning complete\u0027) % node.uuid)"},{"line_number":952,"context_line":"        task.process_event(\u0027done\u0027)"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":"    @messaging.expected_exceptions(exception.NoFreeConductorWorker,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_f43585f7","line":951,"updated":"2015-03-05 21:57:49.000000000","message":"s/ % / , /\nto be consistent with lines 854-855","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fd95a9285999ab4e67630d815e054256d57c40a0","unresolved":false,"context_lines":[{"line_number":948,"context_line":"                   % node.uuid)"},{"line_number":949,"context_line":"            LOG.exception(msg)"},{"line_number":950,"context_line":"            return cleaning_error_handler(task, msg)"},{"line_number":951,"context_line":"        LOG.info(_LI(\u0027Node %s cleaning complete\u0027) % node.uuid)"},{"line_number":952,"context_line":"        task.process_event(\u0027done\u0027)"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":"    @messaging.expected_exceptions(exception.NoFreeConductorWorker,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_c351a5d9","line":951,"in_reply_to":"9a80dd14_f43585f7","updated":"2015-03-05 23:38:43.000000000","message":"Done","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"bd9bf96844fe258a38cf9f49ac5c530cabc20a0b","unresolved":false,"context_lines":[{"line_number":2004,"context_line":"    task.process_event(\u0027fail\u0027)"},{"line_number":2005,"context_line":""},{"line_number":2006,"context_line":""},{"line_number":2007,"context_line":"def _get_remaining_clean_steps(task, steps, last_step):"},{"line_number":2008,"context_line":"    \"\"\"Trim all previously executed clean/zap steps."},{"line_number":2009,"context_line":""},{"line_number":2010,"context_line":"    :raises: ValueError if last_step doesn\u0027t exist in steps."}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_8a4a62c3","line":2007,"updated":"2015-03-05 22:19:50.000000000","message":"I think there should be a unittest for this.","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fd95a9285999ab4e67630d815e054256d57c40a0","unresolved":false,"context_lines":[{"line_number":2004,"context_line":"    task.process_event(\u0027fail\u0027)"},{"line_number":2005,"context_line":""},{"line_number":2006,"context_line":""},{"line_number":2007,"context_line":"def _get_remaining_clean_steps(task, steps, last_step):"},{"line_number":2008,"context_line":"    \"\"\"Trim all previously executed clean/zap steps."},{"line_number":2009,"context_line":""},{"line_number":2010,"context_line":"    :raises: ValueError if last_step doesn\u0027t exist in steps."}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_2328c133","line":2007,"in_reply_to":"9a80dd14_8a4a62c3","updated":"2015-03-05 23:38:43.000000000","message":"It is never mocked out in _do_next_clean_step\u0027s test (which are pretty extensive), so it is tested in all those tests. The function is so simple, I felt unittesting it on it\u0027s own would be silly (we\u0027d basically be making sure .index() and list indexing work).","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"60da89eb6a64193e18c6521eaf730fcffa0e4cdb","unresolved":false,"context_lines":[{"line_number":2019,"context_line":"    # Cut off current step (is now finished)"},{"line_number":2020,"context_line":"    steps \u003d steps[step_index + 1:]"},{"line_number":2021,"context_line":"    LOG.debug(\u0027Remaining %(state)s steps for node %(node)s: \u0027"},{"line_number":2022,"context_line":"              \u0027%(steps)s\u0027 % {\u0027node\u0027: node.uuid, \u0027steps\u0027: steps,"},{"line_number":2023,"context_line":"                             \u0027state\u0027: node.provision_state})"},{"line_number":2024,"context_line":"    return steps"},{"line_number":2025,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_949449e3","line":2022,"updated":"2015-03-05 21:57:49.000000000","message":"NIt: should use , instead of %","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fd95a9285999ab4e67630d815e054256d57c40a0","unresolved":false,"context_lines":[{"line_number":2019,"context_line":"    # Cut off current step (is now finished)"},{"line_number":2020,"context_line":"    steps \u003d steps[step_index + 1:]"},{"line_number":2021,"context_line":"    LOG.debug(\u0027Remaining %(state)s steps for node %(node)s: \u0027"},{"line_number":2022,"context_line":"              \u0027%(steps)s\u0027 % {\u0027node\u0027: node.uuid, \u0027steps\u0027: steps,"},{"line_number":2023,"context_line":"                             \u0027state\u0027: node.provision_state})"},{"line_number":2024,"context_line":"    return steps"},{"line_number":2025,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_43b055f4","line":2022,"in_reply_to":"9a80dd14_949449e3","updated":"2015-03-05 23:38:43.000000000","message":"Done","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"f152f8c891d3f3af8115c8e053cc1c82ad18942d","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        cfg.BoolOpt(\u0027clean_nodes\u0027,"},{"line_number":171,"context_line":"                    default\u003dFalse,"},{"line_number":172,"context_line":"                    help\u003d\u0027Whether Ironic will attempt to \"clean\" a node \u0027"},{"line_number":173,"context_line":"                         \u0027when preparing a node for deployments and after\u0027"},{"line_number":174,"context_line":"                         \u0027an instance is deleted from a node. Cleaning is \u0027"},{"line_number":175,"context_line":"                         \u0027a configurable set of steps, such as erasing disk \u0027"},{"line_number":176,"context_line":"                         \u0027drives, that are performed on the node to ensure it \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_654eea3c","line":173,"updated":"2015-03-09 09:58:30.000000000","message":"nit: s/deployments and/ deployments or/ ? \nnit: s/after\u0027/after \u0027 (space?)","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        cfg.BoolOpt(\u0027clean_nodes\u0027,"},{"line_number":171,"context_line":"                    default\u003dFalse,"},{"line_number":172,"context_line":"                    help\u003d\u0027Whether Ironic will attempt to \"clean\" a node \u0027"},{"line_number":173,"context_line":"                         \u0027when preparing a node for deployments and after\u0027"},{"line_number":174,"context_line":"                         \u0027an instance is deleted from a node. Cleaning is \u0027"},{"line_number":175,"context_line":"                         \u0027a configurable set of steps, such as erasing disk \u0027"},{"line_number":176,"context_line":"                         \u0027drives, that are performed on the node to ensure it \u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_c592fb55","line":173,"in_reply_to":"9a80dd14_654eea3c","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"f152f8c891d3f3af8115c8e053cc1c82ad18942d","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"CLEANING_INTERFACE_PRIORITY \u003d {"},{"line_number":185,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":186,"context_line":"    # by which driver is implementing the clean step. The clean step of the"},{"line_number":187,"context_line":"    # interface with the highest value here, will be executed first in that"},{"line_number":188,"context_line":"    # case."},{"line_number":189,"context_line":"    \u0027power\u0027: 3,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_85f75ed2","line":186,"updated":"2015-03-09 09:58:30.000000000","message":"driver\u0027s interface is implementing?","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"CLEANING_INTERFACE_PRIORITY \u003d {"},{"line_number":185,"context_line":"    # When two clean steps have the same priority, their order is determined"},{"line_number":186,"context_line":"    # by which driver is implementing the clean step. The clean step of the"},{"line_number":187,"context_line":"    # interface with the highest value here, will be executed first in that"},{"line_number":188,"context_line":"    # case."},{"line_number":189,"context_line":"    \u0027power\u0027: 3,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_258bd71f","line":186,"in_reply_to":"9a80dd14_85f75ed2","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"f152f8c891d3f3af8115c8e053cc1c82ad18942d","unresolved":false,"context_lines":[{"line_number":870,"context_line":"        try:"},{"line_number":871,"context_line":"            prepare_result \u003d task.driver.deploy.prepare_cleaning(task)"},{"line_number":872,"context_line":"        except Exception as e:"},{"line_number":873,"context_line":"            msg \u003d (_(\u0027Failed to prepare for cleaning for node %(node)s: %(e)s\u0027)"},{"line_number":874,"context_line":"                   % {\u0027node\u0027: node.uuid, \u0027e\u0027: e})"},{"line_number":875,"context_line":"            LOG.exception(msg)"},{"line_number":876,"context_line":"            return cleaning_error_handler(task, msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_85ccbe8a","line":873,"updated":"2015-03-09 09:58:30.000000000","message":"nit: s/prepare for cleaning for node / prepare the node %(node)s for cleaning/  sounds better?","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":870,"context_line":"        try:"},{"line_number":871,"context_line":"            prepare_result \u003d task.driver.deploy.prepare_cleaning(task)"},{"line_number":872,"context_line":"        except Exception as e:"},{"line_number":873,"context_line":"            msg \u003d (_(\u0027Failed to prepare for cleaning for node %(node)s: %(e)s\u0027)"},{"line_number":874,"context_line":"                   % {\u0027node\u0027: node.uuid, \u0027e\u0027: e})"},{"line_number":875,"context_line":"            LOG.exception(msg)"},{"line_number":876,"context_line":"            return cleaning_error_handler(task, msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_65814ffa","line":873,"in_reply_to":"9a80dd14_85ccbe8a","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"53bb8ed14c5f509027ea27a2882934cc79cffef5","unresolved":false,"context_lines":[{"line_number":939,"context_line":"            if result \u003d\u003d states.CLEANING:"},{"line_number":940,"context_line":"                # Kill this worker, the async step will make an RPC call to"},{"line_number":941,"context_line":"                # continue_node_clean to continue cleaning"},{"line_number":942,"context_line":"                return"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"        # Clear clean_step"},{"line_number":945,"context_line":"        node.clean_step \u003d None"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_9ef2a0d0","line":942,"updated":"2015-03-05 23:50:51.000000000","message":"Any value to:\n elif result is not None:\n    raise SomeException()","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":939,"context_line":"            if result \u003d\u003d states.CLEANING:"},{"line_number":940,"context_line":"                # Kill this worker, the async step will make an RPC call to"},{"line_number":941,"context_line":"                # continue_node_clean to continue cleaning"},{"line_number":942,"context_line":"                return"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"        # Clear clean_step"},{"line_number":945,"context_line":"        node.clean_step \u003d None"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_25b917cc","line":942,"in_reply_to":"9a80dd14_9ef2a0d0","updated":"2015-03-10 15:39:05.000000000","message":"Sure, why not?","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"f152f8c891d3f3af8115c8e053cc1c82ad18942d","unresolved":false,"context_lines":[{"line_number":2001,"context_line":"    \"\"\"Put a failed node in CLEANFAIL or ZAPFAIL and maintenance.\"\"\""},{"line_number":2002,"context_line":"    # Reset clean step, msg should include current step"},{"line_number":2003,"context_line":"    if task.node.provision_state \u003d\u003d states.CLEANING:"},{"line_number":2004,"context_line":"        task.node.clean_step \u003d {}"},{"line_number":2005,"context_line":"    task.node.last_error \u003d msg"},{"line_number":2006,"context_line":"    task.node.maintenance \u003d True"},{"line_number":2007,"context_line":"    task.node.maintenance_reason \u003d msg"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_c54316ad","line":2004,"updated":"2015-03-09 09:58:30.000000000","message":"how do we resume back if we clear the clean step?","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":2001,"context_line":"    \"\"\"Put a failed node in CLEANFAIL or ZAPFAIL and maintenance.\"\"\""},{"line_number":2002,"context_line":"    # Reset clean step, msg should include current step"},{"line_number":2003,"context_line":"    if task.node.provision_state \u003d\u003d states.CLEANING:"},{"line_number":2004,"context_line":"        task.node.clean_step \u003d {}"},{"line_number":2005,"context_line":"    task.node.last_error \u003d msg"},{"line_number":2006,"context_line":"    task.node.maintenance \u003d True"},{"line_number":2007,"context_line":"    task.node.maintenance_reason \u003d msg"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_002ec18b","line":2004,"in_reply_to":"9a80dd14_c54316ad","updated":"2015-03-10 15:39:05.000000000","message":"We\u0027ll restart from the beginning.","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"f152f8c891d3f3af8115c8e053cc1c82ad18942d","unresolved":false,"context_lines":[{"line_number":2041,"context_line":"    :param task: A TaskManager object"},{"line_number":2042,"context_line":"    :param enabled: If True, returns only enabled (priority \u003e 0) steps. If"},{"line_number":2043,"context_line":"        False, returns all clean steps."},{"line_number":2044,"context_line":"    :returns: A list of CleanSteps, sorted with largest priority as the"},{"line_number":2045,"context_line":"        first item"},{"line_number":2046,"context_line":"    \"\"\""},{"line_number":2047,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_c5df96d4","line":2044,"updated":"2015-03-09 09:58:30.000000000","message":"nit:s/CleanSteps/clean steps/ , as namedtuple is removed?","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":2041,"context_line":"    :param task: A TaskManager object"},{"line_number":2042,"context_line":"    :param enabled: If True, returns only enabled (priority \u003e 0) steps. If"},{"line_number":2043,"context_line":"        False, returns all clean steps."},{"line_number":2044,"context_line":"    :returns: A list of CleanSteps, sorted with largest priority as the"},{"line_number":2045,"context_line":"        first item"},{"line_number":2046,"context_line":"    \"\"\""},{"line_number":2047,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_407a7988","line":2044,"in_reply_to":"9a80dd14_c5df96d4","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":876,"context_line":"            return cleaning_error_handler(task, msg)"},{"line_number":877,"context_line":"        if prepare_result \u003d\u003d states.CLEANING:"},{"line_number":878,"context_line":"            # Prepare is asynchronous, the deploy driver will need to"},{"line_number":879,"context_line":"            # call _get_cleaning_steps and then RPC to continue_node_cleaning"},{"line_number":880,"context_line":"            return"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_dc239fbc","line":879,"updated":"2015-03-10 19:54:37.000000000","message":"I\u0027m not sure I understand this.\n\nIf it is asynchronous, what\u0027s the mechanism used to know that it is done?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3a9de04ac9b1374885cb6b57f6889a586255f899","unresolved":false,"context_lines":[{"line_number":876,"context_line":"            return cleaning_error_handler(task, msg)"},{"line_number":877,"context_line":"        if prepare_result \u003d\u003d states.CLEANING:"},{"line_number":878,"context_line":"            # Prepare is asynchronous, the deploy driver will need to"},{"line_number":879,"context_line":"            # call _get_cleaning_steps and then RPC to continue_node_cleaning"},{"line_number":880,"context_line":"            return"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_f5703642","line":879,"in_reply_to":"9a80dd14_2104587d","updated":"2015-03-11 23:50:14.000000000","message":"How does that tie in with \u0027the deploy driver will need to call _get_cleaning_steps...etc\u0027? Who/what invokes/sends an API (and what\u0027s that API) so that deploy driver knows to do that? and where is the code in the deploy driver that does what you mention in the comment? Or is it not written yet?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":876,"context_line":"            return cleaning_error_handler(task, msg)"},{"line_number":877,"context_line":"        if prepare_result \u003d\u003d states.CLEANING:"},{"line_number":878,"context_line":"            # Prepare is asynchronous, the deploy driver will need to"},{"line_number":879,"context_line":"            # call _get_cleaning_steps and then RPC to continue_node_cleaning"},{"line_number":880,"context_line":"            return"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_2104587d","line":879,"in_reply_to":"9a80dd14_dc239fbc","updated":"2015-03-11 23:24:36.000000000","message":"prepare_cleaning would be able to call some action that will return later (boot the agent, for example, which will finish when the first heartbeat comes in). Similar to how the pxe driver boots the node and does the rest of the work on the callback.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"669e4dab3392e8fd909e2b9207165ff3394830f4","unresolved":false,"context_lines":[{"line_number":876,"context_line":"            return cleaning_error_handler(task, msg)"},{"line_number":877,"context_line":"        if prepare_result \u003d\u003d states.CLEANING:"},{"line_number":878,"context_line":"            # Prepare is asynchronous, the deploy driver will need to"},{"line_number":879,"context_line":"            # call _get_cleaning_steps and then RPC to continue_node_cleaning"},{"line_number":880,"context_line":"            return"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_b6d5e4b8","line":879,"in_reply_to":"9a80dd14_f5703642","updated":"2015-03-12 01:43:19.000000000","message":"Ahh, sorry. The driver will need to complete the clean step bits below on it\u0027s own, since continue_node_clean will call _do_next_clean_step. I\u0027ll update the docs here and in prepare_cleaning.\n\nI implemented it in the IPA vendor passthru driver here:\nhttps://review.openstack.org/#/c/161453/3/ironic/drivers/modules/agent_base_vendor.py","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":889,"context_line":"                                 node.clean_step)"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _do_next_clean_step(self, task, steps, last_step):"},{"line_number":892,"context_line":"        \"\"\"Execute next clean or zap step."},{"line_number":893,"context_line":""},{"line_number":894,"context_line":"        :param task: a TaskManager instance with an exclusive lock"},{"line_number":895,"context_line":"        :param steps: The complete list of steps that need to be executed"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_7f670526","line":892,"updated":"2015-03-10 19:54:37.000000000","message":"This could be doing more than one clean step.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":889,"context_line":"                                 node.clean_step)"},{"line_number":890,"context_line":""},{"line_number":891,"context_line":"    def _do_next_clean_step(self, task, steps, last_step):"},{"line_number":892,"context_line":"        \"\"\"Execute next clean or zap step."},{"line_number":893,"context_line":""},{"line_number":894,"context_line":"        :param task: a TaskManager instance with an exclusive lock"},{"line_number":895,"context_line":"        :param steps: The complete list of steps that need to be executed"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_c139bc40","line":892,"in_reply_to":"9a80dd14_7f670526","updated":"2015-03-11 23:24:36.000000000","message":"Done","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":911,"context_line":"                LOG.exception(msg)"},{"line_number":912,"context_line":"                return cleaning_error_handler(task, msg)"},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"        LOG.debug(\u0027Resuming %(state)s on node %(node)s from \u0027"},{"line_number":915,"context_line":"                  \u0027%(step)s\u0027, {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step,"},{"line_number":916,"context_line":"                               \u0027state\u0027: node.provision_state})"},{"line_number":917,"context_line":"        # Execute each step until we hit an async step or run out of steps"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_9faaf983","line":914,"updated":"2015-03-10 19:54:37.000000000","message":"Is it clear that you aren\u0027t resuming by starting with that step?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":911,"context_line":"                LOG.exception(msg)"},{"line_number":912,"context_line":"                return cleaning_error_handler(task, msg)"},{"line_number":913,"context_line":""},{"line_number":914,"context_line":"        LOG.debug(\u0027Resuming %(state)s on node %(node)s from \u0027"},{"line_number":915,"context_line":"                  \u0027%(step)s\u0027, {\u0027node\u0027: node.uuid, \u0027step\u0027: last_step,"},{"line_number":916,"context_line":"                               \u0027state\u0027: node.provision_state})"},{"line_number":917,"context_line":"        # Execute each step until we hit an async step or run out of steps"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_47e07ccc","line":914,"in_reply_to":"9a80dd14_9faaf983","updated":"2015-03-11 23:24:36.000000000","message":"It likely isn\u0027t clear, I\u0027ll fix it to be more clear.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":945,"context_line":"                         \u0027%(node)s, interface %(interface)s returned invalid \u0027"},{"line_number":946,"context_line":"                         \u0027value: %(val)s\u0027) %"},{"line_number":947,"context_line":"                       {\u0027step\u0027: step.get(\u0027step\u0027), \u0027node\u0027: node.uuid,"},{"line_number":948,"context_line":"                        \u0027interface\u0027: step.get(\u0027interface\u0027), \u0027val\u0027: result})"},{"line_number":949,"context_line":"                LOG.error(msg)"},{"line_number":950,"context_line":"                cleaning_error_handler(task, msg)"},{"line_number":951,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_a2088629","line":948,"updated":"2015-03-10 19:54:37.000000000","message":"I\u0027m curious to know why you don\u0027t just spit out all of the step dictionary here, whereas you did so above when an exception is raised.\n\nAlso, I think we should assume that step[\u0027interface\u0027] and step[\u0027step\u0027] exist.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":945,"context_line":"                         \u0027%(node)s, interface %(interface)s returned invalid \u0027"},{"line_number":946,"context_line":"                         \u0027value: %(val)s\u0027) %"},{"line_number":947,"context_line":"                       {\u0027step\u0027: step.get(\u0027step\u0027), \u0027node\u0027: node.uuid,"},{"line_number":948,"context_line":"                        \u0027interface\u0027: step.get(\u0027interface\u0027), \u0027val\u0027: result})"},{"line_number":949,"context_line":"                LOG.error(msg)"},{"line_number":950,"context_line":"                cleaning_error_handler(task, msg)"},{"line_number":951,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_87851409","line":948,"in_reply_to":"9a80dd14_a2088629","updated":"2015-03-11 23:24:36.000000000","message":"Agreed on both. I\u0027ll just dump the whole dict.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":955,"context_line":"        driver_info[\u0027clean_steps\u0027] \u003d None"},{"line_number":956,"context_line":"        node.driver_internal_info \u003d driver_info"},{"line_number":957,"context_line":"        try:"},{"line_number":958,"context_line":"            task.driver.deploy.tear_down_cleaning(task)"},{"line_number":959,"context_line":"        except Exception as e:"},{"line_number":960,"context_line":"            msg \u003d (_(\u0027Failed to tear down from cleaning for node %s\u0027)"},{"line_number":961,"context_line":"                   % node.uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_a26de6ce","line":958,"updated":"2015-03-10 19:54:37.000000000","message":"so this is always a sync operation?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":955,"context_line":"        driver_info[\u0027clean_steps\u0027] \u003d None"},{"line_number":956,"context_line":"        node.driver_internal_info \u003d driver_info"},{"line_number":957,"context_line":"        try:"},{"line_number":958,"context_line":"            task.driver.deploy.tear_down_cleaning(task)"},{"line_number":959,"context_line":"        except Exception as e:"},{"line_number":960,"context_line":"            msg \u003d (_(\u0027Failed to tear down from cleaning for node %s\u0027)"},{"line_number":961,"context_line":"                   % node.uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_e41c0e6d","line":958,"in_reply_to":"9a80dd14_a26de6ce","updated":"2015-03-11 23:24:36.000000000","message":"The current tear_down is, so I think it\u0027s fine to make this sync as well. I\u0027ll make sure it\u0027s noted in the function definition though.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":2018,"context_line":""},{"line_number":2019,"context_line":""},{"line_number":2020,"context_line":"def _get_remaining_clean_steps(task, steps, last_step):"},{"line_number":2021,"context_line":"    \"\"\"Trim all previously executed clean/zap steps."},{"line_number":2022,"context_line":""},{"line_number":2023,"context_line":"    :raises: ValueError if last_step doesn\u0027t exist in steps."},{"line_number":2024,"context_line":"    :returns: List of remaining steps."}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_7fbaa5c1","line":2021,"updated":"2015-03-10 19:54:37.000000000","message":"upto and including last_step.\n\nOr \u0027Return the list of steps after last_step\u0027?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":2018,"context_line":""},{"line_number":2019,"context_line":""},{"line_number":2020,"context_line":"def _get_remaining_clean_steps(task, steps, last_step):"},{"line_number":2021,"context_line":"    \"\"\"Trim all previously executed clean/zap steps."},{"line_number":2022,"context_line":""},{"line_number":2023,"context_line":"    :raises: ValueError if last_step doesn\u0027t exist in steps."},{"line_number":2024,"context_line":"    :returns: List of remaining steps."}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_64b01ede","line":2021,"in_reply_to":"9a80dd14_7fbaa5c1","updated":"2015-03-11 23:24:36.000000000","message":"Done","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":2034,"context_line":"    LOG.debug(\u0027Remaining %(state)s steps for node %(node)s: \u0027"},{"line_number":2035,"context_line":"              \u0027%(steps)s\u0027, {\u0027node\u0027: node.uuid, \u0027steps\u0027: steps,"},{"line_number":2036,"context_line":"                            \u0027state\u0027: node.provision_state})"},{"line_number":2037,"context_line":"    return steps"},{"line_number":2038,"context_line":""},{"line_number":2039,"context_line":""},{"line_number":2040,"context_line":"def _step_key(step):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_df247110","line":2037,"updated":"2015-03-10 19:54:37.000000000","message":"After looking at this, I\u0027m not even sure it should be a method. There are really only two lines here, step_index \u003d steps.index(last_step) and steps\u003dsteps[step_index + 1:].\n\nThe rest doesn\u0027t really belong to a method that just \u0027trims\u0027 a list. You\u0027re already logging stuff in _do_next_clean_step(), so you could add the list of steps there.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":2034,"context_line":"    LOG.debug(\u0027Remaining %(state)s steps for node %(node)s: \u0027"},{"line_number":2035,"context_line":"              \u0027%(steps)s\u0027, {\u0027node\u0027: node.uuid, \u0027steps\u0027: steps,"},{"line_number":2036,"context_line":"                            \u0027state\u0027: node.provision_state})"},{"line_number":2037,"context_line":"    return steps"},{"line_number":2038,"context_line":""},{"line_number":2039,"context_line":""},{"line_number":2040,"context_line":"def _step_key(step):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_0444c2b5","line":2037,"in_reply_to":"9a80dd14_df247110","updated":"2015-03-11 23:24:36.000000000","message":"You\u0027re probably right. The function was a lot more complex when I was using namedtuples, but that\u0027s part of the reason I went to dictionaries. I\u0027ll move it into _do_next_clean_step().","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":2060,"context_line":"        if driver_interface:"},{"line_number":2061,"context_line":"            for step in driver_interface.get_clean_steps(task):"},{"line_number":2062,"context_line":"                if not enabled or step[\u0027priority\u0027] \u003e 0:"},{"line_number":2063,"context_line":"                    steps.append(step)"},{"line_number":2064,"context_line":"    # Sort the steps from higher priority to lower priority"},{"line_number":2065,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_1f61a9d3","line":2063,"updated":"2015-03-10 19:54:37.000000000","message":"The spec has\n\" If there is a tie for priority within a single interface (an operator\n  inadvertently sets two to the same priority), the conductor will fail\n  to load that interface while starting up, and log errors about the\n  overlapping priorities.\".\n\nIs that going to be done in another patch?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":2060,"context_line":"        if driver_interface:"},{"line_number":2061,"context_line":"            for step in driver_interface.get_clean_steps(task):"},{"line_number":2062,"context_line":"                if not enabled or step[\u0027priority\u0027] \u003e 0:"},{"line_number":2063,"context_line":"                    steps.append(step)"},{"line_number":2064,"context_line":"    # Sort the steps from higher priority to lower priority"},{"line_number":2065,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_84eb5277","line":2063,"in_reply_to":"9a80dd14_1f61a9d3","updated":"2015-03-11 23:24:36.000000000","message":"Yeah, I planned to do that in a follow up. This patch is already much longer than I intended :/","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"90e2b97a8d4615fffc286b67ab8375027a8ce843","unresolved":false,"context_lines":[{"line_number":838,"context_line":"            self._spawn_worker("},{"line_number":839,"context_line":"                self._do_next_clean_step,"},{"line_number":840,"context_line":"                task,"},{"line_number":841,"context_line":"                task.node.driver_internal_info.get(\u0027clean_steps\u0027, []),"},{"line_number":842,"context_line":"                task.node.clean_step)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def _do_node_clean(self, task):"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_0c96693f","line":841,"updated":"2015-03-13 02:05:14.000000000","message":"both calls to _do_next_clean_step end up being passing node.driver_internal_info.get(\u0027clean_steps\u0027, []) and node.clean_step as the 3rd and 4th argument. do we really need to pass this then ?","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":838,"context_line":"            self._spawn_worker("},{"line_number":839,"context_line":"                self._do_next_clean_step,"},{"line_number":840,"context_line":"                task,"},{"line_number":841,"context_line":"                task.node.driver_internal_info.get(\u0027clean_steps\u0027, []),"},{"line_number":842,"context_line":"                task.node.clean_step)"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    def _do_node_clean(self, task):"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_fdc29de7","line":841,"in_reply_to":"9a80dd14_0c96693f","updated":"2015-03-13 04:57:45.000000000","message":"This is so we can have some code reuse for zapping.","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"90e2b97a8d4615fffc286b67ab8375027a8ce843","unresolved":false,"context_lines":[{"line_number":868,"context_line":"        # Allow the deploy driver to set up the ramdisk again (necessary for"},{"line_number":869,"context_line":"        # IPA cleaning/zapping)"},{"line_number":870,"context_line":"        try:"},{"line_number":871,"context_line":"            prepare_result \u003d task.driver.deploy.prepare_cleaning(task)"},{"line_number":872,"context_line":"        except Exception as e:"},{"line_number":873,"context_line":"            msg \u003d (_(\u0027Failed to prepare node %(node)s for cleaning: %(e)s\u0027)"},{"line_number":874,"context_line":"                   % {\u0027node\u0027: node.uuid, \u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_4c2301a7","line":871,"updated":"2015-03-13 02:05:14.000000000","message":"this being an undocumented method (in base.py), all deploy interface implementations needn\u0027t implement this. also if we are going to do only out of band cleaning, we may not need this at all.  so better to skip this if deploy driver doesn\u0027t implement the method.\n\n  if getattr(task.driver.deploy, \u0027prepare_cleaning\u0027):\n    try:\n      prepare_result \u003d task.driver.deploy.prepare_cleaning(task)\n    except Exception as e:\n      ..","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":868,"context_line":"        # Allow the deploy driver to set up the ramdisk again (necessary for"},{"line_number":869,"context_line":"        # IPA cleaning/zapping)"},{"line_number":870,"context_line":"        try:"},{"line_number":871,"context_line":"            prepare_result \u003d task.driver.deploy.prepare_cleaning(task)"},{"line_number":872,"context_line":"        except Exception as e:"},{"line_number":873,"context_line":"            msg \u003d (_(\u0027Failed to prepare node %(node)s for cleaning: %(e)s\u0027)"},{"line_number":874,"context_line":"                   % {\u0027node\u0027: node.uuid, \u0027e\u0027: e})"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_7d75cdc9","line":871,"in_reply_to":"9a80dd14_4c2301a7","updated":"2015-03-13 04:57:45.000000000","message":"Consider it\u0027s implemented as a noop in the base driver, I don\u0027t think this actually changes anything, but I\u0027ll switch it anyway.","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"22787d9aa410ac59a1c42dd813077239d873c71d","unresolved":false,"context_lines":[{"line_number":878,"context_line":"            # Prepare is asynchronous, the deploy driver will need to"},{"line_number":879,"context_line":"            # set node.driver_internal_info[\u0027clean_steps\u0027] and node.clean_step"},{"line_number":880,"context_line":"            # and then make an RPC call to continue_node_cleaning to start"},{"line_number":881,"context_line":"            # cleaning."},{"line_number":882,"context_line":"            return"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_1da4e3a4","line":881,"updated":"2015-03-12 19:27:42.000000000","message":"I feel like we should provide some methods to support handling the finished-preparing stage. Otherwise, it seems like there\u0027s going to be copy/paste going on.\n\nI suppose this can be done later when it becomes more apparent what might be copy/pasted.\n\nI\u0027m not sure I like the driver touching/modifying node.driver_internal_info[\u0027clean_steps\u0027] since it is the ConductorManager that has been touching that up-to-now.\n\nI don\u0027t suppose \u0027prepare_cleaning\u0027 can be considered a clean_step itself, to be done as the first clean step? (Just wondering if it needs to be \u0027special\u0027.)\n\nAnyway, I suppose we can change this later. (Although we\u0027ve got prepare_cleaning() and tear_down_cleaning() as part of the DeployInterface, but then, that\u0027s temporary too...)","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"90e2b97a8d4615fffc286b67ab8375027a8ce843","unresolved":false,"context_lines":[{"line_number":878,"context_line":"            # Prepare is asynchronous, the deploy driver will need to"},{"line_number":879,"context_line":"            # set node.driver_internal_info[\u0027clean_steps\u0027] and node.clean_step"},{"line_number":880,"context_line":"            # and then make an RPC call to continue_node_cleaning to start"},{"line_number":881,"context_line":"            # cleaning."},{"line_number":882,"context_line":"            return"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_2cb24d06","line":881,"in_reply_to":"9a80dd14_1da4e3a4","updated":"2015-03-13 02:05:14.000000000","message":"+1.  And\n\nI see in the dependent patch how we are populating the cleaning steps.  the problem is it doesn\u0027t consider the cleaning steps in other interfaces - if we have some management out of band cleaning steps, those won\u0027t be considered. (https://review.openstack.org/#/c/157715/)\n\nSo I suggest we add all the cleaning steps except deploy to node.driver_internal_info[\u0027clean_steps\u0027] here and ask the deploy driver to fill it\u0027s inband steps.","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":878,"context_line":"            # Prepare is asynchronous, the deploy driver will need to"},{"line_number":879,"context_line":"            # set node.driver_internal_info[\u0027clean_steps\u0027] and node.clean_step"},{"line_number":880,"context_line":"            # and then make an RPC call to continue_node_cleaning to start"},{"line_number":881,"context_line":"            # cleaning."},{"line_number":882,"context_line":"            return"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_563d552a","line":881,"in_reply_to":"9a80dd14_1da4e3a4","updated":"2015-03-13 04:57:45.000000000","message":"I think I could break it out into a method, otherwise, the next 4 lines will be copy pasted to any driver with prepare_result. Might as well make it a function.\n\nI can\u0027t do it as a clean step, because it needs to get the list of all the clean steps before it executes one. The agent needs to be prepared to list the steps. :(","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"def75ebb00e925034cb27906c1aed3a2e4614a88","unresolved":false,"context_lines":[{"line_number":878,"context_line":"            # Prepare is asynchronous, the deploy driver will need to"},{"line_number":879,"context_line":"            # set node.driver_internal_info[\u0027clean_steps\u0027] and node.clean_step"},{"line_number":880,"context_line":"            # and then make an RPC call to continue_node_cleaning to start"},{"line_number":881,"context_line":"            # cleaning."},{"line_number":882,"context_line":"            return"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"        # Get the prioritized steps, store them."}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_723b3cd1","line":881,"in_reply_to":"9a80dd14_2cb24d06","updated":"2015-03-13 02:30:21.000000000","message":"oh i see in dependent review we are getting it from conductor.manager, so please ignore this comment. i think that\u0027s what Ruby meant too.","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10202,"name":"Wan-yen Hsu","email":"wanyenhsu@gmail.com"},"change_message_id":"af0b12182bbbecb5c78d67db80c1f46347b42493","unresolved":false,"context_lines":[{"line_number":888,"context_line":"        node.save()"},{"line_number":889,"context_line":"        self._do_next_clean_step(task,"},{"line_number":890,"context_line":"                                 node.driver_internal_info[\u0027clean_steps\u0027],"},{"line_number":891,"context_line":"                                 node.clean_step)"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"    def _do_next_clean_step(self, task, steps, last_step):"},{"line_number":894,"context_line":"        \"\"\"Start executing cleaning/zapping steps from the last step (if any)."}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_8b7b2dbd","line":891,"updated":"2015-03-12 20:23:29.000000000","message":"Is there any reason why conductor calls driver to perform one single cleaning step at a time?  I understand that some cleaning steps may be asynchronous.  However, some drivers can only perform all cleaning steps all together.  This is typical for vendors who support server template.  All firmware and hardware configuration info are setup in a template and vendor tool will then exec the steps in the template.   If there is any asynchronous steps, it can still call back. conductor just call driver to handle the call back and continue the cleaning steps.   It might be late to allow such an option for Kilo, but for Liberty, we should allow this option.  I just want to make sure that the framwork does not prevent adding such option in Liberty.  Thanks!","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":888,"context_line":"        node.save()"},{"line_number":889,"context_line":"        self._do_next_clean_step(task,"},{"line_number":890,"context_line":"                                 node.driver_internal_info[\u0027clean_steps\u0027],"},{"line_number":891,"context_line":"                                 node.clean_step)"},{"line_number":892,"context_line":""},{"line_number":893,"context_line":"    def _do_next_clean_step(self, task, steps, last_step):"},{"line_number":894,"context_line":"        \"\"\"Start executing cleaning/zapping steps from the last step (if any)."}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_b64e916d","line":891,"in_reply_to":"9a80dd14_8b7b2dbd","updated":"2015-03-13 04:57:45.000000000","message":"How can the interface ever know that it will be the only interface doing all the cleaning? It can\u0027t. If you want to do a big cleaning step that basically does everything and orders the operations itself, you can. You\u0027d make a step that is asynchronous and does everything you want, then call back when you\u0027re done.","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"90e2b97a8d4615fffc286b67ab8375027a8ce843","unresolved":false,"context_lines":[{"line_number":956,"context_line":"        driver_info[\u0027clean_steps\u0027] \u003d None"},{"line_number":957,"context_line":"        node.driver_internal_info \u003d driver_info"},{"line_number":958,"context_line":"        try:"},{"line_number":959,"context_line":"            task.driver.deploy.tear_down_cleaning(task)"},{"line_number":960,"context_line":"        except Exception as e:"},{"line_number":961,"context_line":"            msg \u003d (_(\u0027Failed to tear down from cleaning for node %s\u0027)"},{"line_number":962,"context_line":"                   % node.uuid)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_2c332d63","line":959,"updated":"2015-03-13 02:05:14.000000000","message":"ditto, better to check if deploy driver supports tear_down_cleaning","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":956,"context_line":"        driver_info[\u0027clean_steps\u0027] \u003d None"},{"line_number":957,"context_line":"        node.driver_internal_info \u003d driver_info"},{"line_number":958,"context_line":"        try:"},{"line_number":959,"context_line":"            task.driver.deploy.tear_down_cleaning(task)"},{"line_number":960,"context_line":"        except Exception as e:"},{"line_number":961,"context_line":"            msg \u003d (_(\u0027Failed to tear down from cleaning for node %s\u0027)"},{"line_number":962,"context_line":"                   % node.uuid)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_fd1e1d6f","line":959,"in_reply_to":"9a80dd14_2c332d63","updated":"2015-03-13 04:57:45.000000000","message":"ditto as well.","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"0c0b52cb1397c4d3ce70448edbf1e8fe6b6bb348","unresolved":false,"context_lines":[{"line_number":863,"context_line":"        except (exception.InvalidParameterValue,"},{"line_number":864,"context_line":"                exception.MissingParameterValue) as e:"},{"line_number":865,"context_line":"            msg \u003d (_(\u0027Failed to validate power driver interface. \u0027"},{"line_number":866,"context_line":"                     \u0027Can not clean node. Error: %(msg)s\u0027) % {\u0027msg\u0027: e})"},{"line_number":867,"context_line":"            return cleaning_error_handler(task, msg)"},{"line_number":868,"context_line":""},{"line_number":869,"context_line":"        # Allow the deploy driver to set up the ramdisk again (necessary for"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_5f6aaaed","line":866,"updated":"2015-03-13 13:53:08.000000000","message":"I would like to see node uuid here but can be added in another patch","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"48d52df016d8a47cc5ad49f203be4b3eee28c5eb","unresolved":false,"context_lines":[{"line_number":868,"context_line":""},{"line_number":869,"context_line":"        # Allow the deploy driver to set up the ramdisk again (necessary for"},{"line_number":870,"context_line":"        # IPA cleaning/zapping)"},{"line_number":871,"context_line":"        if getattr(task.driver.deploy, \u0027prepare_cleaning\u0027):"},{"line_number":872,"context_line":"            try:"},{"line_number":873,"context_line":"                prepare_result \u003d task.driver.deploy.prepare_cleaning(task)"},{"line_number":874,"context_line":"            except Exception as e:"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_f3b56432","line":871,"updated":"2015-03-13 09:58:14.000000000","message":"i am sorry, it looks like your approach was correct in previous patchset.   getattr(task.driver.deploy, \u0027prepare_cleaning\u0027) will anyway return the base class\u0027s method and will result in a no-op execution of it, if the deploy driver doesn\u0027t implement prepare_cleaning method.  so line 871 is just redundant now. :(\n\n  \u003e\u003e\u003e class A:\n  ...   def foo():\n  ...     print \"hello\"\n  ...\n  \u003e\u003e\u003e class B(A):\n  ...   pass\n  ...\n  \u003e\u003e\u003e\n  \u003e\u003e\u003e b \u003d B()\n  \u003e\u003e\u003e getattr(b, \u0027foo\u0027)\n  \u003cbound method B.foo of \u003c__main__.B instance at 0x7fe62350e128\u003e\u003e\n  \u003e\u003e\u003e","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9f128ebbd2b3963b6829c16bf6ff646a71945c21","unresolved":false,"context_lines":[{"line_number":868,"context_line":""},{"line_number":869,"context_line":"        # Allow the deploy driver to set up the ramdisk again (necessary for"},{"line_number":870,"context_line":"        # IPA cleaning/zapping)"},{"line_number":871,"context_line":"        if getattr(task.driver.deploy, \u0027prepare_cleaning\u0027):"},{"line_number":872,"context_line":"            try:"},{"line_number":873,"context_line":"                prepare_result \u003d task.driver.deploy.prepare_cleaning(task)"},{"line_number":874,"context_line":"            except Exception as e:"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_5c7f1de0","line":871,"in_reply_to":"9a80dd14_f3b56432","updated":"2015-03-13 11:29:29.000000000","message":"yes, inheritance (:\n\n(It\u0027s fine can be cleanup later)","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"0c0b52cb1397c4d3ce70448edbf1e8fe6b6bb348","unresolved":false,"context_lines":[{"line_number":940,"context_line":"            # None if the step is done."},{"line_number":941,"context_line":"            if result \u003d\u003d states.CLEANING:"},{"line_number":942,"context_line":"                # Kill this worker, the async step will make an RPC call to"},{"line_number":943,"context_line":"                # continue_node_clean to continue cleaning"},{"line_number":944,"context_line":"                return"},{"line_number":945,"context_line":"            elif result is not None:"},{"line_number":946,"context_line":"                msg \u003d (_(\u0027While executing step %(step)s on node \u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_b26f5d91","line":943,"updated":"2015-03-13 13:53:08.000000000","message":"might be nice if to log something here: log.debug(\u0027waiting on node xxx to call continue after step yyyy\")","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"0c0b52cb1397c4d3ce70448edbf1e8fe6b6bb348","unresolved":false,"context_lines":[{"line_number":948,"context_line":"                       {\u0027step\u0027: step, \u0027node\u0027: node.uuid, \u0027val\u0027: result})"},{"line_number":949,"context_line":"                LOG.error(msg)"},{"line_number":950,"context_line":"                cleaning_error_handler(task, msg)"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"        # Clear clean_step"},{"line_number":953,"context_line":"        node.clean_step \u003d None"},{"line_number":954,"context_line":"        driver_info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_32a7edbe","line":951,"updated":"2015-03-13 13:53:08.000000000","message":"maybe log.info(_LI(\"node xxx finished cleaning step yyyy\")) here","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"48d52df016d8a47cc5ad49f203be4b3eee28c5eb","unresolved":false,"context_lines":[{"line_number":954,"context_line":"        driver_info \u003d node.driver_internal_info"},{"line_number":955,"context_line":"        driver_info[\u0027clean_steps\u0027] \u003d None"},{"line_number":956,"context_line":"        node.driver_internal_info \u003d driver_info"},{"line_number":957,"context_line":"        if getattr(task.driver.deploy, \u0027tear_down_cleaning\u0027):"},{"line_number":958,"context_line":"            try:"},{"line_number":959,"context_line":"                task.driver.deploy.tear_down_cleaning(task)"},{"line_number":960,"context_line":"            except Exception as e:"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_b3968c92","line":957,"updated":"2015-03-13 09:58:14.000000000","message":"ditto about getattr above, just redundant now.","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"0c0b52cb1397c4d3ce70448edbf1e8fe6b6bb348","unresolved":false,"context_lines":[{"line_number":2019,"context_line":""},{"line_number":2020,"context_line":""},{"line_number":2021,"context_line":"def _step_key(step):"},{"line_number":2022,"context_line":"    \"\"\"Sort by priority, then interface priority in event of tie.\"\"\""},{"line_number":2023,"context_line":"    return (step.get(\u0027priority\u0027),"},{"line_number":2024,"context_line":"            CLEANING_INTERFACE_PRIORITY[step.get(\u0027interface\u0027)])"},{"line_number":2025,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_72e965b6","line":2022,"updated":"2015-03-13 13:53:08.000000000","message":"nit: :param : line would be good here.","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cc2f3f22ce2950625e96dff4641c4c1e4c4be1db","unresolved":false,"context_lines":[{"line_number":954,"context_line":"                # Kill this worker, the async step will make an RPC call to"},{"line_number":955,"context_line":"                # continue_node_clean to continue cleaning"},{"line_number":956,"context_line":"                LOG.debug(\u0027Waiting for node %(node)s to call continue after \u0027"},{"line_number":957,"context_line":"                          \u0027async clean step %(step)s\u0027 %"},{"line_number":958,"context_line":"                          {\u0027node\u0027: node.uuid, \u0027step\u0027: step})"},{"line_number":959,"context_line":"                return"},{"line_number":960,"context_line":"            elif result is not None:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a80dd14_a4399ff3","line":957,"updated":"2015-03-16 09:39:55.000000000","message":"nit: % -\u003e ,","commit_id":"7589d1faaf5415c12b2e738c6c09b17b65993235"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cc2f3f22ce2950625e96dff4641c4c1e4c4be1db","unresolved":false,"context_lines":[{"line_number":962,"context_line":"                         \u0027%(node)s, step returned invalid value: %(val)s\u0027) %"},{"line_number":963,"context_line":"                       {\u0027step\u0027: step, \u0027node\u0027: node.uuid, \u0027val\u0027: result})"},{"line_number":964,"context_line":"                LOG.error(msg)"},{"line_number":965,"context_line":"                cleaning_error_handler(task, msg)"},{"line_number":966,"context_line":"            LOG.info(_LI(\u0027Node %(node)s finished clean step %(step)s\u0027),"},{"line_number":967,"context_line":"                     {\u0027node\u0027: node.uuid, \u0027step\u0027: step})"},{"line_number":968,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9a80dd14_4428e396","line":965,"updated":"2015-03-16 09:39:55.000000000","message":"should it return here?","commit_id":"7589d1faaf5415c12b2e738c6c09b17b65993235"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cc2f3f22ce2950625e96dff4641c4c1e4c4be1db","unresolved":false,"context_lines":[{"line_number":2083,"context_line":""},{"line_number":2084,"context_line":"    steps \u003d list()"},{"line_number":2085,"context_line":"    # Iterate interfaces and get clean steps from each"},{"line_number":2086,"context_line":"    for interface in CLEANING_INTERFACE_PRIORITY.keys():"},{"line_number":2087,"context_line":"        driver_interface \u003d getattr(task.driver, interface)"},{"line_number":2088,"context_line":"        if driver_interface:"},{"line_number":2089,"context_line":"            for step in driver_interface.get_clean_steps(task):"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a80dd14_674fa96b","line":2086,"updated":"2015-03-16 09:39:55.000000000","message":"nit: .keys() redundant (and causes a new list to be built on Py2)","commit_id":"7589d1faaf5415c12b2e738c6c09b17b65993235"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"cc2f3f22ce2950625e96dff4641c4c1e4c4be1db","unresolved":false,"context_lines":[{"line_number":2088,"context_line":"        if driver_interface:"},{"line_number":2089,"context_line":"            for step in driver_interface.get_clean_steps(task):"},{"line_number":2090,"context_line":"                if not enabled or step[\u0027priority\u0027] \u003e 0:"},{"line_number":2091,"context_line":"                    steps.append(step)"},{"line_number":2092,"context_line":"    # Sort the steps from higher priority to lower priority"},{"line_number":2093,"context_line":"    return sorted(steps, key\u003d_step_key, reverse\u003dTrue)"},{"line_number":2094,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"9a80dd14_c721359f","line":2091,"updated":"2015-03-16 09:39:55.000000000","message":"nit:\n\n steps \u003d [step for step in driver_interface.get_clean_steps(task) if not enabled or step[\u0027priority\u0027] \u003e 0]\n\n:)","commit_id":"7589d1faaf5415c12b2e738c6c09b17b65993235"}],"ironic/conductor/rpcapi.py":[{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"211a7b228f7ff81aeddfbb3c9aac8c1f8f560b21","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    \"\"\""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    # NOTE(rloo): This must be in sync with manager.ConductorManager\u0027s."},{"line_number":74,"context_line":"    RPC_API_VERSION \u003d \u00271.24\u0027"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def __init__(self, topic\u003dNone):"},{"line_number":77,"context_line":"        super(ConductorAPI, self).__init__()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_7056d65d","line":74,"updated":"2015-02-24 18:06:05.000000000","message":"see comment on commit message.","commit_id":"ac9e345700d1a696618491feb5ef021b88f9f288"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"211a7b228f7ff81aeddfbb3c9aac8c1f8f560b21","unresolved":false,"context_lines":[{"line_number":339,"context_line":""},{"line_number":340,"context_line":"        This encapsulates some provisioning actions in a single call."},{"line_number":341,"context_line":"        \"\"\""},{"line_number":342,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.24\u0027)"},{"line_number":343,"context_line":"        return cctxt.call(context, \u0027do_node_clean\u0027,"},{"line_number":344,"context_line":"                          node_id\u003dnode_id, action\u003daction)"},{"line_number":345,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_109d9a0b","line":342,"updated":"2015-02-24 18:06:05.000000000","message":"noting version here.","commit_id":"ac9e345700d1a696618491feb5ef021b88f9f288"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"6527fe1bc50328a1238d68aa9a1fcfcaa01c47aa","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        This encapsulates some provisioning actions in a single call."},{"line_number":341,"context_line":"        \"\"\""},{"line_number":342,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.24\u0027)"},{"line_number":343,"context_line":"        return cctxt.call(context, \u0027do_node_clean\u0027,"},{"line_number":344,"context_line":"                          node_id\u003dnode_id, action\u003daction)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def validate_driver_interfaces(self, context, node_id, topic\u003dNone):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_c8adc09c","line":343,"updated":"2015-02-26 13:35:43.000000000","message":"s/do_node_clean/continue_node_clean","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":340,"context_line":"        This encapsulates some provisioning actions in a single call."},{"line_number":341,"context_line":"        \"\"\""},{"line_number":342,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.24\u0027)"},{"line_number":343,"context_line":"        return cctxt.call(context, \u0027do_node_clean\u0027,"},{"line_number":344,"context_line":"                          node_id\u003dnode_id, action\u003daction)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def validate_driver_interfaces(self, context, node_id, topic\u003dNone):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_3d93e350","line":343,"in_reply_to":"ba7be1f8_c8adc09c","updated":"2015-02-26 23:57:15.000000000","message":"Done","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":11278,"name":"Anusha Ramineni","email":"anusha.ramineni@india.nec.com","username":"anusha08"},"change_message_id":"186a163694f327edfc9ada938ac0483f6ef5cfef","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    |           get_driver_vendor_passthru_methods"},{"line_number":67,"context_line":"    |    1.22 - Added configdrive parameter to do_node_deploy."},{"line_number":68,"context_line":"    |    1.23 - Added do_provisioning_action"},{"line_number":69,"context_line":"    |    1.24 - Added do_node_clean"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    \"\"\""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_ddad5dec","line":69,"updated":"2015-02-27 05:48:40.000000000","message":"continue_node_clean?","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"eeba35b8f819d0e63f6a69489222aa571b51d0e0","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    |           get_driver_vendor_passthru_methods"},{"line_number":67,"context_line":"    |    1.22 - Added configdrive parameter to do_node_deploy."},{"line_number":68,"context_line":"    |    1.23 - Added do_provisioning_action"},{"line_number":69,"context_line":"    |    1.24 - Added do_node_clean"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    \"\"\""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_0709372c","line":69,"in_reply_to":"ba7be1f8_7c88d3c6","updated":"2015-02-28 01:33:35.000000000","message":"Done","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4fe62e96421d8432dddea703288527d63448910f","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    |           get_driver_vendor_passthru_methods"},{"line_number":67,"context_line":"    |    1.22 - Added configdrive parameter to do_node_deploy."},{"line_number":68,"context_line":"    |    1.23 - Added do_provisioning_action"},{"line_number":69,"context_line":"    |    1.24 - Added do_node_clean"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    \"\"\""},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba7be1f8_7c88d3c6","line":69,"in_reply_to":"ba7be1f8_ddad5dec","updated":"2015-02-27 17:47:19.000000000","message":"+1","commit_id":"bfbf0091ec2b3d1be6ff6dc481314c6ce9c38648"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"730f68c0697b5a643b96fcfceda601f708e353af","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        :param context: request context."},{"line_number":332,"context_line":"        :param node_id: node id or uuid."},{"line_number":333,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":334,"context_line":"        :raises: InvalidParameterValue"},{"line_number":335,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":336,"context_line":"                async task."},{"line_number":337,"context_line":"        :raises: InvalidStateRequested if the requested action can not"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_15aa6f70","line":334,"updated":"2015-03-04 13:27:26.000000000","message":"* exception.NoFreeConductorWorker\n* exception.NodeLocked\n* exception.InvalidStateRequested\n* exception.NodeNotFound","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"4bb7db8e105bbf2d3bdb01a30a4097bdc3d68471","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        :param context: request context."},{"line_number":332,"context_line":"        :param node_id: node id or uuid."},{"line_number":333,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":334,"context_line":"        :raises: InvalidParameterValue"},{"line_number":335,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":336,"context_line":"                async task."},{"line_number":337,"context_line":"        :raises: InvalidStateRequested if the requested action can not"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_8003630e","line":334,"in_reply_to":"9a80dd14_15aa6f70","updated":"2015-03-05 01:56:20.000000000","message":"InvalidStateRequested and NoFreeConductor are right below this. Added the other two.","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0fe121e432731632392cba2fba94bbeacca4585","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":340,"context_line":"        :raises: NodeNotFound if the node no longer appears in the database"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        This encapsulates some provisioning actions in a single call."},{"line_number":343,"context_line":"        \"\"\""},{"line_number":344,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.25\u0027)"},{"line_number":345,"context_line":"        return cctxt.call(context, \u0027continue_node_clean\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_a971820d","line":342,"updated":"2015-03-09 22:13:40.000000000","message":"I\u0027m  not sure you want this.","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        :raises: NodeLocked if node is locked by another conductor."},{"line_number":340,"context_line":"        :raises: NodeNotFound if the node no longer appears in the database"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        This encapsulates some provisioning actions in a single call."},{"line_number":343,"context_line":"        \"\"\""},{"line_number":344,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.25\u0027)"},{"line_number":345,"context_line":"        return cctxt.call(context, \u0027continue_node_clean\u0027,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_e060cdd0","line":342,"in_reply_to":"9a80dd14_a971820d","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        :param context: request context."},{"line_number":332,"context_line":"        :param node_id: node id or uuid."},{"line_number":333,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":334,"context_line":"        :raises: InvalidParameterValue"},{"line_number":335,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":336,"context_line":"                async task."},{"line_number":337,"context_line":"        :raises: InvalidStateRequested if the requested action can not"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_3c475b4d","line":334,"updated":"2015-03-10 19:54:37.000000000","message":"I don\u0027t see where this is being raised.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        :param context: request context."},{"line_number":332,"context_line":"        :param node_id: node id or uuid."},{"line_number":333,"context_line":"        :param topic: RPC topic. Defaults to self.topic."},{"line_number":334,"context_line":"        :raises: InvalidParameterValue"},{"line_number":335,"context_line":"        :raises: NoFreeConductorWorker when there is no free worker to start"},{"line_number":336,"context_line":"                async task."},{"line_number":337,"context_line":"        :raises: InvalidStateRequested if the requested action can not"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_a71f7808","line":334,"in_reply_to":"9a80dd14_3c475b4d","updated":"2015-03-11 23:24:36.000000000","message":"Done","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"}],"ironic/db/sqlalchemy/alembic/versions/4f399b21ae71_add_node_clean_step.py":[{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"90e2b97a8d4615fffc286b67ab8375027a8ce843","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"# revision identifiers, used by Alembic."},{"line_number":22,"context_line":"revision \u003d \u00274f399b21ae71\u0027"},{"line_number":23,"context_line":"down_revision \u003d \u00271e1d5ace7dc6\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from alembic import op"},{"line_number":26,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_ec9675ef","line":23,"updated":"2015-03-13 02:05:14.000000000","message":"i think this has changed to 3ae36a5f5131 after inspection.","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"# revision identifiers, used by Alembic."},{"line_number":22,"context_line":"revision \u003d \u00274f399b21ae71\u0027"},{"line_number":23,"context_line":"down_revision \u003d \u00271e1d5ace7dc6\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from alembic import op"},{"line_number":26,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_c3433cad","line":23,"in_reply_to":"9a80dd14_ec9675ef","updated":"2015-03-13 04:57:45.000000000","message":"No, 3ae36a5f5131 is logical names, which is downstream of inspection. Inspection is 1e1d5ace7dc6.","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d845d22f3d8771003b3acfbe56af5b0a99761295","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\"\"\"Add node.clean_step"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Revision ID: 4f399b21ae71"},{"line_number":16,"context_line":"Revises: 3ae36a5f5131"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_b2f67dd5","line":13,"updated":"2015-03-13 13:36:31.000000000","message":"Please add test for this migration to test_migrations.","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"7f03009a922dba70795f993266a379f81ffef1b2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\"\"\"Add node.clean_step"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Revision ID: 4f399b21ae71"},{"line_number":16,"context_line":"Revises: 3ae36a5f5131"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_e6e1179c","line":13,"in_reply_to":"9a80dd14_b2f67dd5","updated":"2015-03-13 14:58:20.000000000","message":"+1","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"48d52df016d8a47cc5ad49f203be4b3eee28c5eb","unresolved":false,"context_lines":[{"line_number":13,"context_line":"\"\"\"Add node.clean_step"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Revision ID: 4f399b21ae71"},{"line_number":16,"context_line":"Revises: 3ae36a5f5131"},{"line_number":17,"context_line":"Create Date: 2015-02-18 01:21:46.062311"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_770de13d","line":16,"updated":"2015-03-13 09:58:14.000000000","message":"then this needs updation :)","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"}],"ironic/db/sqlalchemy/models.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7c36707f3879368d25f73c859192f036287cd281","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    driver \u003d Column(String(15))"},{"line_number":168,"context_line":"    driver_info \u003d Column(JSONEncodedDict)"},{"line_number":169,"context_line":"    driver_internal_info \u003d Column(JSONEncodedDict)"},{"line_number":170,"context_line":"    clean_step \u003d Column(String(63), nullable\u003dTrue)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    # NOTE(deva): this is the host name of the conductor which has"},{"line_number":173,"context_line":"    #             acquired a TaskManager lock on the node."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_c19a9d62","line":170,"updated":"2015-02-23 10:33:00.000000000","message":"What\u0027s the maximum length of a step name? Cause looking at this the step name could have a maximum of 47 characters\n\n15 (for the driver name) + 1 for the delimiter (\u0027.\u0027) \u003d 47 characters left for the step name. Is that enough? Are we making sure we are not going to exceed it?","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    driver \u003d Column(String(15))"},{"line_number":168,"context_line":"    driver_info \u003d Column(JSONEncodedDict)"},{"line_number":169,"context_line":"    driver_internal_info \u003d Column(JSONEncodedDict)"},{"line_number":170,"context_line":"    clean_step \u003d Column(String(63), nullable\u003dTrue)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    # NOTE(deva): this is the host name of the conductor which has"},{"line_number":173,"context_line":"    #             acquired a TaskManager lock on the node."}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_e764f523","line":170,"in_reply_to":"ba7be1f8_c19a9d62","updated":"2015-02-24 01:59:10.000000000","message":"I guess it will be 47 characters. Since it usually the name of a function, I think that should be sufficient. I\u0027ll add checks in the other patch where clean steps are added by the drivers (the other patch). That will prevent the driver from being loaded, and should serve as a good check during development.","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8b8ccf7144e2e9c592fedaf37c46c5a7d5901350","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    driver \u003d Column(String(15))"},{"line_number":168,"context_line":"    driver_info \u003d Column(JSONEncodedDict)"},{"line_number":169,"context_line":"    driver_internal_info \u003d Column(JSONEncodedDict)"},{"line_number":170,"context_line":"    clean_step \u003d Column(String(63), nullable\u003dTrue)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    # NOTE(deva): this is the host name of the conductor which has"},{"line_number":173,"context_line":"    #             acquired a TaskManager lock on the node."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_f137d64a","line":170,"updated":"2015-02-26 10:28:14.000000000","message":"21 century. people are still limiting string length in database :D\n\nsrsly, I understand it\u0027s for consistency, but let\u0027s at least use 255 everywhere? it was already pretty miserable to not be able to use proper provision state text due to String(15) limitation there :)","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"58030647e53d947758e7e26c5a47c2b2d3558a62","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    driver \u003d Column(String(15))"},{"line_number":168,"context_line":"    driver_info \u003d Column(JSONEncodedDict)"},{"line_number":169,"context_line":"    driver_internal_info \u003d Column(JSONEncodedDict)"},{"line_number":170,"context_line":"    clean_step \u003d Column(String(63), nullable\u003dTrue)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    # NOTE(deva): this is the host name of the conductor which has"},{"line_number":173,"context_line":"    #             acquired a TaskManager lock on the node."}],"source_content_type":"text/x-python","patch_set":7,"id":"ba7be1f8_ddf00794","line":170,"in_reply_to":"ba7be1f8_f137d64a","updated":"2015-02-26 23:57:15.000000000","message":"Heh works for me. When I implemented this down stream, I didn\u0027t find until I deployed to preprod that \u0027decommissionfail\u0027 was too long, so I feel your pain :/","commit_id":"a16722db9f199851dde36641c1eeb63c10e937da"}],"ironic/drivers/base.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0fe121e432731632392cba2fba94bbeacca4585","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                        \u0027priority\u0027: method._clean_step_priority,"},{"line_number":141,"context_line":"                        \u0027interface\u0027: instance.interface_type}"},{"line_number":142,"context_line":"                instance.clean_steps.append(step)"},{"line_number":143,"context_line":"        LOG.debug(\u0027Found clean steps %(steps)s for interface %(interface)s\u0027 %"},{"line_number":144,"context_line":"                  {\u0027steps\u0027: instance.clean_steps,"},{"line_number":145,"context_line":"                   \u0027interface\u0027: instance.interface_type})"},{"line_number":146,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_09b60e8a","line":143,"updated":"2015-03-09 22:13:40.000000000","message":"should be a comma here instead of \u0027%\u0027 at the end here.","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                        \u0027priority\u0027: method._clean_step_priority,"},{"line_number":141,"context_line":"                        \u0027interface\u0027: instance.interface_type}"},{"line_number":142,"context_line":"                instance.clean_steps.append(step)"},{"line_number":143,"context_line":"        LOG.debug(\u0027Found clean steps %(steps)s for interface %(interface)s\u0027 %"},{"line_number":144,"context_line":"                  {\u0027steps\u0027: instance.clean_steps,"},{"line_number":145,"context_line":"                   \u0027interface\u0027: instance.interface_type})"},{"line_number":146,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_20858559","line":143,"in_reply_to":"9a80dd14_09b60e8a","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0fe121e432731632392cba2fba94bbeacca4585","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        return instance"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def get_clean_steps(self, task):"},{"line_number":149,"context_line":"        \"\"\"Get a list of enabled and disabled CleanSteps for the interface."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        :param task: A TaskManager object, useful for interfaces overriding"},{"line_number":152,"context_line":"            this function"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_a97b42bc","line":149,"updated":"2015-03-09 22:13:40.000000000","message":"What is a \u0027CleanStep\u0027? I thought it was a class but I don\u0027t see it anywhere.","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        return instance"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def get_clean_steps(self, task):"},{"line_number":149,"context_line":"        \"\"\"Get a list of enabled and disabled CleanSteps for the interface."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        :param task: A TaskManager object, useful for interfaces overriding"},{"line_number":152,"context_line":"            this function"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_a0dfb567","line":149,"in_reply_to":"9a80dd14_a97b42bc","updated":"2015-03-10 15:39:05.000000000","message":"It was a namedtuple, but has since been removed in favor of standard dictionaries.","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0fe121e432731632392cba2fba94bbeacca4585","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        :param task: A TaskManager object, useful for interfaces overriding"},{"line_number":152,"context_line":"            this function"},{"line_number":153,"context_line":"        :returns: A list of clean steps"},{"line_number":154,"context_line":"        \"\"\""},{"line_number":155,"context_line":"        return self.clean_steps"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_0420b599","line":153,"updated":"2015-03-09 22:13:40.000000000","message":"are they ordered? How do you know which are enabled and which are disabled. Asking cuz that\u0027s the description above ;) I feel like if you mention a list of enabled and disabled, then you might want to explain here that disabled steps have priorities \u003d\u003d 0.\n\nOr change the first line to something like \u0027Get a list of all (enabled and disabled) the clean steps.\u0027 ;)\n\nFWIW: I just looked at the spec, and it sez it only returned enabled steps...","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        :param task: A TaskManager object, useful for interfaces overriding"},{"line_number":152,"context_line":"            this function"},{"line_number":153,"context_line":"        :returns: A list of clean steps"},{"line_number":154,"context_line":"        \"\"\""},{"line_number":155,"context_line":"        return self.clean_steps"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_a0ddf5e1","line":153,"in_reply_to":"9a80dd14_0420b599","updated":"2015-03-10 15:39:05.000000000","message":"Good call, I\u0027ll switch it and leave the bulk of the explanation in the @clean_step documentation.\n\nThe zapping spec says it would use the same get_clean_steps(), so I figured I\u0027d implement it now rather than a follow up zapping patch.","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0fe121e432731632392cba2fba94bbeacca4585","unresolved":false,"context_lines":[{"line_number":281,"context_line":"    def prepare_cleaning(self, task):"},{"line_number":282,"context_line":"        \"\"\"Prepare the node for cleaning or zapping tasks."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        Nodes that use IPA will need to boot the ramdisk in order to do in-band"},{"line_number":285,"context_line":"        cleaning and zapping tasks."},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_24a859da","line":284,"updated":"2015-03-09 22:13:40.000000000","message":"maybe this is a \u0027for example: ...\u0027","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":281,"context_line":"    def prepare_cleaning(self, task):"},{"line_number":282,"context_line":"        \"\"\"Prepare the node for cleaning or zapping tasks."},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        Nodes that use IPA will need to boot the ramdisk in order to do in-band"},{"line_number":285,"context_line":"        cleaning and zapping tasks."},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_c163c6db","line":284,"in_reply_to":"9a80dd14_24a859da","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0fe121e432731632392cba2fba94bbeacca4585","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        cleaning and zapping tasks."},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"},{"line_number":288,"context_line":"        implemented."},{"line_number":289,"context_line":"        \"\"\""},{"line_number":290,"context_line":"        pass"},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_6494118b","line":288,"updated":"2015-03-09 22:13:40.000000000","message":"Need to add \":param task:...\". \n\nEspecially since you use \u0027task\u0027 in a different context above ;)","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        cleaning and zapping tasks."},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"},{"line_number":288,"context_line":"        implemented."},{"line_number":289,"context_line":"        \"\"\""},{"line_number":290,"context_line":"        pass"},{"line_number":291,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_2a9f1fb6","line":288,"in_reply_to":"9a80dd14_6494118b","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0fe121e432731632392cba2fba94bbeacca4585","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        \"\"\"Tear down after cleaning or zapping is completed."},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        Given that cleaning or zapping is complete, do all cleanup and tear"},{"line_number":296,"context_line":"        down necessary to allow the node to be deployed to again."},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"},{"line_number":299,"context_line":"        implemented."}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_44fc6db8","line":296,"updated":"2015-03-09 22:13:40.000000000","message":"sigh. clean up of the cleaning; I hope this isn\u0027t a vicious circle ;)","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        \"\"\"Tear down after cleaning or zapping is completed."},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"        Given that cleaning or zapping is complete, do all cleanup and tear"},{"line_number":296,"context_line":"        down necessary to allow the node to be deployed to again."},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"},{"line_number":299,"context_line":"        implemented."}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_8ac2cb84","line":296,"in_reply_to":"9a80dd14_44fc6db8","updated":"2015-03-10 15:39:05.000000000","message":"Ugh, I know. This part is ripe for refactoring into BootInterface. It\u0027s way too much code to boot an agent :(","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0fe121e432731632392cba2fba94bbeacca4585","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        down necessary to allow the node to be deployed to again."},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"},{"line_number":299,"context_line":"        implemented."},{"line_number":300,"context_line":"        \"\"\""},{"line_number":301,"context_line":"        pass"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_c43a1d98","line":299,"updated":"2015-03-09 22:13:40.000000000","message":"Need to add \":param task:...\".","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        down necessary to allow the node to be deployed to again."},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"},{"line_number":299,"context_line":"        implemented."},{"line_number":300,"context_line":"        \"\"\""},{"line_number":301,"context_line":"        pass"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_0a309b06","line":299,"in_reply_to":"9a80dd14_c43a1d98","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    interface_type \u003d \u0027base\u0027"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def __new__(cls, *args, **kwargs):"},{"line_number":131,"context_line":"        # Cache the clean step iteration. We use __new__ instead of __init___"},{"line_number":132,"context_line":"        # to avoid breaking backwards compatibility with all the drivers."},{"line_number":133,"context_line":"        # We want to return all steps, regardless of priority."},{"line_number":134,"context_line":"        instance \u003d super(BaseInterface, cls).__new__(cls, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_15726f49","line":131,"updated":"2015-03-10 19:54:37.000000000","message":"What do you mean by \u0027clean step iteration\u0027. It is getting (I don\u0027t even know if I\u0027d call it \u0027caching\u0027) the list of clean steps, right?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    interface_type \u003d \u0027base\u0027"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def __new__(cls, *args, **kwargs):"},{"line_number":131,"context_line":"        # Cache the clean step iteration. We use __new__ instead of __init___"},{"line_number":132,"context_line":"        # to avoid breaking backwards compatibility with all the drivers."},{"line_number":133,"context_line":"        # We want to return all steps, regardless of priority."},{"line_number":134,"context_line":"        instance \u003d super(BaseInterface, cls).__new__(cls, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_27c70814","line":131,"in_reply_to":"9a80dd14_15726f49","updated":"2015-03-11 23:24:36.000000000","message":"I guess it\u0027s function iteration. It was suggested that we save a small amount of time by not iterating all the  functions on the interface each time get_clean_steps is called, so we cache the result when we create the object.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3a9de04ac9b1374885cb6b57f6889a586255f899","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    interface_type \u003d \u0027base\u0027"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def __new__(cls, *args, **kwargs):"},{"line_number":131,"context_line":"        # Cache the clean step iteration. We use __new__ instead of __init___"},{"line_number":132,"context_line":"        # to avoid breaking backwards compatibility with all the drivers."},{"line_number":133,"context_line":"        # We want to return all steps, regardless of priority."},{"line_number":134,"context_line":"        instance \u003d super(BaseInterface, cls).__new__(cls, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_75eb6678","line":131,"in_reply_to":"9a80dd14_27c70814","updated":"2015-03-11 23:50:14.000000000","message":"It\u0027s basically a list of all the clean steps. I don\u0027t know if that \u0027Cache the clean step iteration\u0027 is needed, and w/o knowing the history it seems odd to have this comment.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"669e4dab3392e8fd909e2b9207165ff3394830f4","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    interface_type \u003d \u0027base\u0027"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def __new__(cls, *args, **kwargs):"},{"line_number":131,"context_line":"        # Cache the clean step iteration. We use __new__ instead of __init___"},{"line_number":132,"context_line":"        # to avoid breaking backwards compatibility with all the drivers."},{"line_number":133,"context_line":"        # We want to return all steps, regardless of priority."},{"line_number":134,"context_line":"        instance \u003d super(BaseInterface, cls).__new__(cls, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_d62ed8a4","line":131,"in_reply_to":"9a80dd14_75eb6678","updated":"2015-03-12 01:43:19.000000000","message":"Right. I\u0027ll still leave the latter half of the comment, because it seems pretty odd to be overriding __new__ like this.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        instance.clean_steps \u003d []"},{"line_number":136,"context_line":"        for n, method in inspect.getmembers(instance, inspect.ismethod):"},{"line_number":137,"context_line":"            if getattr(method, \u0027_is_clean_step\u0027, False):"},{"line_number":138,"context_line":"                # Create a CleanStep to represent this method"},{"line_number":139,"context_line":"                step \u003d {\u0027step\u0027: method.__name__,"},{"line_number":140,"context_line":"                        \u0027priority\u0027: method._clean_step_priority,"},{"line_number":141,"context_line":"                        \u0027interface\u0027: instance.interface_type}"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_3581334e","line":138,"updated":"2015-03-10 19:54:37.000000000","message":"Now that I know what a CleanStep was, how about \u0027add this cleaning step to the list of cleaning steps\u0027.\n\nOr do we even need a comment here?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        instance.clean_steps \u003d []"},{"line_number":136,"context_line":"        for n, method in inspect.getmembers(instance, inspect.ismethod):"},{"line_number":137,"context_line":"            if getattr(method, \u0027_is_clean_step\u0027, False):"},{"line_number":138,"context_line":"                # Create a CleanStep to represent this method"},{"line_number":139,"context_line":"                step \u003d {\u0027step\u0027: method.__name__,"},{"line_number":140,"context_line":"                        \u0027priority\u0027: method._clean_step_priority,"},{"line_number":141,"context_line":"                        \u0027interface\u0027: instance.interface_type}"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_67d100cd","line":138,"in_reply_to":"9a80dd14_3581334e","updated":"2015-03-11 23:24:36.000000000","message":"I\u0027ll go with the former.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        for n, method in inspect.getmembers(instance, inspect.ismethod):"},{"line_number":137,"context_line":"            if getattr(method, \u0027_is_clean_step\u0027, False):"},{"line_number":138,"context_line":"                # Create a CleanStep to represent this method"},{"line_number":139,"context_line":"                step \u003d {\u0027step\u0027: method.__name__,"},{"line_number":140,"context_line":"                        \u0027priority\u0027: method._clean_step_priority,"},{"line_number":141,"context_line":"                        \u0027interface\u0027: instance.interface_type}"},{"line_number":142,"context_line":"                instance.clean_steps.append(step)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_759e4b09","line":139,"updated":"2015-03-10 19:54:37.000000000","message":"just a suggestion, maybe instead of using \u0027step\u0027 as the key, use something like \u0027method\u0027 or \u0027function\u0027. Because \u0027step\u0027 is sometimes used to refer to this dictionary, not just the cleaning method.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        states.CLEANING if the step will continue to execute asynchronously."},{"line_number":167,"context_line":"        If the step executes asynchronously, it should issue a call to the"},{"line_number":168,"context_line":"        \u0027continue_node_clean\u0027 RPC, so the conductor can begin the next"},{"line_number":169,"context_line":"        clean step."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        :param task: A TaskManager object"},{"line_number":172,"context_line":"        :param step: A CleanStep object to execute"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_955e5f75","line":169,"updated":"2015-03-10 19:54:37.000000000","message":"Just a nit about your use of \u0027steps\u0027. This method executes one cleaning step, so it would be clearer if you used the singular \u0027clean step\u0027 here. Eg\n\nThe clean step method should take ... The step can be executed synchronously or .... The step method should return None ...","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        states.CLEANING if the step will continue to execute asynchronously."},{"line_number":167,"context_line":"        If the step executes asynchronously, it should issue a call to the"},{"line_number":168,"context_line":"        \u0027continue_node_clean\u0027 RPC, so the conductor can begin the next"},{"line_number":169,"context_line":"        clean step."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        :param task: A TaskManager object"},{"line_number":172,"context_line":"        :param step: A CleanStep object to execute"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_c7fc6c42","line":169,"in_reply_to":"9a80dd14_955e5f75","updated":"2015-03-11 23:24:36.000000000","message":"Done","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        clean step."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        :param task: A TaskManager object"},{"line_number":172,"context_line":"        :param step: A CleanStep object to execute"},{"line_number":173,"context_line":"        :returns: None if this method has completed synchronously, or"},{"line_number":174,"context_line":"            states.CLEANING if the step will continue to execute"},{"line_number":175,"context_line":"            asynchronously."}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_3503f377","line":172,"updated":"2015-03-10 19:54:37.000000000","message":"this is a dictionary now, with \u0027step\u0027, \u0027priority\u0027, \u0027interface\u0027 keys.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        clean step."},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        :param task: A TaskManager object"},{"line_number":172,"context_line":"        :param step: A CleanStep object to execute"},{"line_number":173,"context_line":"        :returns: None if this method has completed synchronously, or"},{"line_number":174,"context_line":"            states.CLEANING if the step will continue to execute"},{"line_number":175,"context_line":"            asynchronously."}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_e79250f5","line":172,"in_reply_to":"9a80dd14_3503f377","updated":"2015-03-11 23:24:36.000000000","message":"Done","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            states.CLEANING if the step will continue to execute"},{"line_number":175,"context_line":"            asynchronously."},{"line_number":176,"context_line":"        \"\"\""},{"line_number":177,"context_line":"        return getattr(self, step.get(\u0027step\u0027))(task)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_7511eb5c","line":177,"updated":"2015-03-10 19:54:37.000000000","message":"if step[\u0027step\u0027] doesn\u0027t exist, there is a problem. I don\u0027t see the use of doing step.get(\u0027step\u0027), we should assume that step[\u0027step\u0027] works. Either way, an exception will be raised, but this makes it look like we\u0027re fine if it doesn\u0027t exist, but we won\u0027t be fine.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            states.CLEANING if the step will continue to execute"},{"line_number":175,"context_line":"            asynchronously."},{"line_number":176,"context_line":"        \"\"\""},{"line_number":177,"context_line":"        return getattr(self, step.get(\u0027step\u0027))(task)"},{"line_number":178,"context_line":""},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_078e84d0","line":177,"in_reply_to":"9a80dd14_7511eb5c","updated":"2015-03-11 23:24:36.000000000","message":"Done","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        implemented."},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance containing the node to act on."},{"line_number":294,"context_line":"        \"\"\""},{"line_number":295,"context_line":"        pass"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def tear_down_cleaning(self, task):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_bcec2b91","line":294,"updated":"2015-03-10 19:54:37.000000000","message":"I see that you\u0027re using a result returned from this, so we should document what it returns.\n\nDoes it raise any exceptions?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"669e4dab3392e8fd909e2b9207165ff3394830f4","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        implemented."},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance containing the node to act on."},{"line_number":294,"context_line":"        \"\"\""},{"line_number":295,"context_line":"        pass"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def tear_down_cleaning(self, task):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_763e0cdc","line":294,"in_reply_to":"9a80dd14_7501a669","updated":"2015-03-12 01:43:19.000000000","message":"In that case, no, neither should be raising any exceptions.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3a9de04ac9b1374885cb6b57f6889a586255f899","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        implemented."},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance containing the node to act on."},{"line_number":294,"context_line":"        \"\"\""},{"line_number":295,"context_line":"        pass"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def tear_down_cleaning(self, task):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_7501a669","line":294,"in_reply_to":"9a80dd14_8a5b59f5","updated":"2015-03-11 23:50:14.000000000","message":"Yeah, so I should have been clearer. Since this is a base interface, the idea is that in order for it to be useful, it will be subclassed. The docstrings here are a \u0027contract\u0027 for how the method should work/behave, in all the subclasses. So it is important (I think) to describe it as much as possible, including what exceptions it can/should raise. This means that subclasses shouldn\u0027t be raising other exceptions that aren\u0027t noted here.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        implemented."},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        :param task: a TaskManager instance containing the node to act on."},{"line_number":294,"context_line":"        \"\"\""},{"line_number":295,"context_line":"        pass"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def tear_down_cleaning(self, task):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_8a5b59f5","line":294,"in_reply_to":"9a80dd14_bcec2b91","updated":"2015-03-11 23:24:36.000000000","message":"I\u0027ll add that. Neither this or the next one raise any exception, since their base implementation is just \"pass\". If another interface overrides it and raises exceptions, they document it in that function, rather than here.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b4c3b3d1f692556a0b670aec7c126c4fb54d6c3e","unresolved":false,"context_lines":[{"line_number":303,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"},{"line_number":304,"context_line":"        implemented."},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        :param task: a TaskManager instance containing the node to act on."},{"line_number":307,"context_line":"        \"\"\""},{"line_number":308,"context_line":"        pass"},{"line_number":309,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_5cbb2f75","line":306,"updated":"2015-03-10 19:54:37.000000000","message":"Does this method return anything? raises exceptions?","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"a46e4fc1f430731ac9b2881556ffc461ca4849f7","unresolved":false,"context_lines":[{"line_number":303,"context_line":"        NOTE(JoshNang) this should be moved to BootInterface when it gets"},{"line_number":304,"context_line":"        implemented."},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        :param task: a TaskManager instance containing the node to act on."},{"line_number":307,"context_line":"        \"\"\""},{"line_number":308,"context_line":"        pass"},{"line_number":309,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a80dd14_aa71fd78","line":306,"in_reply_to":"9a80dd14_5cbb2f75","updated":"2015-03-11 23:24:36.000000000","message":"No, it shouldn\u0027t return anything.","commit_id":"544ab0073f43b0983311b94d268d12d8530bcb7a"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"0c0b52cb1397c4d3ce70448edbf1e8fe6b6bb348","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        :param task: a TaskManager instance containing the node to act on."},{"line_number":283,"context_line":"        \"\"\""},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def prepare_cleaning(self, task):"},{"line_number":286,"context_line":"        \"\"\"Prepare the node for cleaning or zapping tasks."},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        For example, nodes that use the Ironic Python Agent will need to"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_b56587e2","line":285,"updated":"2015-03-13 13:53:08.000000000","message":"is @abc.abstractmethod needed here?","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"0c0b52cb1397c4d3ce70448edbf1e8fe6b6bb348","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        \"\"\""},{"line_number":306,"context_line":"        pass"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"    def tear_down_cleaning(self, task):"},{"line_number":309,"context_line":"        \"\"\"Tear down after cleaning or zapping is completed."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        Given that cleaning or zapping is complete, do all cleanup and tear"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a80dd14_55a28bfc","line":308,"updated":"2015-03-13 13:53:08.000000000","message":"ditto","commit_id":"1ad0f52fa927c0e2b1664f54a451181a4242dd51"}],"ironic/objects/node.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7c36707f3879368d25f73c859192f036287cd281","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            \u0027driver_info\u0027: obj_utils.dict_or_none,"},{"line_number":50,"context_line":"            \u0027driver_internal_info\u0027: obj_utils.dict_or_none,"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"            \u0027clean_step\u0027: obj_utils.str_or_none,"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"            \u0027instance_info\u0027: obj_utils.dict_or_none,"},{"line_number":55,"context_line":"            \u0027properties\u0027: obj_utils.dict_or_none,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_c1b1bde2","line":52,"updated":"2015-02-23 10:33:00.000000000","message":"Is it something that we are going to expose on the API? If so we also need to modify controllers/v1/nodes.py","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"ca8e5cc2742561e5899580d4264248c3d83cd1ec","unresolved":false,"context_lines":[{"line_number":49,"context_line":"            \u0027driver_info\u0027: obj_utils.dict_or_none,"},{"line_number":50,"context_line":"            \u0027driver_internal_info\u0027: obj_utils.dict_or_none,"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"            \u0027clean_step\u0027: obj_utils.str_or_none,"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"            \u0027instance_info\u0027: obj_utils.dict_or_none,"},{"line_number":55,"context_line":"            \u0027properties\u0027: obj_utils.dict_or_none,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_c7ed31f1","line":52,"in_reply_to":"ba7be1f8_c1b1bde2","updated":"2015-02-24 01:59:10.000000000","message":"Yeah it will be exposed. Thanks!","commit_id":"8076f323434623b483e3dfaf56509aa46bc0f536"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d0fe121e432731632392cba2fba94bbeacca4585","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            \u0027driver_info\u0027: obj_utils.dict_or_none,"},{"line_number":52,"context_line":"            \u0027driver_internal_info\u0027: obj_utils.dict_or_none,"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"            \u0027clean_step\u0027: obj_utils.dict_or_none,"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"            \u0027instance_info\u0027: obj_utils.dict_or_none,"},{"line_number":57,"context_line":"            \u0027properties\u0027: obj_utils.dict_or_none,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_4928069a","line":54,"updated":"2015-03-09 22:13:40.000000000","message":"I would like a comment here that describes what this is.","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2176b43a377a7e2ecb1f5b321face63fe029f4a5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            \u0027driver_info\u0027: obj_utils.dict_or_none,"},{"line_number":52,"context_line":"            \u0027driver_internal_info\u0027: obj_utils.dict_or_none,"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"            \u0027clean_step\u0027: obj_utils.dict_or_none,"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"            \u0027instance_info\u0027: obj_utils.dict_or_none,"},{"line_number":57,"context_line":"            \u0027properties\u0027: obj_utils.dict_or_none,"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a80dd14_7602de70","line":54,"in_reply_to":"9a80dd14_4928069a","updated":"2015-03-10 15:39:05.000000000","message":"Done","commit_id":"3f0610781dd343d27a95ea57a128e07d99dda3da"}],"ironic/tests/conductor/test_manager.py":[{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"730f68c0697b5a643b96fcfceda601f708e353af","unresolved":false,"context_lines":[{"line_number":1742,"context_line":"        node.refresh()"},{"line_number":1743,"context_line":""},{"line_number":1744,"context_line":"        # Cleaning should be complete without calling additional steps"},{"line_number":1745,"context_line":"        self.assertEqual(states.AVAILABLE, node.provision_state)"},{"line_number":1746,"context_line":"        self.assertEqual({}, node.clean_step)"},{"line_number":1747,"context_line":"        mock_execute.assert_not_called()"},{"line_number":1748,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_95a49f58","line":1745,"updated":"2015-03-04 13:27:26.000000000","message":"Better to assert driver_internal_info[\u0027clean_steps\u0027]","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"4bb7db8e105bbf2d3bdb01a30a4097bdc3d68471","unresolved":false,"context_lines":[{"line_number":1742,"context_line":"        node.refresh()"},{"line_number":1743,"context_line":""},{"line_number":1744,"context_line":"        # Cleaning should be complete without calling additional steps"},{"line_number":1745,"context_line":"        self.assertEqual(states.AVAILABLE, node.provision_state)"},{"line_number":1746,"context_line":"        self.assertEqual({}, node.clean_step)"},{"line_number":1747,"context_line":"        mock_execute.assert_not_called()"},{"line_number":1748,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a80dd14_004a1380","line":1745,"in_reply_to":"9a80dd14_95a49f58","updated":"2015-03-05 01:56:20.000000000","message":"I\u0027ll do both.","commit_id":"84b82253a1095bf5839cd610904a5955b9f6a980"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"60da89eb6a64193e18c6521eaf730fcffa0e4cdb","unresolved":false,"context_lines":[{"line_number":1567,"context_line":""},{"line_number":1568,"context_line":"    @mock.patch(\u0027ironic.conductor.manager.ConductorManager._spawn_worker\u0027)"},{"line_number":1569,"context_line":"    def test_continue_node_clean_wrong_state(self, mock_spawn):"},{"line_number":1570,"context_line":"        # Test the appropriate exception is raised if the worker pool is full"},{"line_number":1571,"context_line":"        prv_state \u003d states.DELETING"},{"line_number":1572,"context_line":"        tgt_prv_state \u003d states.AVAILABLE"},{"line_number":1573,"context_line":"        node \u003d obj_utils.create_test_node(self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_d7d16358","line":1570,"updated":"2015-03-05 21:57:49.000000000","message":"remark line seems like a cut and paste artifact?","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fd95a9285999ab4e67630d815e054256d57c40a0","unresolved":false,"context_lines":[{"line_number":1567,"context_line":""},{"line_number":1568,"context_line":"    @mock.patch(\u0027ironic.conductor.manager.ConductorManager._spawn_worker\u0027)"},{"line_number":1569,"context_line":"    def test_continue_node_clean_wrong_state(self, mock_spawn):"},{"line_number":1570,"context_line":"        # Test the appropriate exception is raised if the worker pool is full"},{"line_number":1571,"context_line":"        prv_state \u003d states.DELETING"},{"line_number":1572,"context_line":"        tgt_prv_state \u003d states.AVAILABLE"},{"line_number":1573,"context_line":"        node \u003d obj_utils.create_test_node(self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_83916d54","line":1570,"in_reply_to":"9a80dd14_d7d16358","updated":"2015-03-05 23:38:43.000000000","message":"Whoops! Good catch.","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"90e2b97a8d4615fffc286b67ab8375027a8ce843","unresolved":false,"context_lines":[{"line_number":1645,"context_line":"        # Assert that the node was moved to available without cleaning"},{"line_number":1646,"context_line":"        mock_validate.assert_not_called()"},{"line_number":1647,"context_line":"        self.assertEqual(states.AVAILABLE, node.provision_state)"},{"line_number":1648,"context_line":"        self.assertEqual(states.NOSTATE, node.target_provision_state)"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"    @mock.patch(\u0027ironic.conductor.manager._get_cleaning_steps\u0027)"},{"line_number":1651,"context_line":"    @mock.patch(\u0027ironic.conductor.manager.ConductorManager.\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_ac7e3dad","line":1648,"updated":"2015-03-13 02:05:14.000000000","message":"assert node.clean_step","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":1645,"context_line":"        # Assert that the node was moved to available without cleaning"},{"line_number":1646,"context_line":"        mock_validate.assert_not_called()"},{"line_number":1647,"context_line":"        self.assertEqual(states.AVAILABLE, node.provision_state)"},{"line_number":1648,"context_line":"        self.assertEqual(states.NOSTATE, node.target_provision_state)"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"    @mock.patch(\u0027ironic.conductor.manager._get_cleaning_steps\u0027)"},{"line_number":1651,"context_line":"    @mock.patch(\u0027ironic.conductor.manager.ConductorManager.\u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_1ea92790","line":1648,"in_reply_to":"9a80dd14_ac7e3dad","updated":"2015-03-13 04:57:45.000000000","message":"Done","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"90e2b97a8d4615fffc286b67ab8375027a8ce843","unresolved":false,"context_lines":[{"line_number":1705,"context_line":"        mock_execute.assert_called_once_with(mock.ANY, self.clean_steps[0])"},{"line_number":1706,"context_line":""},{"line_number":1707,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.fake.FakePower.execute_clean_step\u0027)"},{"line_number":1708,"context_line":"    def test__do_next_clean_step_last_step(self, mock_execute):"},{"line_number":1709,"context_line":"        # Resume an in-progress cleaning after the first async step"},{"line_number":1710,"context_line":"        node \u003d obj_utils.create_test_node("},{"line_number":1711,"context_line":"            self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_4f44d31a","line":1708,"updated":"2015-03-13 02:05:14.000000000","message":"i guess this is not test__do_next_clean_step_last_step then as this is not last step.\n\nMay be test__do_next_clean_step_continue_from_last_step","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":1705,"context_line":"        mock_execute.assert_called_once_with(mock.ANY, self.clean_steps[0])"},{"line_number":1706,"context_line":""},{"line_number":1707,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.fake.FakePower.execute_clean_step\u0027)"},{"line_number":1708,"context_line":"    def test__do_next_clean_step_last_step(self, mock_execute):"},{"line_number":1709,"context_line":"        # Resume an in-progress cleaning after the first async step"},{"line_number":1710,"context_line":"        node \u003d obj_utils.create_test_node("},{"line_number":1711,"context_line":"            self.context, driver\u003d\u0027fake\u0027,"}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_de894f27","line":1708,"in_reply_to":"9a80dd14_4f44d31a","updated":"2015-03-13 04:57:45.000000000","message":"Done","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"90e2b97a8d4615fffc286b67ab8375027a8ce843","unresolved":false,"context_lines":[{"line_number":1812,"context_line":""},{"line_number":1813,"context_line":"        # Node should have failed without executing anything"},{"line_number":1814,"context_line":"        self.assertEqual(states.CLEANFAIL, node.provision_state)"},{"line_number":1815,"context_line":"        self.assertEqual({}, node.clean_step)"},{"line_number":1816,"context_line":"        self.assertIsNotNone(node.last_error)"},{"line_number":1817,"context_line":"        mock_execute.assert_not_called()"},{"line_number":1818,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_6ffa77be","line":1815,"updated":"2015-03-13 02:05:14.000000000","message":"should we assert maintenance ?","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":1812,"context_line":""},{"line_number":1813,"context_line":"        # Node should have failed without executing anything"},{"line_number":1814,"context_line":"        self.assertEqual(states.CLEANFAIL, node.provision_state)"},{"line_number":1815,"context_line":"        self.assertEqual({}, node.clean_step)"},{"line_number":1816,"context_line":"        self.assertIsNotNone(node.last_error)"},{"line_number":1817,"context_line":"        mock_execute.assert_not_called()"},{"line_number":1818,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_1e8047f6","line":1815,"in_reply_to":"9a80dd14_6ffa77be","updated":"2015-03-13 04:57:45.000000000","message":"Done","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"90e2b97a8d4615fffc286b67ab8375027a8ce843","unresolved":false,"context_lines":[{"line_number":1839,"context_line":""},{"line_number":1840,"context_line":"        # Make sure we go to CLEANFAIL, clear clean_steps"},{"line_number":1841,"context_line":"        self.assertEqual(states.CLEANFAIL, node.provision_state)"},{"line_number":1842,"context_line":"        self.assertEqual({}, node.clean_step)"},{"line_number":1843,"context_line":"        self.assertIsNotNone(node.last_error)"},{"line_number":1844,"context_line":"        mock_execute.assert_called_once_with(mock.ANY, self.clean_steps[0])"},{"line_number":1845,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_ef2d8747","line":1842,"updated":"2015-03-13 02:05:14.000000000","message":"ditto, should we assert maintenance ?","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"2b793c7d2035d9ad77bfa7e23a91c7ade33be1b7","unresolved":false,"context_lines":[{"line_number":1839,"context_line":""},{"line_number":1840,"context_line":"        # Make sure we go to CLEANFAIL, clear clean_steps"},{"line_number":1841,"context_line":"        self.assertEqual(states.CLEANFAIL, node.provision_state)"},{"line_number":1842,"context_line":"        self.assertEqual({}, node.clean_step)"},{"line_number":1843,"context_line":"        self.assertIsNotNone(node.last_error)"},{"line_number":1844,"context_line":"        mock_execute.assert_called_once_with(mock.ANY, self.clean_steps[0])"},{"line_number":1845,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_fe0a9388","line":1842,"in_reply_to":"9a80dd14_ef2d8747","updated":"2015-03-13 04:57:45.000000000","message":"Done","commit_id":"72ec270617e34b8163ae467f53b23aba0b4aa97b"}],"ironic/tests/db/utils.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"97ebcf13e61408cdefd737795f68aa3f2560f3ce","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \u0027driver\u0027: kw.get(\u0027driver\u0027, \u0027fake\u0027),"},{"line_number":196,"context_line":"        \u0027driver_info\u0027: kw.get(\u0027driver_info\u0027, fake_info),"},{"line_number":197,"context_line":"        \u0027driver_internal_info\u0027: kw.get(\u0027driver_internal_info\u0027, fake_info),"},{"line_number":198,"context_line":"        \u0027clean_step\u0027: kw.get(\u0027clean_step\u0027, None),"},{"line_number":199,"context_line":"        \u0027properties\u0027: kw.get(\u0027properties\u0027, properties),"},{"line_number":200,"context_line":"        \u0027reservation\u0027: kw.get(\u0027reservation\u0027),"},{"line_number":201,"context_line":"        \u0027maintenance\u0027: kw.get(\u0027maintenance\u0027, False),"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_40285034","line":198,"updated":"2015-03-05 21:59:04.000000000","message":"nit: None not required, as that is default","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"fd95a9285999ab4e67630d815e054256d57c40a0","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        \u0027driver\u0027: kw.get(\u0027driver\u0027, \u0027fake\u0027),"},{"line_number":196,"context_line":"        \u0027driver_info\u0027: kw.get(\u0027driver_info\u0027, fake_info),"},{"line_number":197,"context_line":"        \u0027driver_internal_info\u0027: kw.get(\u0027driver_internal_info\u0027, fake_info),"},{"line_number":198,"context_line":"        \u0027clean_step\u0027: kw.get(\u0027clean_step\u0027, None),"},{"line_number":199,"context_line":"        \u0027properties\u0027: kw.get(\u0027properties\u0027, properties),"},{"line_number":200,"context_line":"        \u0027reservation\u0027: kw.get(\u0027reservation\u0027),"},{"line_number":201,"context_line":"        \u0027maintenance\u0027: kw.get(\u0027maintenance\u0027, False),"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a80dd14_a363d1da","line":198,"in_reply_to":"9a80dd14_40285034","updated":"2015-03-05 23:38:43.000000000","message":"Done","commit_id":"c74decb5b97262952200e605f605bbc13cf7e0e1"}]}
