)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13555,"name":"Pradeep K Surisetty","username":"pradeepkumars","inactive":true},"change_message_id":"e8d7863f7962e9cfafcbeb78a0f0153dc09faa6d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Chris St. Pierre \u003cchris.a.st.pierre@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-04-21 09:54:40 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add scenario to boot a server, lock it, unlock it, and delete it"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ifd29211914ff264738e1ff0371629d33b5f55f36"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dac4157f_b85b07f6","line":7,"updated":"2015-04-21 15:03:32.000000000","message":"Mention component too. \n\nS/ Add Nova lock and unlock scenario. \n\ns/This scenario covers \"lock\" and \"unlock\" commands","commit_id":"b736b692010f9638a5cfe171c0c266d32a1236bd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5ec19bbbfcd88324d31fb3825a543dc972faea19","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Chris St. Pierre \u003cchris.a.st.pierre@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-04-21 09:54:40 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add scenario to boot a server, lock it, unlock it, and delete it"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ifd29211914ff264738e1ff0371629d33b5f55f36"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dac4157f_ac97408f","line":7,"in_reply_to":"dac4157f_b85b07f6","updated":"2015-04-22 17:11:26.000000000","message":"Done","commit_id":"b736b692010f9638a5cfe171c0c266d32a1236bd"}],"rally-jobs/rally.yaml":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"319a60f0684768f522068d8ef7e476df506c7841","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"            name: {{image_name}}"},{"line_number":1244,"context_line":"      runner:"},{"line_number":1245,"context_line":"        type: \"constant\""},{"line_number":1246,"context_line":"        times: 10"},{"line_number":1247,"context_line":"        concurrency: 2"},{"line_number":1248,"context_line":"      context:"},{"line_number":1249,"context_line":"        users:"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3acd31a7_2461053a","line":1246,"updated":"2015-05-02 10:03:57.000000000","message":"We are very limited by time in gates, please make this scenario shorter: \n\n  times: 4\n  concurrency: 4","commit_id":"dccb540a02bd3a5445ecf75e634d63a4e9995326"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"b44d5789a3d3e4a8c9536c20f35fc6c9bc743661","unresolved":false,"context_lines":[{"line_number":1243,"context_line":"            name: {{image_name}}"},{"line_number":1244,"context_line":"      runner:"},{"line_number":1245,"context_line":"        type: \"constant\""},{"line_number":1246,"context_line":"        times: 10"},{"line_number":1247,"context_line":"        concurrency: 2"},{"line_number":1248,"context_line":"      context:"},{"line_number":1249,"context_line":"        users:"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"3acd31a7_bb907d44","line":1246,"in_reply_to":"3acd31a7_2461053a","updated":"2015-05-04 14:00:05.000000000","message":"Done","commit_id":"dccb540a02bd3a5445ecf75e634d63a4e9995326"}],"rally/benchmark/context/cleanup/resources.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"27c85edafe18fb32af636f8f3e7508420117b8c6","unresolved":false,"context_lines":[{"line_number":63,"context_line":"@base.resource(\"nova\", \"servers\", order\u003dnext(_nova_order))"},{"line_number":64,"context_line":"class NovaServer(base.ResourceManager):"},{"line_number":65,"context_line":"    def delete(self):"},{"line_number":66,"context_line":"        if getattr(self, \"OS-EXT-STS:locked\", False):"},{"line_number":67,"context_line":"            self.unlock()"},{"line_number":68,"context_line":"        super(NovaServer, self).delete()"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5ad0253b_490583c0","line":66,"updated":"2015-04-28 22:34:34.000000000","message":"I suppose, you should check self.raw_resource object instead of self.","commit_id":"741536efc26744b58032c61446eb3907a6048e25"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"7e0a2de02d4bec166688a06480fadc0343a66dcf","unresolved":false,"context_lines":[{"line_number":64,"context_line":"class NovaServer(base.ResourceManager):"},{"line_number":65,"context_line":"    def delete(self):"},{"line_number":66,"context_line":"        if getattr(self.raw_resource, \"OS-EXT-STS:locked\", False):"},{"line_number":67,"context_line":"            self.unlock()"},{"line_number":68,"context_line":"        super(NovaServer, self).delete()"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5ad0253b_98a7504f","line":67,"updated":"2015-04-29 13:50:34.000000000","message":"NovaServer class doesn\u0027t have unlock function. It looks like self.raw_resource can have it.","commit_id":"df88ef8cf70633ec9c747999ad6ad97daf4accfb"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"319a60f0684768f522068d8ef7e476df506c7841","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"@base.resource(\"nova\", \"servers\", order\u003dnext(_nova_order))"},{"line_number":64,"context_line":"class NovaServer(base.ResourceManager):"},{"line_number":65,"context_line":"    def delete(self):"},{"line_number":66,"context_line":"        if getattr(self.raw_resource, \"OS-EXT-STS:locked\", False):"},{"line_number":67,"context_line":"            self.raw_resource.unlock()"},{"line_number":68,"context_line":"        super(NovaServer, self).delete()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3acd31a7_0464c946","line":65,"updated":"2015-05-02 10:03:57.000000000","message":"Please cover this with unit tests as well","commit_id":"dccb540a02bd3a5445ecf75e634d63a4e9995326"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"b44d5789a3d3e4a8c9536c20f35fc6c9bc743661","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"@base.resource(\"nova\", \"servers\", order\u003dnext(_nova_order))"},{"line_number":64,"context_line":"class NovaServer(base.ResourceManager):"},{"line_number":65,"context_line":"    def delete(self):"},{"line_number":66,"context_line":"        if getattr(self.raw_resource, \"OS-EXT-STS:locked\", False):"},{"line_number":67,"context_line":"            self.raw_resource.unlock()"},{"line_number":68,"context_line":"        super(NovaServer, self).delete()"}],"source_content_type":"text/x-python","patch_set":6,"id":"3acd31a7_1bd891ee","line":65,"in_reply_to":"3acd31a7_0464c946","updated":"2015-05-04 14:00:05.000000000","message":"Done","commit_id":"dccb540a02bd3a5445ecf75e634d63a4e9995326"}],"rally/benchmark/scenarios/nova/servers.py":[{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"ebf484d6ab25299016d3c5538dcdc74190044a54","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        :param kwargs: Optional additional arguments for server creation"},{"line_number":189,"context_line":"        \"\"\""},{"line_number":190,"context_line":"        server \u003d self._boot_server(image, flavor, **kwargs)"},{"line_number":191,"context_line":"        self._lock_server(server)"},{"line_number":192,"context_line":"        self._unlock_server(server)"},{"line_number":193,"context_line":"        self._delete_server(server, force\u003dforce_delete)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_d72f98f4","line":191,"updated":"2015-04-21 22:36:36.000000000","message":"I think it will make sense to allow the user to specify a pause (in seconds) between lock/unlock. Please take a look at how this is implemented here: https://github.com/openstack/rally/blob/master/rally/benchmark/scenarios/nova/servers.py#L103","commit_id":"6f7281312fa2cddbf6db3700a5056bc23d60658c"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5180b4998618672ce807bbe91cdb68e6e750d09f","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        :param kwargs: Optional additional arguments for server creation"},{"line_number":189,"context_line":"        \"\"\""},{"line_number":190,"context_line":"        server \u003d self._boot_server(image, flavor, **kwargs)"},{"line_number":191,"context_line":"        self._lock_server(server)"},{"line_number":192,"context_line":"        self._unlock_server(server)"},{"line_number":193,"context_line":"        self._delete_server(server, force\u003dforce_delete)"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_a8f7fe57","line":191,"in_reply_to":"dac4157f_d72f98f4","updated":"2015-04-22 17:12:03.000000000","message":"Done","commit_id":"6f7281312fa2cddbf6db3700a5056bc23d60658c"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"27c85edafe18fb32af636f8f3e7508420117b8c6","unresolved":false,"context_lines":[{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        :param image: image to be used to boot an instance"},{"line_number":192,"context_line":"        :param flavor: flavor to be used to boot an instance"},{"line_number":193,"context_line":"        :param min_sleep: Minimum sleep time in seconds (non-negative)"},{"line_number":194,"context_line":"        :param max_sleep: Maximum sleep time in seconds (non-negative)"},{"line_number":195,"context_line":"        :param force_delete: True if force_delete should be used"},{"line_number":196,"context_line":"        :param kwargs: Optional additional arguments for server creation"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ad0253b_09266b68","line":193,"updated":"2015-04-28 22:34:34.000000000","message":"Please change description for  min_sleep and max_sleep to something like \"Minimum sleep time before unlock...\"","commit_id":"741536efc26744b58032c61446eb3907a6048e25"}],"rally/benchmark/scenarios/nova/utils.py":[{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"ebf484d6ab25299016d3c5538dcdc74190044a54","unresolved":false,"context_lines":[{"line_number":705,"context_line":""},{"line_number":706,"context_line":"        :param server: Server to lock"},{"line_number":707,"context_line":"        \"\"\""},{"line_number":708,"context_line":"        server.lock()"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    @base.atomic_action_timer(\"nova.unlock_server\")"},{"line_number":711,"context_line":"    def _unlock_server(self, server):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_d77d58e8","line":708,"updated":"2015-04-21 22:36:36.000000000","message":"Hmm... Are you sure that server.lock() is a synchronous function? All other atomic actions in this module (stop, rescue, suspend etc.) deal with the problem of nova client functions being asynchronous by polling the server until it gets into the desired state. For example, see this:\n\nhttps://github.com/openstack/rally/blob/master/rally/benchmark/scenarios/nova/utils.py#L221-L237","commit_id":"6f7281312fa2cddbf6db3700a5056bc23d60658c"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5180b4998618672ce807bbe91cdb68e6e750d09f","unresolved":false,"context_lines":[{"line_number":705,"context_line":""},{"line_number":706,"context_line":"        :param server: Server to lock"},{"line_number":707,"context_line":"        \"\"\""},{"line_number":708,"context_line":"        server.lock()"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    @base.atomic_action_timer(\"nova.unlock_server\")"},{"line_number":711,"context_line":"    def _unlock_server(self, server):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_6838c6ef","line":708,"in_reply_to":"dac4157f_d77d58e8","updated":"2015-04-22 17:12:03.000000000","message":"Looking at the code, it definitely appears to be synchronous. Unlike the other actions you list, locking/unlocking is just a simple database write so there\u0027s no reason to perform it as a background task. (Compare, e.g., https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2944 and https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2772)","commit_id":"6f7281312fa2cddbf6db3700a5056bc23d60658c"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"ebf484d6ab25299016d3c5538dcdc74190044a54","unresolved":false,"context_lines":[{"line_number":711,"context_line":"    def _unlock_server(self, server):"},{"line_number":712,"context_line":"        \"\"\"Unlock the given server."},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"        :param server: Server to lock"},{"line_number":715,"context_line":"        \"\"\""},{"line_number":716,"context_line":"        server.unlock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_4c1664f2","line":714,"updated":"2015-04-21 22:36:36.000000000","message":"typo: \"unlock\"","commit_id":"6f7281312fa2cddbf6db3700a5056bc23d60658c"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5180b4998618672ce807bbe91cdb68e6e750d09f","unresolved":false,"context_lines":[{"line_number":711,"context_line":"    def _unlock_server(self, server):"},{"line_number":712,"context_line":"        \"\"\"Unlock the given server."},{"line_number":713,"context_line":""},{"line_number":714,"context_line":"        :param server: Server to lock"},{"line_number":715,"context_line":"        \"\"\""},{"line_number":716,"context_line":"        server.unlock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_489d0209","line":714,"in_reply_to":"dac4157f_4c1664f2","updated":"2015-04-22 17:12:03.000000000","message":"Done","commit_id":"6f7281312fa2cddbf6db3700a5056bc23d60658c"}],"samples/tasks/scenarios/nova/boot-unlock-and-delete.yaml":[{"author":{"_account_id":13555,"name":"Pradeep K Surisetty","username":"pradeepkumars","inactive":true},"change_message_id":"26d0cbaac85ab67a9d57829597ce288788dbfbde","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"  NovaServers.boot_unlock_and_delete:"},{"line_number":3,"context_line":"    -"},{"line_number":4,"context_line":"      args:"},{"line_number":5,"context_line":"        flavor:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"dac4157f_b8ae6796","line":2,"updated":"2015-04-21 15:04:54.000000000","message":"s/boot_lock_unlock_and_delete","commit_id":"b736b692010f9638a5cfe171c0c266d32a1236bd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5ec19bbbfcd88324d31fb3825a543dc972faea19","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"  NovaServers.boot_unlock_and_delete:"},{"line_number":3,"context_line":"    -"},{"line_number":4,"context_line":"      args:"},{"line_number":5,"context_line":"        flavor:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"dac4157f_ec7c1874","line":2,"in_reply_to":"dac4157f_b8ae6796","updated":"2015-04-22 17:11:26.000000000","message":"Done","commit_id":"b736b692010f9638a5cfe171c0c266d32a1236bd"}],"tests/unit/benchmark/scenarios/nova/test_servers.py":[{"author":{"_account_id":13555,"name":"Pradeep K Surisetty","username":"pradeepkumars","inactive":true},"change_message_id":"e8d7863f7962e9cfafcbeb78a0f0153dc09faa6d","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        scenario \u003d servers.NovaServers()"},{"line_number":115,"context_line":"        scenario._boot_server \u003d mock.Mock(return_value\u003dserver)"},{"line_number":116,"context_line":"        scenario._lock_server \u003d mock.Mock(side_effect\u003dlambda s: s.lock())"},{"line_number":117,"context_line":"        scenario._unlock_server \u003d mock.Mock(side_effect\u003dlambda s: s.unlock())"},{"line_number":118,"context_line":"        scenario._delete_server \u003d mock.Mock("},{"line_number":119,"context_line":"            side_effect\u003dlambda s, **kwargs:"},{"line_number":120,"context_line":"                self.assertFalse(getattr(s, \"OS-EXT-STS:locked\", False)))"}],"source_content_type":"text/x-python","patch_set":1,"id":"dac4157f_581bcb1b","line":117,"updated":"2015-04-21 15:03:32.000000000","message":"Once you lock, non root user will not be able to access. \nYou might need to check that.","commit_id":"b736b692010f9638a5cfe171c0c266d32a1236bd"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5ec19bbbfcd88324d31fb3825a543dc972faea19","unresolved":false,"context_lines":[{"line_number":114,"context_line":"        scenario \u003d servers.NovaServers()"},{"line_number":115,"context_line":"        scenario._boot_server \u003d mock.Mock(return_value\u003dserver)"},{"line_number":116,"context_line":"        scenario._lock_server \u003d mock.Mock(side_effect\u003dlambda s: s.lock())"},{"line_number":117,"context_line":"        scenario._unlock_server \u003d mock.Mock(side_effect\u003dlambda s: s.unlock())"},{"line_number":118,"context_line":"        scenario._delete_server \u003d mock.Mock("},{"line_number":119,"context_line":"            side_effect\u003dlambda s, **kwargs:"},{"line_number":120,"context_line":"                self.assertFalse(getattr(s, \"OS-EXT-STS:locked\", False)))"}],"source_content_type":"text/x-python","patch_set":1,"id":"dac4157f_acb06044","line":117,"in_reply_to":"dac4157f_581bcb1b","updated":"2015-04-22 17:11:26.000000000","message":"That\u0027s not quite accurate. A locked instance cannot be terminated by non-admin. Who can unlock an instance can vary, but the user who locked an instance can always unlock it. So we\u0027d only need to test that Rally isn\u0027t changing users in the middle of a test call -- i.e., to ensure that it\u0027s not locking as user1 and unlocking as user2 -- which should be a safe assumption to make.","commit_id":"b736b692010f9638a5cfe171c0c266d32a1236bd"},{"author":{"_account_id":13555,"name":"Pradeep K Surisetty","username":"pradeepkumars","inactive":true},"change_message_id":"e7d4c64a9085cfb9fd3065ce913593084d11381f","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        scenario \u003d servers.NovaServers()"},{"line_number":115,"context_line":"        scenario._boot_server \u003d mock.Mock(return_value\u003dserver)"},{"line_number":116,"context_line":"        scenario._lock_server \u003d mock.Mock(side_effect\u003dlambda s: s.lock())"},{"line_number":117,"context_line":"        scenario._unlock_server \u003d mock.Mock(side_effect\u003dlambda s: s.unlock())"},{"line_number":118,"context_line":"        scenario._delete_server \u003d mock.Mock("},{"line_number":119,"context_line":"            side_effect\u003dlambda s, **kwargs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_cce14bd2","line":116,"updated":"2015-04-21 22:03:23.000000000","message":"You might need to test if other non root user able to access after locking. \nsame case with unlock too.","commit_id":"6f7281312fa2cddbf6db3700a5056bc23d60658c"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5180b4998618672ce807bbe91cdb68e6e750d09f","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        scenario \u003d servers.NovaServers()"},{"line_number":115,"context_line":"        scenario._boot_server \u003d mock.Mock(return_value\u003dserver)"},{"line_number":116,"context_line":"        scenario._lock_server \u003d mock.Mock(side_effect\u003dlambda s: s.lock())"},{"line_number":117,"context_line":"        scenario._unlock_server \u003d mock.Mock(side_effect\u003dlambda s: s.unlock())"},{"line_number":118,"context_line":"        scenario._delete_server \u003d mock.Mock("},{"line_number":119,"context_line":"            side_effect\u003dlambda s, **kwargs:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dac4157f_28152e48","line":116,"in_reply_to":"dac4157f_cce14bd2","updated":"2015-04-22 17:12:03.000000000","message":"I still don\u0027t understand what you\u0027re wanting to test here. The user who locked an instance can always unlock it, so all that matters is that Rally doesn\u0027t switch users in the middle of running a scenario. I\u0027m not trying to test the semantics of locking, just the performance. There are ample Nova and Tempest tests to ensure that locking permissions work as expected.","commit_id":"6f7281312fa2cddbf6db3700a5056bc23d60658c"}]}
