)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"16b8ea26318888adbae0fbfc2708a3ecc25bcfdc","unresolved":false,"context_lines":[{"line_number":17,"context_line":"It also optimizes somewhat the agent_url saving to driver_internal_info,"},{"line_number":18,"context_line":"by saving to DB only when that url has actually changed."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Also, handling of deprecated \u0027agent_last_heartbeat\u0027 field in"},{"line_number":21,"context_line":"driver_internal_info is removed."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: If18b871aed63a9e5b41ccb9828ef8fa428f5ab48"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9ff52f3f_dbb1cfe3","line":20,"updated":"2017-04-13 17:15:12.000000000","message":"to be clear, it is not deprecated, we just were not writing anything to it for half a year, maybe more :)","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8002a277c6493ed3c1d8f1e540e85be9c137a4d0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"It also optimizes somewhat the agent_url saving to driver_internal_info,"},{"line_number":18,"context_line":"by saving to DB only when that url has actually changed."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Also, handling of deprecated \u0027agent_last_heartbeat\u0027 field in"},{"line_number":21,"context_line":"driver_internal_info is removed."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: If18b871aed63a9e5b41ccb9828ef8fa428f5ab48"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5ff73747_90850ad2","line":20,"in_reply_to":"9ff52f3f_dbb1cfe3","updated":"2017-04-26 21:22:37.000000000","message":"Well, we weren\u0027t using it, so we deprecated it. Which made me think that we need a release note to indicate that we removed it. however, I just looked at we had, under \u0027Deprecations\u0027 [1] \"The agent_last_heartbeat field of driver_internal_info has been removed from all agent drivers, since this field was unused by ironic.\". So I think we are good w/o a reno.\n\n[1] https://docs.openstack.org/releasenotes/ironic/ocata.html","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"}],"ironic/drivers/modules/agent_base_vendor.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b5dc50b99ed5104b58d03caa3b1ee018bc4885c6","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"},{"line_number":269,"context_line":"                          \u0027or in unsupported node provision state,\u0027"},{"line_number":270,"context_line":"                          \u0027not taking any action.\u0027, {\u0027node\u0027: task.node.uuid})"},{"line_number":271,"context_line":"                return"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_8d88c071","line":269,"updated":"2017-04-13 10:14:44.000000000","message":"missed space at the end of line :)","commit_id":"813a3720b123212e9c37329d7f5739a317b16020"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"725d41084ae8924f421a0de8e032c23895172b40","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"},{"line_number":269,"context_line":"                          \u0027or in unsupported node provision state,\u0027"},{"line_number":270,"context_line":"                          \u0027not taking any action.\u0027, {\u0027node\u0027: task.node.uuid})"},{"line_number":271,"context_line":"                return"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff52f3f_fa2a5b8e","line":269,"in_reply_to":"9ff52f3f_8d88c071","updated":"2017-04-13 12:21:52.000000000","message":"yep, will fix - have to fix unit tests any way :)","commit_id":"813a3720b123212e9c37329d7f5739a317b16020"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8002a277c6493ed3c1d8f1e540e85be9c137a4d0","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        :param callback_url: agent HTTP API URL."},{"line_number":263,"context_line":"        \"\"\""},{"line_number":264,"context_line":"        # NOTE(pas-ha) immediately skip the rest if nothing to do"},{"line_number":265,"context_line":"        if (task.node.maintenance or"},{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_90162a55","line":265,"updated":"2017-04-26 21:22:37.000000000","message":"I just want to make sure, because the behaviour is being changed here. (Previously the callback URL was being saved.) Would we ever want to issue a command to IPA if the node is in maintenance \u0026 in (DEPLOYWAIT or CLEANWAIT) ?","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"741dbb1540fc1db55e612249fe2a8f8bae624ec4","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        :param callback_url: agent HTTP API URL."},{"line_number":263,"context_line":"        \"\"\""},{"line_number":264,"context_line":"        # NOTE(pas-ha) immediately skip the rest if nothing to do"},{"line_number":265,"context_line":"        if (task.node.maintenance or"},{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_4a63feb2","line":265,"in_reply_to":"1f013ff3_92120158","updated":"2017-07-18 18:52:19.000000000","message":"This patch hasn\u0027t moved for over 2 months. Here\u0027s my suggestion. Remove the code that deals with task.node.maintenance. Then we/I don\u0027t have to worry to much that this will break some use case I haven\u0027t thought of. Also, if we do that, no release note will be needed.","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"ccb6cbb0b9bc990e4fb764cf1860f6d95df89e8e","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        :param callback_url: agent HTTP API URL."},{"line_number":263,"context_line":"        \"\"\""},{"line_number":264,"context_line":"        # NOTE(pas-ha) immediately skip the rest if nothing to do"},{"line_number":265,"context_line":"        if (task.node.maintenance or"},{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_02047414","line":265,"in_reply_to":"1f1a1f67_4a63feb2","updated":"2017-07-31 11:24:55.000000000","message":"done, maintenance is handled as before.","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c8a064b53a8ed1819f23a42f6e63ad356b3bbe0e","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        :param callback_url: agent HTTP API URL."},{"line_number":263,"context_line":"        \"\"\""},{"line_number":264,"context_line":"        # NOTE(pas-ha) immediately skip the rest if nothing to do"},{"line_number":265,"context_line":"        if (task.node.maintenance or"},{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f013ff3_92120158","line":265,"in_reply_to":"3f044301_8fd82c1e","updated":"2017-05-15 22:35:41.000000000","message":"Hmm. I don\u0027t know what to do about this. Is it worth locking the node and updating it with the agent url if it is in maintenance? If it is in maintenance, do we really care if we\u0027re trying to lock it? maybe we should just allow it. (I guess if we care about load on db, we might not want to do this, but otherwise, it seems like it would be OK.)\n\nOtherwise, if we go with your change -- it probably should be mentioned in the release note for all those many people out there that debug like you do :)\n\nNot many people have reviewed this; I wonder what others think.","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"aa493ce64bafd65f1726f0ad435ab78c5c5fcccf","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        :param callback_url: agent HTTP API URL."},{"line_number":263,"context_line":"        \"\"\""},{"line_number":264,"context_line":"        # NOTE(pas-ha) immediately skip the rest if nothing to do"},{"line_number":265,"context_line":"        if (task.node.maintenance or"},{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f044301_8fd82c1e","line":265,"in_reply_to":"5ff73747_2b232ebf","updated":"2017-05-11 09:38:57.000000000","message":"Well, AFAIU the main change in the currently possible workflow is the following:\n\ncurrently when using heartbeat-based drivers, when you clean a node in maintenance, it will pause after booting to ramdisk, and operator may consult the agent_url from the \"node show\" to figure out the node\u0027s IP to use to access it for debugging etc (I actually used that trick myself couple of times).\n\nWith this change, the node IP in such scenario would have to be found from Neutron ports instead.\n\nThat probably deserves a release note, doesn\u0027t it?","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"d8d6dc0a5591c2aea5c01050bc50cb0da15f4942","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        :param callback_url: agent HTTP API URL."},{"line_number":263,"context_line":"        \"\"\""},{"line_number":264,"context_line":"        # NOTE(pas-ha) immediately skip the rest if nothing to do"},{"line_number":265,"context_line":"        if (task.node.maintenance or"},{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_2b232ebf","line":265,"in_reply_to":"5ff73747_90162a55","updated":"2017-05-03 08:06:36.000000000","message":"that\u0027s actually an interesting question, I\u0027d have to research it deeper.","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8002a277c6493ed3c1d8f1e540e85be9c137a4d0","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"},{"line_number":269,"context_line":"                          \u0027or in unsupported node provision state, \u0027"},{"line_number":270,"context_line":"                          \u0027not taking any action.\u0027, {\u0027node\u0027: task.node.uuid})"},{"line_number":271,"context_line":"                return"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_30aab670","line":269,"updated":"2017-04-26 21:22:37.000000000","message":"nit, might be good to mention what the provision state is. (make it easier, instead of having to look it up). it\u0027s only a .debug so not a big deal.","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"ccb6cbb0b9bc990e4fb764cf1860f6d95df89e8e","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"},{"line_number":269,"context_line":"                          \u0027or in unsupported node provision state, \u0027"},{"line_number":270,"context_line":"                          \u0027not taking any action.\u0027, {\u0027node\u0027: task.node.uuid})"},{"line_number":271,"context_line":"                return"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df3967d1_a2124857","line":269,"in_reply_to":"5ff73747_30aab670","updated":"2017-07-31 11:24:55.000000000","message":"Done","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"d8d6dc0a5591c2aea5c01050bc50cb0da15f4942","unresolved":false,"context_lines":[{"line_number":266,"context_line":"            task.node.provision_state not in (states.DEPLOYWAIT,"},{"line_number":267,"context_line":"                                              states.CLEANWAIT)):"},{"line_number":268,"context_line":"                LOG.debug(\u0027Heartbeat from node %(node)s in maintenance mode \u0027"},{"line_number":269,"context_line":"                          \u0027or in unsupported node provision state, \u0027"},{"line_number":270,"context_line":"                          \u0027not taking any action.\u0027, {\u0027node\u0027: task.node.uuid})"},{"line_number":271,"context_line":"                return"},{"line_number":272,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_ab205ead","line":269,"in_reply_to":"5ff73747_30aab670","updated":"2017-05-03 08:06:36.000000000","message":"will add","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"7342f4c22847bc220a9d6bbb176e72b6ef2beba9","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":279,"context_line":"        # NOTE(pas-ha) skip DB write if unneeded which is most of the time"},{"line_number":280,"context_line":"        if driver_internal_info.get(\u0027agent_url\u0027) !\u003d callback_url:"},{"line_number":281,"context_line":"            driver_internal_info[\u0027agent_url\u0027] \u003d callback_url"},{"line_number":282,"context_line":"            node.driver_internal_info \u003d driver_internal_info"}],"source_content_type":"text/x-python","patch_set":2,"id":"7ffa3b31_3ea31e52","line":279,"updated":"2017-04-14 07:10:27.000000000","message":"I\u0027m not sure that sqlalchemy generates SQL statement for the same data because we use read-update-save schema and sqlalchemy can compare data.","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"d8d6dc0a5591c2aea5c01050bc50cb0da15f4942","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":279,"context_line":"        # NOTE(pas-ha) skip DB write if unneeded which is most of the time"},{"line_number":280,"context_line":"        if driver_internal_info.get(\u0027agent_url\u0027) !\u003d callback_url:"},{"line_number":281,"context_line":"            driver_internal_info[\u0027agent_url\u0027] \u003d callback_url"},{"line_number":282,"context_line":"            node.driver_internal_info \u003d driver_internal_info"}],"source_content_type":"text/x-python","patch_set":2,"id":"5ff73747_de16ca49","line":279,"in_reply_to":"7ffa3b31_3ea31e52","updated":"2017-05-03 08:06:36.000000000","message":"I\u0027m pretty sure our objects do not do deep dict comparison when saving complex data structures to the (JSON?) field. And even if the DB itself will not execute a write operation when data to be written is the same (although it still might want to update the UpdatedAt field), the connection to DB still has to be made first.","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e7b349a967d180dafb88ed2a7d1b3cba501c9a85","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        task.upgrade_lock()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        node \u003d task.node"},{"line_number":284,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        driver_internal_info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_17a80ed9","line":283,"updated":"2017-08-01 13:56:21.000000000","message":"if you do another revision, maybe clean things up a bit. move this above L273 etc.","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"f1ec50b59a5a85d1c427e92a6092a86f1477b6c8","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        task.upgrade_lock()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        node \u003d task.node"},{"line_number":284,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        driver_internal_info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_912073b2","line":283,"in_reply_to":"df3967d1_17a80ed9","updated":"2017-08-02 07:04:03.000000000","message":"will do.","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"d885ca564ad609ce877545f4ecbc6606b6e98eec","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        task.upgrade_lock()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        node \u003d task.node"},{"line_number":284,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        driver_internal_info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_78816c8f","line":283,"in_reply_to":"df3967d1_2738659e","updated":"2017-08-02 09:27:52.000000000","message":"upgrade lock will reserve this node, and will trigger a db record reload, so they are not identical object after lock :P","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b2347195e7549f03112fae1e8159b684572a6440","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        task.upgrade_lock()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        node \u003d task.node"},{"line_number":284,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        driver_internal_info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_9f874c10","line":283,"in_reply_to":"df3967d1_78816c8f","updated":"2017-08-02 15:01:10.000000000","message":"Interesting. learn something new every day. (and then forget it...)","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"f4e2440c8752090b85a793cf1c67fae8a0bcb6fe","unresolved":false,"context_lines":[{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        task.upgrade_lock()"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        node \u003d task.node"},{"line_number":284,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        driver_internal_info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_2738659e","line":283,"in_reply_to":"df3967d1_912073b2","updated":"2017-08-02 07:48:10.000000000","message":"having tested that I\u0027ve found some interesting results - \n\nif I reorder lines like this\n\n  node \u003d task.node\n  ...\n  task.upgrade_lock()\n\nthen by the L297\n\n  node.driver_internal_info !\u003d task.node.driver_internal_info\n\nand the test_heartbeat_in_maintenance test fails. o_O\n\nit seems somehow locking changes references in objects, so I\u0027ll leave it as it is now.","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e7b349a967d180dafb88ed2a7d1b3cba501c9a85","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":287,"context_line":"        driver_internal_info[\u0027agent_url\u0027] \u003d callback_url"},{"line_number":288,"context_line":"        node.driver_internal_info \u003d driver_internal_info"},{"line_number":289,"context_line":"        node.save()"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_f74a2a25","line":287,"updated":"2017-08-01 13:56:21.000000000","message":"I liked the \u0027if driver_internal_info.get(\u0027agent_url\u0027) !\u003d callback_url:\u0027 but am guessing you removed it due to Yuriy \u0026 your comments in previous set.\n\nWas wondering (sorry) whether it might make sense to do that check before getting the lock (before L281).","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"b2347195e7549f03112fae1e8159b684572a6440","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":287,"context_line":"        driver_internal_info[\u0027agent_url\u0027] \u003d callback_url"},{"line_number":288,"context_line":"        node.driver_internal_info \u003d driver_internal_info"},{"line_number":289,"context_line":"        node.save()"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_9f03cc73","line":287,"in_reply_to":"df3967d1_b125b7c4","updated":"2017-08-02 15:01:10.000000000","message":"It seemed to me that there shouldn\u0027t be any change to the node\u0027s driver_internal_info[\u0027agent_url\u0027] before we take out a lock. If there were, it would/might mean that the agent_url is going to be changed (which seems odd, cleared or changed to a diff url?). Anyway, not a big deal.","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"f1ec50b59a5a85d1c427e92a6092a86f1477b6c8","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        LOG.debug(\u0027Heartbeat from node %s\u0027, node.uuid)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":287,"context_line":"        driver_internal_info[\u0027agent_url\u0027] \u003d callback_url"},{"line_number":288,"context_line":"        node.driver_internal_info \u003d driver_internal_info"},{"line_number":289,"context_line":"        node.save()"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_b125b7c4","line":287,"in_reply_to":"df3967d1_f74a2a25","updated":"2017-08-02 07:04:03.000000000","message":"IMO we should not do this check before grabbing the lock (as there\u0027s tiny possiblity that smth else will change the node) and grabbing lock conditionally on that is not going to work either (we need the lock for the rest of the logic regardless of whether agent_url changed or not).","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"}],"ironic/tests/unit/drivers/modules/test_agent_base_vendor.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"d06148a848f03aac1c1c8cb9ee172b855ad54684","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        self.node.provision_state \u003d states.DEPLOYWAIT"},{"line_number":269,"context_line":"        self.node.save()"},{"line_number":270,"context_line":"        with mock.patch.object(objects.node.Node, \u0027save\u0027,"},{"line_number":271,"context_line":"                               wraps\u003dself.node.save) as save_mock:"},{"line_number":272,"context_line":"            with task_manager.acquire("},{"line_number":273,"context_line":"                    self.context, self.node.uuid, shared\u003dFalse) as task:"},{"line_number":274,"context_line":"                self.deploy.heartbeat(task, \u0027url\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9ff52f3f_3b9b1b73","line":271,"range":{"start_line":271,"start_character":31,"end_line":271,"end_character":36},"updated":"2017-04-13 17:13:58.000000000","message":"cool stuff, we need to use it more","commit_id":"1f72dc920ff25ef7470fa23002cf8eecb07127bf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e7b349a967d180dafb88ed2a7d1b3cba501c9a85","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                       \u0027reboot_to_instance\u0027, autospec\u003dTrue)"},{"line_number":71,"context_line":"    @mock.patch.object(agent_base_vendor, \u0027_notify_conductor_resume_clean\u0027,"},{"line_number":72,"context_line":"                       autospec\u003dTrue)"},{"line_number":73,"context_line":"    def test_heartbeat_noops_in_maintenance(self, ncrc_mock, rti_mock,"},{"line_number":74,"context_line":"                                            cd_mock):"},{"line_number":75,"context_line":"        # NOTE(pas-ha) other states are caught to noop before"},{"line_number":76,"context_line":"        for state in (states.DEPLOYWAIT, states.CLEANWAIT):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_37b2f2e7","line":73,"updated":"2017-08-01 13:56:21.000000000","message":"i think you mean \u0027test_heartbeat_in_maintenance\u0027 ? Doesn\u0027t look like you\u0027re testing for noop.","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"f1ec50b59a5a85d1c427e92a6092a86f1477b6c8","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                       \u0027reboot_to_instance\u0027, autospec\u003dTrue)"},{"line_number":71,"context_line":"    @mock.patch.object(agent_base_vendor, \u0027_notify_conductor_resume_clean\u0027,"},{"line_number":72,"context_line":"                       autospec\u003dTrue)"},{"line_number":73,"context_line":"    def test_heartbeat_noops_in_maintenance(self, ncrc_mock, rti_mock,"},{"line_number":74,"context_line":"                                            cd_mock):"},{"line_number":75,"context_line":"        # NOTE(pas-ha) other states are caught to noop before"},{"line_number":76,"context_line":"        for state in (states.DEPLOYWAIT, states.CLEANWAIT):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_311b0782","line":73,"in_reply_to":"df3967d1_37b2f2e7","updated":"2017-08-02 07:04:03.000000000","message":"yep, will rename","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e7b349a967d180dafb88ed2a7d1b3cba501c9a85","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                       autospec\u003dTrue)"},{"line_number":73,"context_line":"    def test_heartbeat_noops_in_maintenance(self, ncrc_mock, rti_mock,"},{"line_number":74,"context_line":"                                            cd_mock):"},{"line_number":75,"context_line":"        # NOTE(pas-ha) other states are caught to noop before"},{"line_number":76,"context_line":"        for state in (states.DEPLOYWAIT, states.CLEANWAIT):"},{"line_number":77,"context_line":"            for m in (ncrc_mock, rti_mock, cd_mock):"},{"line_number":78,"context_line":"                m.reset_mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_77063a89","line":75,"updated":"2017-08-01 13:56:21.000000000","message":"maybe \u0027other states are noop\u0027. although I\u0027m not sure this is even needed; you test for that in the next test.","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"f1ec50b59a5a85d1c427e92a6092a86f1477b6c8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                       autospec\u003dTrue)"},{"line_number":73,"context_line":"    def test_heartbeat_noops_in_maintenance(self, ncrc_mock, rti_mock,"},{"line_number":74,"context_line":"                                            cd_mock):"},{"line_number":75,"context_line":"        # NOTE(pas-ha) other states are caught to noop before"},{"line_number":76,"context_line":"        for state in (states.DEPLOYWAIT, states.CLEANWAIT):"},{"line_number":77,"context_line":"            for m in (ncrc_mock, rti_mock, cd_mock):"},{"line_number":78,"context_line":"                m.reset_mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_111ec36f","line":75,"in_reply_to":"df3967d1_77063a89","updated":"2017-08-02 07:04:03.000000000","message":"Done","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e7b349a967d180dafb88ed2a7d1b3cba501c9a85","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                m.reset_mock()"},{"line_number":106,"context_line":"            with task_manager.acquire(self.context, self.node.uuid,"},{"line_number":107,"context_line":"                                      shared\u003dTrue) as task:"},{"line_number":108,"context_line":"                self.node.maintenance \u003d False"},{"line_number":109,"context_line":"                self.node.provision_state \u003d state"},{"line_number":110,"context_line":"                self.deploy.heartbeat(task, \u0027url\u0027)"},{"line_number":111,"context_line":"                self.assertTrue(task.shared)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_d7cba647","line":108,"updated":"2017-08-01 13:56:21.000000000","message":"it doesn\u0027t matter if this is True or False, right?","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"},{"author":{"_account_id":9542,"name":"Pavlo Shchelokovskyy","email":"pshchelokovskyy@mirantis.com","username":"pshchelo"},"change_message_id":"f1ec50b59a5a85d1c427e92a6092a86f1477b6c8","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                m.reset_mock()"},{"line_number":106,"context_line":"            with task_manager.acquire(self.context, self.node.uuid,"},{"line_number":107,"context_line":"                                      shared\u003dTrue) as task:"},{"line_number":108,"context_line":"                self.node.maintenance \u003d False"},{"line_number":109,"context_line":"                self.node.provision_state \u003d state"},{"line_number":110,"context_line":"                self.deploy.heartbeat(task, \u0027url\u0027)"},{"line_number":111,"context_line":"                self.assertTrue(task.shared)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_b10ed738","line":108,"in_reply_to":"df3967d1_d7cba647","updated":"2017-08-02 07:04:03.000000000","message":"yes, now it does not matter. will remove","commit_id":"7e37c13ac2755f9dc4c7d8b91354c3e3ab9880f8"}]}
