)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"65e7b9c5b1065e2db4ff25b47014242cd7bd1800","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     jichen \u003cjichenjc@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-03-22 14:07:20 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Not instance to ERROR if set_admin_password failed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In some cases instance will be set to ERROR state when"},{"line_number":10,"context_line":"set_admin_password failed (some Exception like Forbidden)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df7087c5_326746ba","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":4},"updated":"2018-03-22 13:46:24.000000000","message":"Nit: Not set","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"fd99d18f9028fd9e30308ebf1c7fa8d1e5dcc4ae","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     jichen \u003cjichenjc@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-03-22 14:07:20 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Not instance to ERROR if set_admin_password failed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In some cases instance will be set to ERROR state when"},{"line_number":10,"context_line":"set_admin_password failed (some Exception like Forbidden)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df7087c5_affaf271","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":4},"in_reply_to":"df7087c5_326746ba","updated":"2018-03-23 09:17:32.000000000","message":"ok , got it","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"}],"nova/compute/manager.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e4cbc526f4d34a05276d2a2f616ea56e9e59cece","unresolved":false,"context_lines":[{"line_number":3487,"context_line":"            instance.task_state \u003d None"},{"line_number":3488,"context_line":"            instance.save("},{"line_number":3489,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3490,"context_line":"        except exception.InstanceAgentNotEnabled:"},{"line_number":3491,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3492,"context_line":"                LOG.debug(\u0027Guest agent is not enabled for the instance.\u0027,"},{"line_number":3493,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_fa2a65e5","line":3490,"range":{"start_line":3490,"start_character":8,"end_line":3490,"end_character":9},"updated":"2018-03-26 06:15:49.000000000","message":"here:)","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"22ea452871641f350767cd2e711f6c45730f6c5f","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_4c3fbf24","line":3522,"range":{"start_line":3522,"start_character":12,"end_line":3522,"end_character":38},"updated":"2018-03-22 12:40:37.000000000","message":"i think it is ok as i did not find exact reason or exception where server cannot be accessible and we need to set it to error.\n\nIf something wrong happened during set password and instance go to bad state and we set kept the state Active, we do have logs to debug it. \n\nBut need more opinion in case m missing anything.","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4a0b036fa2d2be1aa01390b5db90482137f4a12c","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_92ef321c","line":3522,"range":{"start_line":3522,"start_character":12,"end_line":3522,"end_character":38},"in_reply_to":"df7087c5_4c3fbf24","updated":"2018-03-22 13:42:52.000000000","message":"Is this operation asynchronous?  Does the exception bubble up to the end user?  If not, perhaps having the instance in error state is the only way they can know the operation failed (without looking at logs).","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"406351946903e49d8a9d59e366d064be97757fc7","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_32b98614","line":3522,"range":{"start_line":3522,"start_character":12,"end_line":3522,"end_character":38},"in_reply_to":"df7087c5_92ef321c","updated":"2018-03-22 13:44:34.000000000","message":"[Later] Well, looking at the bug, the user clearly gets immediate feedback, at least on the CLI.  So this change seems legit to me, since the VM is still okay - just with the old password instead of the new.","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"d15d2e875c614198cd0966edb2e19063c1907a2c","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3526,"context_line":"            # potentially reveal password information to the"},{"line_number":3527,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_d86069a8","line":3524,"range":{"start_line":3522,"start_character":0,"end_line":3524,"end_character":66},"updated":"2018-03-22 14:54:35.000000000","message":"Seems\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/libvirt/driver.py?h\u003dstable/queens#n2054\ncould possiblly lead to error?\n\nBesides, seems\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/libvirt/driver.py?h\u003dstable/queens#n2027\ndidn\u0027t got handled, only InstanceAgentNotEnabled got handled and it didn\u0027t got used any where according to my search.","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8e29df165820d7e5778c32144f44993a9ea91c92","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3526,"context_line":"            # potentially reveal password information to the"},{"line_number":3527,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_89f8c5c4","line":3524,"range":{"start_line":3522,"start_character":0,"end_line":3524,"end_character":66},"in_reply_to":"bf659307_1af5d957","updated":"2018-03-26 09:16:00.000000000","message":"Copied from previous reply:\n\nI agree with what you suggesting in point 2, I\u0027m just asking whether the InternelError could be something that can leading the instance to Error states in hypervisor layer, is it suitable to just set the Exception catch to set instance to ACTIVE. And for InstanceAgentNotEnabled, I didn\u0027t saw that QemuAgentNotEnabled is a child of InstanceAgentNotEnabled, to it is good :)","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":9373,"name":"Vlad Gusev","email":"vlad.esten@gmail.com","username":"s10"},"change_message_id":"a8844d91034f99421099abea0eaf8020d9a3ac53","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3526,"context_line":"            # potentially reveal password information to the"},{"line_number":3527,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9643486b","line":3524,"range":{"start_line":3522,"start_character":0,"end_line":3524,"end_character":66},"in_reply_to":"bf659307_89f8c5c4","updated":"2018-10-03 14:46:59.000000000","message":"InternalError might be raised by the libvirt in any situations in which qemu-guest-agent inside vm wasn\u0027t able to change a password. For example, selinux has forbidden it or qemu-guest-agent process inside VM was just stopped by the vm\u0027s administrator.\nI believe we shouldn\u0027t set VM to the ERROR state on failed set-admin-password.","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"fde4029180b1ed4b324cafb5c6706979090c7e7f","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3526,"context_line":"            # potentially reveal password information to the"},{"line_number":3527,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_285522fa","line":3524,"range":{"start_line":3522,"start_character":0,"end_line":3524,"end_character":66},"in_reply_to":"bf659307_89f8c5c4","updated":"2018-04-04 09:14:46.000000000","message":"InternelError is raised on libvirtError and it is hard to say it cause server unaccessible and unusable. Thats the reason i want to go with \"FALSE ACTIVE\" approach which is much safer than than \"FALSE ERROR\".","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e4cbc526f4d34a05276d2a2f616ea56e9e59cece","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3526,"context_line":"            # potentially reveal password information to the"},{"line_number":3527,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_1af5d957","line":3524,"range":{"start_line":3522,"start_character":0,"end_line":3524,"end_character":66},"in_reply_to":"bf659307_f6f2839a","updated":"2018-03-26 06:15:49.000000000","message":"#1 listed above :)\n\n#2 I agree the comment about know the exception before to make it to ERROR , if we do know we can file a bug and get the bug fix","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"086c28d5836cb07984323b0284129c7a517a017a","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3526,"context_line":"            # potentially reveal password information to the"},{"line_number":3527,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_f6f2839a","line":3524,"range":{"start_line":3522,"start_character":0,"end_line":3524,"end_character":66},"in_reply_to":"df7087c5_2ad4901f","updated":"2018-03-26 02:12:36.000000000","message":"Thanks i got your point now.\nRE:\n1.InstanceAgentNotEnabled is being handled in API side and raised as 409.\n\nhttps://github.com/openstack/nova/blob/0ab78890c155f0b6ffc7c4148b26642f47aa7070/nova/api/openstack/compute/admin_password.py#L54\n\n2. I think we should not set serve to error till we are not sure whether exception occurred during set_admin_password really causing server unaccessible. If we have such known exception then for those cases we can set server to error but if not then i will prefer leave the sever in Active and if there is something wrong in server(which we kept in Active state) then, it can be debugged later with set_admin_password  logged exceptions. \n\nI am kind of suggestion to avoid any possibility of FALSE ERROR state which is more dangerous than FALSE ACTIVE.","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"96701e32780e3594570457193319b2e7c26aae2e","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3526,"context_line":"            # potentially reveal password information to the"},{"line_number":3527,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_2ad4901f","line":3524,"range":{"start_line":3522,"start_character":0,"end_line":3524,"end_character":66},"in_reply_to":"df7087c5_cf25e60a","updated":"2018-03-23 09:39:40.000000000","message":"What I mean is,\n1. InstanceAgentNotEnabled is being handled but not used anywhere, should probably delete it.\n2. According to the code in:\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/libvirt/driver.py?h\u003dstable/queens#n2054\nand\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/virt/libvirt/driver.py?h\u003dstable/queens#n2027\n\nthis except Exception will handle:\nQemuGuestAgentNotEnabled and InternalError\nobviously QemuGuestAgentNotEnabled will not causing the real down-layer vm in error state, but maybe InternalError can lead to vm into some unusable status?\n\nSo what I\u0027m suggesting is handle QemuGuestAgentNotEnabled here to not set instance record in Nova to Error state, but still keep the except Exception to put it in Error state, since there might be some other unknown reasons. Since we have very detailed branches in http://git.openstack.org/cgit/openstack/nova/tree/nova/virt/libvirt/driver.py?h\u003dstable/queens#n2027\ndeciding which exception to raise, I\u0027d say we keep the general Exception handling.","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"8a2365163554c289a3e7e3895c3e9f052a03cb7b","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3526,"context_line":"            # potentially reveal password information to the"},{"line_number":3527,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_f1ac5aa0","line":3524,"range":{"start_line":3522,"start_character":0,"end_line":3524,"end_character":66},"in_reply_to":"df7087c5_d86069a8","updated":"2018-03-23 02:51:38.000000000","message":"may be i did not get completely. You mean we need to handle those exception separately or those can also lead to VM to error state?\n\n@L3519 except Exception: should take care of all exception raised during set_admin_password.","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"fd99d18f9028fd9e30308ebf1c7fa8d1e5dcc4ae","unresolved":false,"context_lines":[{"line_number":3519,"context_line":"        except Exception:"},{"line_number":3520,"context_line":"            # Catch all here because this could be anything."},{"line_number":3521,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3522,"context_line":"            instance.task_state \u003d None"},{"line_number":3523,"context_line":"            instance.save("},{"line_number":3524,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3525,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3526,"context_line":"            # potentially reveal password information to the"},{"line_number":3527,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_cf25e60a","line":3524,"range":{"start_line":3522,"start_character":0,"end_line":3524,"end_character":66},"in_reply_to":"df7087c5_f1ac5aa0","updated":"2018-03-23 09:17:32.000000000","message":"@zhenyu, as gmann mentioned, I don\u0027t fully get your point...","commit_id":"a7bd0ec430b6150938690842e64a74f3a99f5fee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25bdacaacf9ed42c3637ff7065cae15243fe092d","unresolved":false,"context_lines":[{"line_number":3588,"context_line":"                             instance\u003dinstance)"},{"line_number":3589,"context_line":""},{"line_number":3590,"context_line":"    @wrap_exception()"},{"line_number":3591,"context_line":"    @reverts_task_state"},{"line_number":3592,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":3593,"context_line":"    @wrap_instance_fault"},{"line_number":3594,"context_line":"    def set_admin_password(self, context, instance, new_pass):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_19bbebbd","line":3591,"range":{"start_line":3591,"start_character":5,"end_line":3591,"end_character":23},"updated":"2018-10-03 15:11:59.000000000","message":"This will set the task_state \u003d None. We don\u0027t need that explicitly below.","commit_id":"595afba39d61a33cec8e8648bee6e82b830deb51"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25bdacaacf9ed42c3637ff7065cae15243fe092d","unresolved":false,"context_lines":[{"line_number":3590,"context_line":"    @wrap_exception()"},{"line_number":3591,"context_line":"    @reverts_task_state"},{"line_number":3592,"context_line":"    @wrap_instance_event(prefix\u003d\u0027compute\u0027)"},{"line_number":3593,"context_line":"    @wrap_instance_fault"},{"line_number":3594,"context_line":"    def set_admin_password(self, context, instance, new_pass):"},{"line_number":3595,"context_line":"        \"\"\"Set the root/admin password for an instance on this host."},{"line_number":3596,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_d9ded30e","line":3593,"range":{"start_line":3593,"start_character":5,"end_line":3593,"end_character":24},"updated":"2018-10-03 15:11:59.000000000","message":"This will record a fault on the instance in case we failed, which is likely good enough for admins to dig out the details (besides the logs) of why the action failed - although the traceback in the fault will just have the InstancePasswordSetFailed exception with the generic message, not the actual reason why things failed - that will be in the logs.","commit_id":"595afba39d61a33cec8e8648bee6e82b830deb51"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"25bdacaacf9ed42c3637ff7065cae15243fe092d","unresolved":false,"context_lines":[{"line_number":3655,"context_line":"        except Exception:"},{"line_number":3656,"context_line":"            # Catch all here because this could be anything."},{"line_number":3657,"context_line":"            LOG.exception(\u0027set_admin_password failed\u0027, instance\u003dinstance)"},{"line_number":3658,"context_line":"            instance.task_state \u003d None"},{"line_number":3659,"context_line":"            instance.save("},{"line_number":3660,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3661,"context_line":"            # We create a new exception here so that we won\u0027t"},{"line_number":3662,"context_line":"            # potentially reveal password information to the"},{"line_number":3663,"context_line":"            # API caller.  The real exception is logged above"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_79e1bfce","line":3660,"range":{"start_line":3658,"start_character":12,"end_line":3660,"end_character":66},"updated":"2018-10-03 15:11:59.000000000","message":"We shouldn\u0027t need this, see above. I guess this was copied from the other exception blocks, but I\u0027d argue that we don\u0027t need those either because of the @reverts_task_state decorator.","commit_id":"595afba39d61a33cec8e8648bee6e82b830deb51"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"563075a064517f90f4668f8ac93a0f76ea711db1","unresolved":false,"context_lines":[{"line_number":3749,"context_line":"                              instance\u003dinstance,"},{"line_number":3750,"context_line":"                              new_pass\u003dNone)"},{"line_number":3751,"context_line":""},{"line_number":3752,"context_line":"            instance_save_mock.assert_called_once_with("},{"line_number":3753,"context_line":"                expected_task_state\u003dtask_states.UPDATING_PASSWORD)"},{"line_number":3754,"context_line":""},{"line_number":3755,"context_line":"            self.assertEqual(expected_vm_state, instance.vm_state)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_a43e4e87","line":3752,"updated":"2018-10-03 15:37:31.000000000","message":"This will likely fail for the Forbidden case because we aren\u0027t calling save() directly, it\u0027s happening via the _instance_update call which happens via the reverts_task_state decorator, but _instance_update is also mocked out here.\n\nSo in that case, you probably want to assert that _instance_update is called with the expected arguments.","commit_id":"e1dedf87b3f90873a8c89bf8d1b22aef64a42698"}]}
