)]}'
{"senlin/profiles/os/nova/server.py":[{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"11c5923ed226db57240d38a2a39741104ea89c30","unresolved":false,"context_lines":[{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        try:"},{"line_number":1183,"context_line":"            # stop server if it is active"},{"line_number":1184,"context_line":"            if server.status \u003d\u003d consts.VS_ACTIVE:"},{"line_number":1185,"context_line":"                driver.server_stop(obj.physical_id)"},{"line_number":1186,"context_line":"                driver.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1187,"context_line":"            driver.server_rebuild(obj.physical_id, new_image_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_36051b15","line":1184,"updated":"2020-11-12 00:58:34.000000000","message":"What if the service is in state rebooting or similar?","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":27224,"name":"Duc Truong","email":"duc.openstack@gmail.com","username":"dtruong2"},"change_message_id":"e72345a3d03f37f540811e693d8ef07af9448627","unresolved":false,"context_lines":[{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        try:"},{"line_number":1183,"context_line":"            # stop server if it is active"},{"line_number":1184,"context_line":"            if server.status \u003d\u003d consts.VS_ACTIVE:"},{"line_number":1185,"context_line":"                driver.server_stop(obj.physical_id)"},{"line_number":1186,"context_line":"                driver.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1187,"context_line":"            driver.server_rebuild(obj.physical_id, new_image_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_b41bd9c7","line":1184,"in_reply_to":"1f621f24_36051b15","updated":"2020-11-12 21:51:22.000000000","message":"In that case we skip the stopping of the VM but still try to rebuild it.  The rebuild might fail.  In that case it\u0027s up to the user to retry.","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":27224,"name":"Duc Truong","email":"duc.openstack@gmail.com","username":"dtruong2"},"change_message_id":"8d412c801bf1d3f2bff0989070dff389139880d3","unresolved":false,"context_lines":[{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        try:"},{"line_number":1183,"context_line":"            # stop server if it is active"},{"line_number":1184,"context_line":"            if server.status \u003d\u003d consts.VS_ACTIVE:"},{"line_number":1185,"context_line":"                driver.server_stop(obj.physical_id)"},{"line_number":1186,"context_line":"                driver.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1187,"context_line":"            driver.server_rebuild(obj.physical_id, new_image_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_8262bbac","line":1184,"in_reply_to":"1f621f24_680de28e","updated":"2020-11-16 21:58:23.000000000","message":"Ok, I did some research and found this page: https://docs.openstack.org/nova/latest/reference/vm-states.html#requirements-for-commands\nFor the rebuild command, the VM has to be in active or shutoff state or it will not work and return 409.  So I don\u0027t need to save the state.  This function will shutdown if the VM is active.  So it can safely assume that the VM is in shutdown state or else the rebuild call will fail anyways.","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"8dad19b1889c16696d12a0d576a36d7d02229db8","unresolved":false,"context_lines":[{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"        try:"},{"line_number":1183,"context_line":"            # stop server if it is active"},{"line_number":1184,"context_line":"            if server.status \u003d\u003d consts.VS_ACTIVE:"},{"line_number":1185,"context_line":"                driver.server_stop(obj.physical_id)"},{"line_number":1186,"context_line":"                driver.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1187,"context_line":"            driver.server_rebuild(obj.physical_id, new_image_id,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_680de28e","line":1184,"in_reply_to":"1f621f24_b41bd9c7","updated":"2020-11-12 23:14:58.000000000","message":"But what I am afraid of here is that we will wait endlessly for server to move to VS_SHUTOFF at line 1189. Maybe save the current state and use that instead on line 1189?","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"11c5923ed226db57240d38a2a39741104ea89c30","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"            if server.status \u003d\u003d consts.VS_ACTIVE:"},{"line_number":1185,"context_line":"                driver.server_stop(obj.physical_id)"},{"line_number":1186,"context_line":"                driver.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1187,"context_line":"            driver.server_rebuild(obj.physical_id, new_image_id,"},{"line_number":1188,"context_line":"                                  new_name, new_password)"},{"line_number":1189,"context_line":"            driver.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1190,"context_line":"        except exc.InternalError as ex:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_311a456e","line":1187,"updated":"2020-11-12 00:58:34.000000000","message":"I assume this code path never starts the VM back up again?","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":27224,"name":"Duc Truong","email":"duc.openstack@gmail.com","username":"dtruong2"},"change_message_id":"e72345a3d03f37f540811e693d8ef07af9448627","unresolved":false,"context_lines":[{"line_number":1184,"context_line":"            if server.status \u003d\u003d consts.VS_ACTIVE:"},{"line_number":1185,"context_line":"                driver.server_stop(obj.physical_id)"},{"line_number":1186,"context_line":"                driver.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1187,"context_line":"            driver.server_rebuild(obj.physical_id, new_image_id,"},{"line_number":1188,"context_line":"                                  new_name, new_password)"},{"line_number":1189,"context_line":"            driver.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1190,"context_line":"        except exc.InternalError as ex:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_f47ef1e1","line":1187,"in_reply_to":"1f621f24_311a456e","updated":"2020-11-12 21:51:22.000000000","message":"You mean the rebuild?  No, it does not start up a VM if it was in shutoff state.","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"24c81bab4497ba47cd0fa1b59b41c56823bdf057","unresolved":false,"context_lines":[{"line_number":1274,"context_line":"        nc \u003d self.network(obj)"},{"line_number":1275,"context_line":"        internal_ports \u003d obj.data.get(\u0027internal_ports\u0027, [])"},{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"        if len(networks) \u003e 0:"},{"line_number":1278,"context_line":"            try:"},{"line_number":1279,"context_line":"                # stop server if it is active"},{"line_number":1280,"context_line":"                server \u003d cc.server_get(obj.physical_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_e201253a","line":1277,"updated":"2020-11-11 19:07:27.000000000","message":"nit: if networks:","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":27224,"name":"Duc Truong","email":"duc.openstack@gmail.com","username":"dtruong2"},"change_message_id":"e72345a3d03f37f540811e693d8ef07af9448627","unresolved":false,"context_lines":[{"line_number":1274,"context_line":"        nc \u003d self.network(obj)"},{"line_number":1275,"context_line":"        internal_ports \u003d obj.data.get(\u0027internal_ports\u0027, [])"},{"line_number":1276,"context_line":""},{"line_number":1277,"context_line":"        if len(networks) \u003e 0:"},{"line_number":1278,"context_line":"            try:"},{"line_number":1279,"context_line":"                # stop server if it is active"},{"line_number":1280,"context_line":"                server \u003d cc.server_get(obj.physical_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_348509d0","line":1277,"in_reply_to":"1f621f24_e201253a","updated":"2020-11-12 21:51:22.000000000","message":"Done","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"24c81bab4497ba47cd0fa1b59b41c56823bdf057","unresolved":false,"context_lines":[{"line_number":1313,"context_line":"        :param obj: The node object to operate."},{"line_number":1314,"context_line":"        :param new_profile: The new profile which may contain new network"},{"line_number":1315,"context_line":"                            settings."},{"line_number":1316,"context_line":"        :return: Returns booleans if network was created or deleted."},{"line_number":1317,"context_line":"        :raises: ``EResourceUpdate`` if there are driver failures."},{"line_number":1318,"context_line":"        \"\"\""},{"line_number":1319,"context_line":"        networks_current \u003d self.properties[self.NETWORKS]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_829671ef","line":1316,"updated":"2020-11-11 19:07:27.000000000","message":"Returns a tuple of booleans maybe?","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":27224,"name":"Duc Truong","email":"duc.openstack@gmail.com","username":"dtruong2"},"change_message_id":"e72345a3d03f37f540811e693d8ef07af9448627","unresolved":false,"context_lines":[{"line_number":1313,"context_line":"        :param obj: The node object to operate."},{"line_number":1314,"context_line":"        :param new_profile: The new profile which may contain new network"},{"line_number":1315,"context_line":"                            settings."},{"line_number":1316,"context_line":"        :return: Returns booleans if network was created or deleted."},{"line_number":1317,"context_line":"        :raises: ``EResourceUpdate`` if there are driver failures."},{"line_number":1318,"context_line":"        \"\"\""},{"line_number":1319,"context_line":"        networks_current \u003d self.properties[self.NETWORKS]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_f467114c","line":1316,"in_reply_to":"1f621f24_829671ef","updated":"2020-11-12 21:51:22.000000000","message":"Done","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"24c81bab4497ba47cd0fa1b59b41c56823bdf057","unresolved":false,"context_lines":[{"line_number":1375,"context_line":"        self._update_metadata(obj, new_profile)"},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"        # start server if it was stopped as part of this update operation"},{"line_number":1378,"context_line":"        if image_changed or flavor_changed or network_deleted:"},{"line_number":1379,"context_line":"            cc \u003d self.compute(obj)"},{"line_number":1380,"context_line":"            try:"},{"line_number":1381,"context_line":"                server \u003d cc.server_get(obj.physical_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_85779ba0","line":1378,"updated":"2020-11-11 19:07:27.000000000","message":"This looks fine, but an alternative would be to store the previous state before update (e.g. POWER ON?) and restore it to that state.","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":27224,"name":"Duc Truong","email":"duc.openstack@gmail.com","username":"dtruong2"},"change_message_id":"e72345a3d03f37f540811e693d8ef07af9448627","unresolved":false,"context_lines":[{"line_number":1375,"context_line":"        self._update_metadata(obj, new_profile)"},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"        # start server if it was stopped as part of this update operation"},{"line_number":1378,"context_line":"        if image_changed or flavor_changed or network_deleted:"},{"line_number":1379,"context_line":"            cc \u003d self.compute(obj)"},{"line_number":1380,"context_line":"            try:"},{"line_number":1381,"context_line":"                server \u003d cc.server_get(obj.physical_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f621f24_8d2a10d8","line":1378,"in_reply_to":"1f621f24_85779ba0","updated":"2020-11-12 21:51:22.000000000","message":"I thought about that but I\u0027m not sure if there is a use case for that.  I\u0027ll bring it with others and see what they think.","commit_id":"e690c1df505482ebb5db6b3179494cdfe97d9ae4"},{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"e7b0e6e4459d0d92031307215e5dc71d0fa3d779","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"            # stop server if it is active"},{"line_number":1122,"context_line":"            server \u003d cc.server_get(obj.physical_id)"},{"line_number":1123,"context_line":"            old_server_status \u003d server.status"},{"line_number":1124,"context_line":"            if old_server_status \u003d\u003d consts.VS_ACTIVE:"},{"line_number":1125,"context_line":"                cc.server_stop(obj.physical_id)"},{"line_number":1126,"context_line":"                cc.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1127,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_ba7bae89","line":1124,"updated":"2020-11-14 09:06:34.000000000","message":"This probably needs to be after this if statement, because we are changing old server status from ACTIVE and then expecting it to be ACTIVE at line 1142, which isn\u0027t correct if this if statement is valid.","commit_id":"ba7abb1c0dd8b18d704740fa81bacfd619b9fdbb"},{"author":{"_account_id":27224,"name":"Duc Truong","email":"duc.openstack@gmail.com","username":"dtruong2"},"change_message_id":"90b900cb744ea19e22903bc90197b652850b8555","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"            # stop server if it is active"},{"line_number":1122,"context_line":"            server \u003d cc.server_get(obj.physical_id)"},{"line_number":1123,"context_line":"            old_server_status \u003d server.status"},{"line_number":1124,"context_line":"            if old_server_status \u003d\u003d consts.VS_ACTIVE:"},{"line_number":1125,"context_line":"                cc.server_stop(obj.physical_id)"},{"line_number":1126,"context_line":"                cc.wait_for_server(obj.physical_id, consts.VS_SHUTOFF)"},{"line_number":1127,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_ce0a2224","line":1124,"in_reply_to":"1f621f24_ba7bae89","updated":"2020-11-16 17:31:17.000000000","message":"Yup, definitely a logic flaw :). That\u0027s what happens when I try to commit a change on a Friday afternoon.","commit_id":"ba7abb1c0dd8b18d704740fa81bacfd619b9fdbb"}],"senlin/tests/unit/profiles/test_nova_server_update.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"bbdaf254522fc6fccd27c65a12aec11dbb75912f","unresolved":false,"context_lines":[{"line_number":749,"context_line":"        ])"},{"line_number":750,"context_line":"        cc.server_rebuild.assert_called_once_with("},{"line_number":751,"context_line":"            \u0027NOVA_ID\u0027, \u0027456\u0027, \u0027new_name\u0027, \u0027new_pass\u0027)"},{"line_number":752,"context_line":"        cc.wait_for_server.assert_called_once_with(\u0027NOVA_ID\u0027, consts.VS_SHUTOFF)"},{"line_number":753,"context_line":""},{"line_number":754,"context_line":"    def test_create_interfaces(self):"},{"line_number":755,"context_line":"        cc \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":5,"id":"1f621f24_9c9192f4","line":752,"updated":"2020-11-14 01:13:34.000000000","message":"pep8: E501 line too long (80 \u003e 79 characters)","commit_id":"ba7abb1c0dd8b18d704740fa81bacfd619b9fdbb"}]}
