)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"04c4555ea980e49236796e4e220324a0b899ec07","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete instances at the end of leases"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Blazar does not terminate runnning instances at he end of a lease for"},{"line_number":10,"context_line":"now.  That can cause a failure of the other lease. This patch change the"},{"line_number":11,"context_line":"on_end action to force-delete all running instances."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ffe62b97_77caf21a","line":9,"range":{"start_line":9,"start_character":48,"end_line":9,"end_character":50},"updated":"2017-03-30 11:27:54.000000000","message":"s/he/the/ ?","commit_id":"0be1eb4e3da71fa86ef708d62a69dfb8f9f0f61e"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"e46eecef271f9cdca2ab14808c1f376390e0302e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete instances at the end of leases"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Blazar does not terminate runnning instances at he end of a lease for"},{"line_number":10,"context_line":"now.  That can cause a failure of the other lease. This patch change the"},{"line_number":11,"context_line":"on_end action to force-delete all running instances."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"dfeb2761_d9e0ce99","line":9,"range":{"start_line":9,"start_character":48,"end_line":9,"end_character":50},"in_reply_to":"ffe62b97_77caf21a","updated":"2017-03-31 01:07:42.000000000","message":"Done","commit_id":"0be1eb4e3da71fa86ef708d62a69dfb8f9f0f61e"}],"blazar/plugins/oshosts/host_plugin.py":[{"author":{"_account_id":13192,"name":"Souville","display_name":"Bertrand Souville","email":"souville@docomolab-euro.com","username":"bertys"},"change_message_id":"cfadecfb94398fe9d584f792eeefe7195dff30e2","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"plugin_opts \u003d ["},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027on_end\u0027,"},{"line_number":38,"context_line":"               default\u003d\u0027on_end\u0027,"},{"line_number":39,"context_line":"               help\u003d\u0027Actions which we will use in the end of the lease\u0027),"},{"line_number":40,"context_line":"    cfg.StrOpt(\u0027on_start\u0027,"},{"line_number":41,"context_line":"               default\u003d\u0027on_start\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_d814e350","line":38,"range":{"start_line":38,"start_character":24,"end_line":38,"end_character":30},"updated":"2017-03-27 16:11:38.000000000","message":"What about having \u0027delete_servers\u0027 as new default value or require to set \u0027on_end\u0027 to \u0027delete_servers\u0027 in blazar.conf (under [physical:host]) when reserved servers shall be deleted?","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":13192,"name":"Souville","display_name":"Bertrand Souville","email":"souville@docomolab-euro.com","username":"bertys"},"change_message_id":"d288d86b5b60560e20fb02b8a234d79fada83b4e","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"plugin_opts \u003d ["},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027on_end\u0027,"},{"line_number":38,"context_line":"               default\u003d\u0027on_end\u0027,"},{"line_number":39,"context_line":"               help\u003d\u0027Actions which we will use in the end of the lease\u0027),"},{"line_number":40,"context_line":"    cfg.StrOpt(\u0027on_start\u0027,"},{"line_number":41,"context_line":"               default\u003d\u0027on_start\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_c0945d8d","line":38,"range":{"start_line":38,"start_character":24,"end_line":38,"end_character":30},"in_reply_to":"ffe62b97_10341492","updated":"2017-03-30 07:52:33.000000000","message":"OK got it. This is aligned to what you are describing in the corresponding spec. \"on_start\" config is also not used in this Compute Host Reservation use case.\nThanks.","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"34c4f3c83ad88051852cedee00e3147cf0a9c20d","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"plugin_opts \u003d ["},{"line_number":37,"context_line":"    cfg.StrOpt(\u0027on_end\u0027,"},{"line_number":38,"context_line":"               default\u003d\u0027on_end\u0027,"},{"line_number":39,"context_line":"               help\u003d\u0027Actions which we will use in the end of the lease\u0027),"},{"line_number":40,"context_line":"    cfg.StrOpt(\u0027on_start\u0027,"},{"line_number":41,"context_line":"               default\u003d\u0027on_start\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_10341492","line":38,"range":{"start_line":38,"start_character":24,"end_line":38,"end_character":30},"in_reply_to":"ffe62b97_d814e350","updated":"2017-03-29 06:14:48.000000000","message":"I think we should force all instances to be deleted at the end of lease. So, I plan to delete this \u0027on_end\u0027 config and add \u0027before_end\u0027 config instead. That means users cannot choose on_end actions but choose before_end actions like snapshot.","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"f79ea8d71bd30cd5b6f1539d0772f2e5b00abc0d","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            gpool \u003d eventlet.GreenPool()"},{"line_number":187,"context_line":"            for allocation in allocations:"},{"line_number":188,"context_line":"                db_api.host_allocation_destroy(allocation[\u0027id\u0027])"},{"line_number":189,"context_line":"                hypervisor \u003d self.nova.hypervisors.get("},{"line_number":190,"context_line":"                    self._get_hypervisor_from_name_or_id("},{"line_number":191,"context_line":"                        allocation[\u0027compute_host_id\u0027]))"},{"line_number":192,"context_line":"                if hypervisor.__dict__[\u0027running_vms\u0027] \u003e 0:"},{"line_number":193,"context_line":"                    gpool.spawn_n(self._delete_servers(hypervisor\u003dhypervisor))"},{"line_number":194,"context_line":"            gpool.waitall()"},{"line_number":195,"context_line":"            pool.delete(reservation[\u0027resource_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_7ce8597d","line":192,"range":{"start_line":189,"start_character":0,"end_line":192,"end_character":58},"updated":"2017-03-17 14:56:02.000000000","message":"It\u0027s not good to call Nova API a lot.  nova client can filter instances on a specific host by nova_client.servers.list with search_opt args. Or get the all host from a host aggregate related to the ReservationPool then delete all instances in the pool whether or not instances exist on the host.","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"34c4f3c83ad88051852cedee00e3147cf0a9c20d","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            gpool \u003d eventlet.GreenPool()"},{"line_number":187,"context_line":"            for allocation in allocations:"},{"line_number":188,"context_line":"                db_api.host_allocation_destroy(allocation[\u0027id\u0027])"},{"line_number":189,"context_line":"                hypervisor \u003d self.nova.hypervisors.get("},{"line_number":190,"context_line":"                    self._get_hypervisor_from_name_or_id("},{"line_number":191,"context_line":"                        allocation[\u0027compute_host_id\u0027]))"},{"line_number":192,"context_line":"                if hypervisor.__dict__[\u0027running_vms\u0027] \u003e 0:"},{"line_number":193,"context_line":"                    gpool.spawn_n(self._delete_servers(hypervisor\u003dhypervisor))"},{"line_number":194,"context_line":"            gpool.waitall()"},{"line_number":195,"context_line":"            pool.delete(reservation[\u0027resource_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_046f32c5","line":192,"range":{"start_line":189,"start_character":0,"end_line":192,"end_character":58},"in_reply_to":"1a1ced50_7ce8597d","updated":"2017-03-29 06:14:48.000000000","message":"I\u0027ve modified to reduce Nova API call. Thanks!","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"f79ea8d71bd30cd5b6f1539d0772f2e5b00abc0d","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                    self._get_hypervisor_from_name_or_id("},{"line_number":191,"context_line":"                        allocation[\u0027compute_host_id\u0027]))"},{"line_number":192,"context_line":"                if hypervisor.__dict__[\u0027running_vms\u0027] \u003e 0:"},{"line_number":193,"context_line":"                    gpool.spawn_n(self._delete_servers(hypervisor\u003dhypervisor))"},{"line_number":194,"context_line":"            gpool.waitall()"},{"line_number":195,"context_line":"            pool.delete(reservation[\u0027resource_id\u0027])"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_b03755e2","line":193,"range":{"start_line":193,"start_character":20,"end_line":193,"end_character":78},"updated":"2017-03-17 14:56:02.000000000","message":"I don\u0027t think it need to launch nested child thread.","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"34c4f3c83ad88051852cedee00e3147cf0a9c20d","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                    self._get_hypervisor_from_name_or_id("},{"line_number":191,"context_line":"                        allocation[\u0027compute_host_id\u0027]))"},{"line_number":192,"context_line":"                if hypervisor.__dict__[\u0027running_vms\u0027] \u003e 0:"},{"line_number":193,"context_line":"                    gpool.spawn_n(self._delete_servers(hypervisor\u003dhypervisor))"},{"line_number":194,"context_line":"            gpool.waitall()"},{"line_number":195,"context_line":"            pool.delete(reservation[\u0027resource_id\u0027])"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_04a4d206","line":193,"range":{"start_line":193,"start_character":20,"end_line":193,"end_character":78},"in_reply_to":"1a1ced50_b03755e2","updated":"2017-03-29 06:14:48.000000000","message":"Because Nova APIs are asynchronous, right? I\u0027ve stopped to spawn threads.","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"f79ea8d71bd30cd5b6f1539d0772f2e5b00abc0d","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    def _delete_servers(self, hypervisor):"},{"line_number":198,"context_line":"        gpool \u003d eventlet.GreenPool()"},{"line_number":199,"context_line":"        for server in self.nova.hypervisors.search("},{"line_number":200,"context_line":"            hypervisor.__dict__[\u0027hypervisor_hostname\u0027],"},{"line_number":201,"context_line":"            servers\u003dTrue"},{"line_number":202,"context_line":"        )[0].__dict__[\u0027servers\u0027]:"},{"line_number":203,"context_line":"            sv \u003d self.nova.servers.get(server[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_9c17d550","line":200,"range":{"start_line":200,"start_character":12,"end_line":200,"end_character":54},"updated":"2017-03-17 14:56:02.000000000","message":"tips: use getattr() instead of __dict__. __dict__ costs in python.","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"34c4f3c83ad88051852cedee00e3147cf0a9c20d","unresolved":false,"context_lines":[{"line_number":197,"context_line":"    def _delete_servers(self, hypervisor):"},{"line_number":198,"context_line":"        gpool \u003d eventlet.GreenPool()"},{"line_number":199,"context_line":"        for server in self.nova.hypervisors.search("},{"line_number":200,"context_line":"            hypervisor.__dict__[\u0027hypervisor_hostname\u0027],"},{"line_number":201,"context_line":"            servers\u003dTrue"},{"line_number":202,"context_line":"        )[0].__dict__[\u0027servers\u0027]:"},{"line_number":203,"context_line":"            sv \u003d self.nova.servers.get(server[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_c4b14a49","line":200,"range":{"start_line":200,"start_character":12,"end_line":200,"end_character":54},"in_reply_to":"1a1ced50_9c17d550","updated":"2017-03-29 06:14:48.000000000","message":"Thanks for your advise!","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"f79ea8d71bd30cd5b6f1539d0772f2e5b00abc0d","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            hypervisor.__dict__[\u0027hypervisor_hostname\u0027],"},{"line_number":201,"context_line":"            servers\u003dTrue"},{"line_number":202,"context_line":"        )[0].__dict__[\u0027servers\u0027]:"},{"line_number":203,"context_line":"            sv \u003d self.nova.servers.get(server[\u0027uuid\u0027])"},{"line_number":204,"context_line":"            gpool.spawn_n(sv.delete())"},{"line_number":205,"context_line":"        gpool.waitall()"},{"line_number":206,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_c126ca15","line":203,"range":{"start_line":203,"start_character":1,"end_line":203,"end_character":54},"updated":"2017-03-17 14:56:02.000000000","message":"it\u0027s not needed to get the server instance since self.nova.servers.delete(\u003cinstance-id\u003e) deletes the instance.","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"34c4f3c83ad88051852cedee00e3147cf0a9c20d","unresolved":false,"context_lines":[{"line_number":200,"context_line":"            hypervisor.__dict__[\u0027hypervisor_hostname\u0027],"},{"line_number":201,"context_line":"            servers\u003dTrue"},{"line_number":202,"context_line":"        )[0].__dict__[\u0027servers\u0027]:"},{"line_number":203,"context_line":"            sv \u003d self.nova.servers.get(server[\u0027uuid\u0027])"},{"line_number":204,"context_line":"            gpool.spawn_n(sv.delete())"},{"line_number":205,"context_line":"        gpool.waitall()"},{"line_number":206,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ffe62b97_64b27e4b","line":203,"range":{"start_line":203,"start_character":1,"end_line":203,"end_character":54},"in_reply_to":"1a1ced50_c126ca15","updated":"2017-03-29 06:14:48.000000000","message":"Done","commit_id":"b51b697e7215373919a2637a0443805ebd23a4d0"}],"blazar/utils/openstack/nova.py":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"f79ea8d71bd30cd5b6f1539d0772f2e5b00abc0d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        kwargs.setdefault(\u0027version\u0027, version)"},{"line_number":85,"context_line":"        self.nova \u003d nova_client.Client(**kwargs)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        self.nova.servers \u003d ServerManager(self.nova)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        self.exceptions \u003d nova_exception"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_30d52543","side":"PARENT","line":87,"updated":"2017-03-17 14:56:02.000000000","message":"Why is the class removed?","commit_id":"e43e6b1be6331913c593c0075f1a586358620905"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"34c4f3c83ad88051852cedee00e3147cf0a9c20d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        kwargs.setdefault(\u0027version\u0027, version)"},{"line_number":85,"context_line":"        self.nova \u003d nova_client.Client(**kwargs)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        self.nova.servers \u003d ServerManager(self.nova)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        self.exceptions \u003d nova_exception"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a1ced50_f6b96e16","side":"PARENT","line":87,"in_reply_to":"1a1ced50_30d52543","updated":"2017-03-29 06:14:48.000000000","message":"I\u0027ve restored this code because I\u0027ve found it may be needed for the original instance reservation feature. It\u0027s better to be removed if we do not extend the nova servers client for the new instance reservation feature in the future.","commit_id":"e43e6b1be6331913c593c0075f1a586358620905"}],"releasenotes/notes/delete-on-end-3a6d3ced93ffed25.yaml":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"1ab99b13e22f258a8b4f8ac98ae1e360e8d1205f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"deprecations:"},{"line_number":8,"context_line":"  - |"},{"line_number":9,"context_line":"    The \"on_start\" and the \"on_end\" configs for the physical-host plugin have"},{"line_number":10,"context_line":"    been removed. Use a new \"before_end\" config for changing before_end actions"},{"line_number":11,"context_line":"    instead."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"dfeb2761_5894ae8b","line":11,"range":{"start_line":10,"start_character":17,"end_line":11,"end_character":12},"updated":"2017-03-31 08:40:12.000000000","message":"It\u0027s better to write the comment in the patch that introduces \"before_end\" config. If this patch is required to back-port to ocata branch the releasenote of ocata mentions about \"before_end\" config.\n\nOf course, I hope the patch will be merged in P release.","commit_id":"f6bcea970df7a88bfbde92e30b02b1fb1f25b889"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"0c5d47d9c83bf3b78886f21c9391affa178ee05a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"deprecations:"},{"line_number":8,"context_line":"  - |"},{"line_number":9,"context_line":"    The \"on_start\" and the \"on_end\" configs for the physical-host plugin have"},{"line_number":10,"context_line":"    been removed. Use a new \"before_end\" config for changing before_end actions"},{"line_number":11,"context_line":"    instead."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"dfeb2761_f8dfd0d3","line":11,"range":{"start_line":10,"start_character":17,"end_line":11,"end_character":12},"in_reply_to":"dfeb2761_5894ae8b","updated":"2017-04-03 05:32:34.000000000","message":"I\u0027ve removed the note about the \"before_end\" config. I will include the\nnote into the patch which introduces the \"before_end\" config. Thanks!","commit_id":"f6bcea970df7a88bfbde92e30b02b1fb1f25b889"},{"author":{"_account_id":13192,"name":"Souville","display_name":"Bertrand Souville","email":"souville@docomolab-euro.com","username":"bertys"},"change_message_id":"caab3699af8c3dbc51289e925d7e6d25cac5edc5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The physical-host plugin has been changed to force-delete all instances on"},{"line_number":5,"context_line":"    leased hosts at the end of a lease for preventing failures of other"},{"line_number":6,"context_line":"    following leases."},{"line_number":7,"context_line":"deprecations:"},{"line_number":8,"context_line":"  - |"},{"line_number":9,"context_line":"    The *on_start* and the *on_end* configs for the physical-host plugin have"},{"line_number":10,"context_line":"    been removed."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"bff0334d_1db452f1","line":10,"range":{"start_line":7,"start_character":0,"end_line":10,"end_character":17},"updated":"2017-04-10 14:51:06.000000000","message":"If your intention is to deprecate both configs, I suggest you to add e.g. deprecated_for_removal for both configs (See https://docs.openstack.org/developer/oslo.config/opts.html)\n\nIf not, maybe better move this info to the upgrade notes.","commit_id":"1739091b1fbcc209f424c345a325f63d68cbfc42"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"9cb0eb7373e5103258d190c1a4ba31a706e86277","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The physical-host plugin has been changed to force-delete all instances on"},{"line_number":5,"context_line":"    leased hosts at the end of a lease for preventing failures of other"},{"line_number":6,"context_line":"    following leases."},{"line_number":7,"context_line":"deprecations:"},{"line_number":8,"context_line":"  - |"},{"line_number":9,"context_line":"    The *on_start* and the *on_end* configs for the physical-host plugin have"},{"line_number":10,"context_line":"    been removed."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"bff0334d_95ceb960","line":10,"range":{"start_line":7,"start_character":0,"end_line":10,"end_character":17},"in_reply_to":"bff0334d_1db452f1","updated":"2017-04-12 05:48:51.000000000","message":"I\u0027ve taken back the removal of configs and added deprecation flag instead. Thanks!","commit_id":"1739091b1fbcc209f424c345a325f63d68cbfc42"}]}
