)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"8b65fc5119243b840005eb1a4a558e5b310107a3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"with the expiration of the lease."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ied3c766a1d7d839eb4301b494e4b35c75151f242"},{"line_number":13,"context_line":"Closes-bug: 1694181"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f1d235d_72484acb","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":10},"updated":"2017-07-13 06:35:23.000000000","message":"This patch fixes a part of the bug report. In the case, it should use Partial-bug instead of Closes-bug because Jenkins changes the status of the report to \"Fix committed\".","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"8b65fc5119243b840005eb1a4a558e5b310107a3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"with the expiration of the lease."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ied3c766a1d7d839eb4301b494e4b35c75151f242"},{"line_number":13,"context_line":"Closes-bug: 1694181"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f1d235d_92d526ba","line":13,"range":{"start_line":13,"start_character":12,"end_line":13,"end_character":19},"updated":"2017-07-13 06:35:23.000000000","message":"please write the bug number with # to inform Jenkins of the bug number, like #1694181","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"3a895fd62e5eb9cafa5755375181d9335f617d2a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"with the expiration of the lease."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ied3c766a1d7d839eb4301b494e4b35c75151f242"},{"line_number":13,"context_line":"Closes-bug: 1694181"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ff346bd7_db028a09","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":10},"in_reply_to":"3f1d235d_72484acb","updated":"2017-07-28 10:42:48.000000000","message":"Done","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"3a895fd62e5eb9cafa5755375181d9335f617d2a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"with the expiration of the lease."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ied3c766a1d7d839eb4301b494e4b35c75151f242"},{"line_number":13,"context_line":"Closes-bug: 1694181"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ff346bd7_bb09062d","line":13,"range":{"start_line":13,"start_character":12,"end_line":13,"end_character":19},"in_reply_to":"3f1d235d_92d526ba","updated":"2017-07-28 10:42:48.000000000","message":"Done","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"db483e12e75019c2c5811da9b560540515ed4901","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add scenario test of lease expiration"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The reserved host for blazar users are released when the lease expires,"},{"line_number":10,"context_line":"and host aggregate that created for operators is deleted."},{"line_number":11,"context_line":"Check the instance created during the expiration has been removed"},{"line_number":12,"context_line":"by release of host."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"5f2577a7_159bfc17","line":10,"updated":"2017-09-18 10:58:48.000000000","message":"Hosts aggregates are not created for operators, but for internal use by Blazar.","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"c988011498105382bdd2354e60fd23ecad22cda2","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add scenario test of lease expiration"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The reserved host for blazar users are released when the lease expires,"},{"line_number":10,"context_line":"and host aggregate that created for operators is deleted."},{"line_number":11,"context_line":"Check the instance created during the expiration has been removed"},{"line_number":12,"context_line":"by release of host."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"7f515b1d_dcfc2a40","line":10,"in_reply_to":"5f2577a7_159bfc17","updated":"2017-09-22 05:51:55.000000000","message":"Done","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"}],"contrib/tempest/tempest/scenario/resource_reservation_scenario.py":[{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"2883a631837c96ff0cf37260caeb4f2f434e866c","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        def check_lease_end():"},{"line_number":74,"context_line":"            try:"},{"line_number":75,"context_line":"                lease \u003d self.reservation_client.get_lease(lease_id)[\u0027lease\u0027]"},{"line_number":76,"context_line":"                if lease:"},{"line_number":77,"context_line":"                    events \u003d lease[\u0027events\u0027]"},{"line_number":78,"context_line":"                    return len(filter(lambda evt:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_d47605a5","line":75,"range":{"start_line":75,"start_character":67,"end_line":75,"end_character":76},"updated":"2017-11-13 19:49:52.000000000","message":"Are you sure this is required? This doesn\u0027t seem right, if the tests using check_lease_end were correct without this code.","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"855f25a1ae0dbc547309ce980a420b56a93220e9","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        def check_lease_end():"},{"line_number":74,"context_line":"            try:"},{"line_number":75,"context_line":"                lease \u003d self.reservation_client.get_lease(lease_id)[\u0027lease\u0027]"},{"line_number":76,"context_line":"                if lease:"},{"line_number":77,"context_line":"                    events \u003d lease[\u0027events\u0027]"},{"line_number":78,"context_line":"                    return len(filter(lambda evt:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_c384db0e","line":75,"range":{"start_line":75,"start_character":67,"end_line":75,"end_character":76},"in_reply_to":"1f485f77_1e3c9de0","updated":"2017-11-15 09:28:44.000000000","message":"Yes, this patch is first use of the wait_for_lease_end now. IMO, it\u0027s not matter to fix this by this patch since the current instance reservation tests are tests for the old-instance reservation. The existing tests will be removed later.","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"5d74d397b7306280917aacb1e601cc595bf955c2","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        def check_lease_end():"},{"line_number":74,"context_line":"            try:"},{"line_number":75,"context_line":"                lease \u003d self.reservation_client.get_lease(lease_id)[\u0027lease\u0027]"},{"line_number":76,"context_line":"                if lease:"},{"line_number":77,"context_line":"                    events \u003d lease[\u0027events\u0027]"},{"line_number":78,"context_line":"                    return len(filter(lambda evt:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_1e3c9de0","line":75,"range":{"start_line":75,"start_character":67,"end_line":75,"end_character":76},"in_reply_to":"1f485f77_c6a76da7","updated":"2017-11-14 18:29:45.000000000","message":"You\u0027re right, it is fixing an issue with the code. I think it wasn\u0027t noticed before because wait_for_lease_end() is only called in test_server_basic_resource_reservation_operation which is skipped. I think it would be best to separate this fix and enabled the instance reservation tests in another commit.","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"459f62dc0a8f0b4b6dfc7ea02edca4d5c6b32d6f","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        def check_lease_end():"},{"line_number":74,"context_line":"            try:"},{"line_number":75,"context_line":"                lease \u003d self.reservation_client.get_lease(lease_id)[\u0027lease\u0027]"},{"line_number":76,"context_line":"                if lease:"},{"line_number":77,"context_line":"                    events \u003d lease[\u0027events\u0027]"},{"line_number":78,"context_line":"                    return len(filter(lambda evt:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_c6a76da7","line":75,"range":{"start_line":75,"start_character":67,"end_line":75,"end_character":76},"in_reply_to":"1f485f77_d47605a5","updated":"2017-11-14 08:52:56.000000000","message":"self.reservation_client.get_lease returns the whole response body[1], so it looks right change for me. \n\n1. https://github.com/openstack/blazar/blob/master/contrib/tempest/tempest/resource_reservation_client_manager.py#L44","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"}],"contrib/tempest/tempest/scenario/test_host_reservation.py":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"8b65fc5119243b840005eb1a4a558e5b310107a3","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                            list_services(binary\u003d\u0027nova-compute\u0027)[\u0027services\u0027]))"},{"line_number":47,"context_line":"        return compute"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def get_lease_body(self, lease_name, host_name, date_set):"},{"line_number":50,"context_line":"        current_time \u003d datetime.datetime.utcnow()"},{"line_number":51,"context_line":"        if date_set:"},{"line_number":52,"context_line":"            end_time \u003d current_time + datetime.timedelta(hours\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_c0b79386","line":49,"range":{"start_line":49,"start_character":52,"end_line":49,"end_character":60},"updated":"2017-07-13 06:35:23.000000000","message":"What is the purpose of the argument?  If it is assigned with False, end_time is equal to start_time. This is a little strange behavior.","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"3a895fd62e5eb9cafa5755375181d9335f617d2a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                            list_services(binary\u003d\u0027nova-compute\u0027)[\u0027services\u0027]))"},{"line_number":47,"context_line":"        return compute"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def get_lease_body(self, lease_name, host_name, date_set):"},{"line_number":50,"context_line":"        current_time \u003d datetime.datetime.utcnow()"},{"line_number":51,"context_line":"        if date_set:"},{"line_number":52,"context_line":"            end_time \u003d current_time + datetime.timedelta(hours\u003d1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_09320b11","line":49,"range":{"start_line":49,"start_character":52,"end_line":49,"end_character":60},"in_reply_to":"1f1a1f67_c0b79386","updated":"2017-07-28 10:42:48.000000000","message":"I deleted it.","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"8b65fc5119243b840005eb1a4a558e5b310107a3","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        self.assertTrue(host[\u0027host\u0027] in freepool[\u0027hosts\u0027])"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        # try creating a new lease with a missing parameter"},{"line_number":151,"context_line":"        body \u003d self.get_lease_body_missing_param(\u0027scenario-1-missing-param\u0027,"},{"line_number":152,"context_line":"                                                 host[\u0027host\u0027], date_set\u003d\u0027TRUE\u0027)"},{"line_number":153,"context_line":"        self.assertRaises(exceptions.BadRequest,"},{"line_number":154,"context_line":"                          self.reservation_client.create_lease, body)"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_c0cb13a3","line":152,"range":{"start_line":151,"start_character":15,"end_line":152,"end_character":79},"updated":"2017-07-13 06:35:23.000000000","message":"This method doesn\u0027t have date_set param.","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"3a895fd62e5eb9cafa5755375181d9335f617d2a","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        self.assertTrue(host[\u0027host\u0027] in freepool[\u0027hosts\u0027])"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        # try creating a new lease with a missing parameter"},{"line_number":151,"context_line":"        body \u003d self.get_lease_body_missing_param(\u0027scenario-1-missing-param\u0027,"},{"line_number":152,"context_line":"                                                 host[\u0027host\u0027], date_set\u003d\u0027TRUE\u0027)"},{"line_number":153,"context_line":"        self.assertRaises(exceptions.BadRequest,"},{"line_number":154,"context_line":"                          self.reservation_client.create_lease, body)"},{"line_number":155,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_e93467fd","line":152,"range":{"start_line":151,"start_character":15,"end_line":152,"end_character":79},"in_reply_to":"1f1a1f67_c0cb13a3","updated":"2017-07-28 10:42:48.000000000","message":"Done","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"8b65fc5119243b840005eb1a4a558e5b310107a3","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":200,"context_line":"    def test_lease_expiration(self):"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        host \u003d self.fetch_one_compute_host()"},{"line_number":203,"context_line":"        self.reservation_client.create_host({\u0027name\u0027: host[\u0027host\u0027]})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        # check the host is in freepool"},{"line_number":206,"context_line":"        freepool \u003d self.fetch_aggregate_by_name(\u0027freepool\u0027)"},{"line_number":207,"context_line":"        self.assertTrue(host[\u0027host\u0027] in freepool[\u0027hosts\u0027])"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        # create new lease and start reservation immediatly"},{"line_number":210,"context_line":"        body \u003d self.get_lease_body(\u0027scenario-2\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_8024fbc7","line":207,"range":{"start_line":202,"start_character":0,"end_line":207,"end_character":58},"updated":"2017-07-13 06:35:23.000000000","message":"Tempest works concurrently but the number of compute hots for the gate job is one. so if the host is already registered, it doesn\u0027t need to add it again.","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"3a895fd62e5eb9cafa5755375181d9335f617d2a","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":200,"context_line":"    def test_lease_expiration(self):"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"        host \u003d self.fetch_one_compute_host()"},{"line_number":203,"context_line":"        self.reservation_client.create_host({\u0027name\u0027: host[\u0027host\u0027]})"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        # check the host is in freepool"},{"line_number":206,"context_line":"        freepool \u003d self.fetch_aggregate_by_name(\u0027freepool\u0027)"},{"line_number":207,"context_line":"        self.assertTrue(host[\u0027host\u0027] in freepool[\u0027hosts\u0027])"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        # create new lease and start reservation immediatly"},{"line_number":210,"context_line":"        body \u003d self.get_lease_body(\u0027scenario-2\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff346bd7_e91d8773","line":207,"range":{"start_line":202,"start_character":0,"end_line":207,"end_character":58},"in_reply_to":"1f1a1f67_8024fbc7","updated":"2017-07-28 10:42:48.000000000","message":"I deleted it.","commit_id":"cc60cbc13af7064c4d81e2e4ea0f770b24e15394"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"206c1c611ca2d2f12d35e11ef6662379b4c35346","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":219,"context_line":"    def test_lease_expiration(self):"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        host \u003d self.fetch_one_compute_host()"},{"line_number":222,"context_line":"        hosts \u003d self.reservation_client.list_host()[\u0027hosts\u0027]"},{"line_number":223,"context_line":"        try:"},{"line_number":224,"context_line":"            next(iter(filter("},{"line_number":225,"context_line":"                lambda h: h[\u0027hypervisor_hostname\u0027] \u003d\u003d host[\u0027host\u0027], hosts)))"},{"line_number":226,"context_line":"        except StopIteration:"},{"line_number":227,"context_line":"            self.reservation_client.create_host({\u0027name\u0027: host[\u0027host\u0027]})"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        # create new lease and start reservation immediately"},{"line_number":230,"context_line":"        body \u003d self.get_expiration_lease_body(\u0027scenario-2-expiration\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f436f4f_d383bf55","line":227,"range":{"start_line":221,"start_character":0,"end_line":227,"end_character":71},"updated":"2017-08-21 08:14:45.000000000","message":"Shouldn\u0027t this condition be also checked at the beginning of test_host_reseration()? Or how about adding a function like _add_host_once() which would take an action only if the host doesn\u0027t exists yet and calling it from each scenarios? Please see related discussion at Blazar team meeting [1]. thanks.\n\n[1] http://eavesdrop.openstack.org/irclogs/%23openstack-blazar/%23openstack-blazar.2017-08-03.log.html#t2017-08-03T09:25:41","commit_id":"9bf011db7d20d1de767ccdad2332b35dd9156fd2"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"a55982de303cf6bcd80912655e083fcfe290ed52","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":219,"context_line":"    def test_lease_expiration(self):"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        host \u003d self.fetch_one_compute_host()"},{"line_number":222,"context_line":"        hosts \u003d self.reservation_client.list_host()[\u0027hosts\u0027]"},{"line_number":223,"context_line":"        try:"},{"line_number":224,"context_line":"            next(iter(filter("},{"line_number":225,"context_line":"                lambda h: h[\u0027hypervisor_hostname\u0027] \u003d\u003d host[\u0027host\u0027], hosts)))"},{"line_number":226,"context_line":"        except StopIteration:"},{"line_number":227,"context_line":"            self.reservation_client.create_host({\u0027name\u0027: host[\u0027host\u0027]})"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        # create new lease and start reservation immediately"},{"line_number":230,"context_line":"        body \u003d self.get_expiration_lease_body(\u0027scenario-2-expiration\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7f287b81_2e7d476e","line":227,"range":{"start_line":221,"start_character":0,"end_line":227,"end_character":71},"in_reply_to":"9f436f4f_d383bf55","updated":"2017-08-22 07:49:12.000000000","message":"Done","commit_id":"9bf011db7d20d1de767ccdad2332b35dd9156fd2"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"94a90546351e997fa25c88bc8ee915a3fe7c555c","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        self.wait_until_aggregated(reservation_id, host[\u0027host\u0027])"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        # Wait until the lease expiration"},{"line_number":244,"context_line":"        time.sleep(60)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        # create an instance without reservation id, which is expected to"},{"line_number":247,"context_line":"        # succeed, because it can use the resource"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f287b81_dc2d4447","line":244,"range":{"start_line":244,"start_character":19,"end_line":244,"end_character":21},"updated":"2017-08-23 01:56:21.000000000","message":"Blazar can have about 10 sec delay. So setting this parameter 70 sec or more (I think 75 sec is enough) is safer.","commit_id":"cfc8109e6092500d6fd8f59047671a0131cb991a"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"cc23cdf4d5edbf7d5383643c5658977c4bfeaf67","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        # create an instance without reservation id, which is expected to"},{"line_number":247,"context_line":"        # succeed, because it can use the resource"},{"line_number":248,"context_line":"        freepool \u003d self.fetch_aggregate_by_name(\u0027freepool\u0027)"},{"line_number":249,"context_line":"        self.aggr_client.remove_host(freepool[\u0027id\u0027],"},{"line_number":250,"context_line":"                                     host\u003dhost[\u0027host\u0027])"},{"line_number":251,"context_line":"        create_kwargs \u003d {"},{"line_number":252,"context_line":"            \u0027image_id\u0027: CONF.compute.image_ref,"},{"line_number":253,"context_line":"            \u0027flavor\u0027: CONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f287b81_a21a9b13","line":250,"range":{"start_line":248,"start_character":0,"end_line":250,"end_character":55},"updated":"2017-08-30 02:54:51.000000000","message":"It causes inconsistency of Blazar DB. You should use the reservation_client.delete_host() to return the host from the freepool to a general pool.","commit_id":"e02374b2948c57d60e2321f2412e17e572f3ed31"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"6475ad78c7f59d17c5cf3a9da0f6c1b6b53376b5","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        # create an instance without reservation id, which is expected to"},{"line_number":247,"context_line":"        # succeed, because it can use the resource"},{"line_number":248,"context_line":"        freepool \u003d self.fetch_aggregate_by_name(\u0027freepool\u0027)"},{"line_number":249,"context_line":"        self.aggr_client.remove_host(freepool[\u0027id\u0027],"},{"line_number":250,"context_line":"                                     host\u003dhost[\u0027host\u0027])"},{"line_number":251,"context_line":"        create_kwargs \u003d {"},{"line_number":252,"context_line":"            \u0027image_id\u0027: CONF.compute.image_ref,"},{"line_number":253,"context_line":"            \u0027flavor\u0027: CONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f287b81_becab39d","line":250,"range":{"start_line":248,"start_character":0,"end_line":250,"end_character":55},"in_reply_to":"7f287b81_42e3f7d9","updated":"2017-08-30 09:39:06.000000000","message":"Done","commit_id":"e02374b2948c57d60e2321f2412e17e572f3ed31"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"937db0cd180dbf4caa0dc2559e65390e83d0faf5","unresolved":false,"context_lines":[{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        # create an instance without reservation id, which is expected to"},{"line_number":247,"context_line":"        # succeed, because it can use the resource"},{"line_number":248,"context_line":"        freepool \u003d self.fetch_aggregate_by_name(\u0027freepool\u0027)"},{"line_number":249,"context_line":"        self.aggr_client.remove_host(freepool[\u0027id\u0027],"},{"line_number":250,"context_line":"                                     host\u003dhost[\u0027host\u0027])"},{"line_number":251,"context_line":"        create_kwargs \u003d {"},{"line_number":252,"context_line":"            \u0027image_id\u0027: CONF.compute.image_ref,"},{"line_number":253,"context_line":"            \u0027flavor\u0027: CONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7f287b81_42e3f7d9","line":250,"range":{"start_line":248,"start_character":0,"end_line":250,"end_character":55},"in_reply_to":"7f287b81_a21a9b13","updated":"2017-08-30 03:06:48.000000000","message":"I think the host should not be necessarily returned from the freepool to a general pool. We can check if the lease has been correctly terminated by checking if the leased host has been correctly returned from the reservation aggregate to the freepool.","commit_id":"e02374b2948c57d60e2321f2412e17e572f3ed31"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"2be83c60050fe0cba07139bcc72261779d0c594a","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        # check host added to the reservation"},{"line_number":240,"context_line":"        reservation_id \u003d next(iter(lease[\u0027reservations\u0027]))[\u0027id\u0027]"},{"line_number":241,"context_line":"        self.wait_until_aggregated(reservation_id, host[\u0027host\u0027])"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        # Wait until the lease expiration"},{"line_number":244,"context_line":"        time.sleep(75)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7f287b81_bda13698","line":242,"updated":"2017-09-04 09:08:35.000000000","message":"This test case checks if the user resources related to the lease are deleted at end of the lease, right? If so, the test should create at least one instance here.  Then this checks the instance are removed after L244.","commit_id":"1471b73c89434271d467d6dfcb4c665500e4c24c"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"6d74624e297c4ad49120905e7e4f1f5398839c1e","unresolved":false,"context_lines":[{"line_number":239,"context_line":"        # check host added to the reservation"},{"line_number":240,"context_line":"        reservation_id \u003d next(iter(lease[\u0027reservations\u0027]))[\u0027id\u0027]"},{"line_number":241,"context_line":"        self.wait_until_aggregated(reservation_id, host[\u0027host\u0027])"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        # Wait until the lease expiration"},{"line_number":244,"context_line":"        time.sleep(75)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7f287b81_8f6a6a17","line":242,"in_reply_to":"7f287b81_bda13698","updated":"2017-09-12 07:33:54.000000000","message":"Done","commit_id":"1471b73c89434271d467d6dfcb4c665500e4c24c"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"2be83c60050fe0cba07139bcc72261779d0c594a","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        time.sleep(75)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        # check if the lease has been correctly terminated"},{"line_number":247,"context_line":"        self.assertRaises(exceptions.NotFound,"},{"line_number":248,"context_line":"                          self.reservation_client.get_lease, reservation_id)"},{"line_number":249,"context_line":"        freepool \u003d self.fetch_aggregate_by_name(\u0027freepool\u0027)"},{"line_number":250,"context_line":"        self.assertTrue(host[\u0027host\u0027] in freepool[\u0027hosts\u0027])"},{"line_number":251,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7f287b81_9dc79a46","line":248,"range":{"start_line":247,"start_character":0,"end_line":248,"end_character":75},"updated":"2017-09-04 09:08:35.000000000","message":"What\u0027s the assert statement? get_lease API with reservation_id always returns NotFound.","commit_id":"1471b73c89434271d467d6dfcb4c665500e4c24c"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"6d74624e297c4ad49120905e7e4f1f5398839c1e","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        time.sleep(75)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        # check if the lease has been correctly terminated"},{"line_number":247,"context_line":"        self.assertRaises(exceptions.NotFound,"},{"line_number":248,"context_line":"                          self.reservation_client.get_lease, reservation_id)"},{"line_number":249,"context_line":"        freepool \u003d self.fetch_aggregate_by_name(\u0027freepool\u0027)"},{"line_number":250,"context_line":"        self.assertTrue(host[\u0027host\u0027] in freepool[\u0027hosts\u0027])"},{"line_number":251,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7f287b81_af6d2633","line":248,"range":{"start_line":247,"start_character":0,"end_line":248,"end_character":75},"in_reply_to":"7f287b81_9dc79a46","updated":"2017-09-12 07:33:54.000000000","message":"I deleted id.","commit_id":"1471b73c89434271d467d6dfcb4c665500e4c24c"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"ee2e849d950716132137fcb0b2f66786716143b4","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        time.sleep(75)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"        # check if the lease has been correctly terminated"},{"line_number":247,"context_line":"        self.assertRaises(exceptions.NotFound,"},{"line_number":248,"context_line":"                          self.reservation_client.get_lease, reservation_id)"},{"line_number":249,"context_line":"        freepool \u003d self.fetch_aggregate_by_name(\u0027freepool\u0027)"},{"line_number":250,"context_line":"        self.assertTrue(host[\u0027host\u0027] in freepool[\u0027hosts\u0027])"},{"line_number":251,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f2577a7_0cbd7dd7","line":248,"range":{"start_line":247,"start_character":0,"end_line":248,"end_character":75},"in_reply_to":"7f287b81_af6d2633","updated":"2017-09-14 01:45:00.000000000","message":"typo: id -\u003e it","commit_id":"1471b73c89434271d467d6dfcb4c665500e4c24c"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"db483e12e75019c2c5811da9b560540515ed4901","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return body"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def get_expiration_lease_body(self, lease_name, host_name):"},{"line_number":115,"context_line":"        current_time \u003d datetime.datetime.utcnow()"},{"line_number":116,"context_line":"        end_time \u003d current_time + datetime.timedelta(minutes\u003d1)"},{"line_number":117,"context_line":"        body \u003d {"},{"line_number":118,"context_line":"            \"start_date\": current_time.strftime(\u0027%Y-%m-%d %H:%M\u0027),"},{"line_number":119,"context_line":"            \"end_date\": end_time.strftime(\u0027%Y-%m-%d %H:%M\u0027),"},{"line_number":120,"context_line":"            \"name\": lease_name,"},{"line_number":121,"context_line":"            \"events\": [],"},{"line_number":122,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f2577a7_f55ab080","line":119,"range":{"start_line":115,"start_character":0,"end_line":119,"end_character":60},"updated":"2017-09-18 10:58:48.000000000","message":"Because of the closeness of start_date and end_date and of the truncating of seconds by Blazar, there is a potential problem here:\n\n- get_expiration_lease_body() starts running at 10:30:55\n- current_time gets assigned 10:30:55\n- end_time gets assigned 10:31:55\n- the time part of start_date is set to 10:30\n- the time part of end_date is set to 10:31\n- once submitted, the lease will start and end quickly, potentially not leaving enough time for your instance to be launched","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"c988011498105382bdd2354e60fd23ecad22cda2","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return body"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def get_expiration_lease_body(self, lease_name, host_name):"},{"line_number":115,"context_line":"        current_time \u003d datetime.datetime.utcnow()"},{"line_number":116,"context_line":"        end_time \u003d current_time + datetime.timedelta(minutes\u003d1)"},{"line_number":117,"context_line":"        body \u003d {"},{"line_number":118,"context_line":"            \"start_date\": current_time.strftime(\u0027%Y-%m-%d %H:%M\u0027),"},{"line_number":119,"context_line":"            \"end_date\": end_time.strftime(\u0027%Y-%m-%d %H:%M\u0027),"},{"line_number":120,"context_line":"            \"name\": lease_name,"},{"line_number":121,"context_line":"            \"events\": [],"},{"line_number":122,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f5c4f37_f384bbb3","line":119,"range":{"start_line":115,"start_character":0,"end_line":119,"end_character":60},"in_reply_to":"5f2577a7_f55ab080","updated":"2017-09-22 05:51:55.000000000","message":"I changed the end_time at +5 minutes.","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"db483e12e75019c2c5811da9b560540515ed4901","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                          \u0027%s\"]\u0027 % host_name),"},{"line_number":127,"context_line":"                \"max\": 1,"},{"line_number":128,"context_line":"                \"min\": 1,"},{"line_number":129,"context_line":"                \"resource_type\": \u0027physical:host\u0027,"},{"line_number":130,"context_line":"                \"resource_properties\": \u0027\u0027"},{"line_number":131,"context_line":"                }"},{"line_number":132,"context_line":"            ]"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f2577a7_95012c3b","line":130,"range":{"start_line":129,"start_character":0,"end_line":130,"end_character":41},"updated":"2017-09-18 10:58:48.000000000","message":"Try to use the same style of quotes in the same dict.","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"c988011498105382bdd2354e60fd23ecad22cda2","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                          \u0027%s\"]\u0027 % host_name),"},{"line_number":127,"context_line":"                \"max\": 1,"},{"line_number":128,"context_line":"                \"min\": 1,"},{"line_number":129,"context_line":"                \"resource_type\": \u0027physical:host\u0027,"},{"line_number":130,"context_line":"                \"resource_properties\": \u0027\u0027"},{"line_number":131,"context_line":"                }"},{"line_number":132,"context_line":"            ]"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9f5c4f37_557da76c","line":130,"range":{"start_line":129,"start_character":0,"end_line":130,"end_character":41},"in_reply_to":"5f2577a7_95012c3b","updated":"2017-09-22 05:51:55.000000000","message":"Done","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"db483e12e75019c2c5811da9b560540515ed4901","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":229,"context_line":"    def test_lease_expiration(self):"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Create the host if it doesn\u0027t exists"},{"line_number":232,"context_line":"        host \u003d self._add_host_once()"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        # create new lease and start reservation immediately"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f2577a7_f5e8707c","line":231,"range":{"start_line":231,"start_character":40,"end_line":231,"end_character":46},"updated":"2017-09-18 10:58:48.000000000","message":"s/exists/exist/","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"c988011498105382bdd2354e60fd23ecad22cda2","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    @decorators.attr(type\u003d\u0027smoke\u0027)"},{"line_number":229,"context_line":"    def test_lease_expiration(self):"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"        # Create the host if it doesn\u0027t exists"},{"line_number":232,"context_line":"        host \u003d self._add_host_once()"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        # create new lease and start reservation immediately"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f5c4f37_f0cf1655","line":231,"range":{"start_line":231,"start_character":40,"end_line":231,"end_character":46},"in_reply_to":"5f2577a7_f5e8707c","updated":"2017-09-22 05:51:55.000000000","message":"Done","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"db483e12e75019c2c5811da9b560540515ed4901","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        create_kwargs \u003d {"},{"line_number":244,"context_line":"            \u0027scheduler_hints\u0027: {"},{"line_number":245,"context_line":"                \"reservation\": reservation_id,"},{"line_number":246,"context_line":"                },"},{"line_number":247,"context_line":"            \u0027image_id\u0027: CONF.compute.image_ref,"},{"line_number":248,"context_line":"            \u0027flavor\u0027: CONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f2577a7_95536c6b","line":245,"range":{"start_line":245,"start_character":16,"end_line":245,"end_character":29},"updated":"2017-09-18 10:58:48.000000000","message":"Use single quotes for consistency with other keys","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"c988011498105382bdd2354e60fd23ecad22cda2","unresolved":false,"context_lines":[{"line_number":242,"context_line":""},{"line_number":243,"context_line":"        create_kwargs \u003d {"},{"line_number":244,"context_line":"            \u0027scheduler_hints\u0027: {"},{"line_number":245,"context_line":"                \"reservation\": reservation_id,"},{"line_number":246,"context_line":"                },"},{"line_number":247,"context_line":"            \u0027image_id\u0027: CONF.compute.image_ref,"},{"line_number":248,"context_line":"            \u0027flavor\u0027: CONF.compute.flavor_ref,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f5c4f37_10398a40","line":245,"range":{"start_line":245,"start_character":16,"end_line":245,"end_character":29},"in_reply_to":"5f2577a7_95536c6b","updated":"2017-09-22 05:51:55.000000000","message":"Done","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"db483e12e75019c2c5811da9b560540515ed4901","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        waiters.wait_for_server_status(self.os_admin.servers_client,"},{"line_number":254,"context_line":"                                       server[\u0027id\u0027], \u0027ACTIVE\u0027)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        # Wait until the lease expiration"},{"line_number":257,"context_line":"        time.sleep(75)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":260,"context_line":"        # the instance are removed"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f2577a7_95d80cef","line":257,"range":{"start_line":256,"start_character":0,"end_line":257,"end_character":22},"updated":"2017-09-18 10:58:48.000000000","message":"Because of the time taken for launching the server, you may not have to wait 75 seconds. You should instead wait until 15 seconds after the end date. This could be a helper function too.","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"c988011498105382bdd2354e60fd23ecad22cda2","unresolved":false,"context_lines":[{"line_number":253,"context_line":"        waiters.wait_for_server_status(self.os_admin.servers_client,"},{"line_number":254,"context_line":"                                       server[\u0027id\u0027], \u0027ACTIVE\u0027)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"        # Wait until the lease expiration"},{"line_number":257,"context_line":"        time.sleep(75)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":260,"context_line":"        # the instance are removed"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f5c4f37_5a34b44a","line":257,"range":{"start_line":256,"start_character":0,"end_line":257,"end_character":22},"in_reply_to":"5f2577a7_95d80cef","updated":"2017-09-22 05:51:55.000000000","message":"I fixed to wait until the end_time + 15 seconds to confirm that the instance was deleted.","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"db483e12e75019c2c5811da9b560540515ed4901","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        time.sleep(75)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":260,"context_line":"        # the instance are removed"},{"line_number":261,"context_line":"        self.assertRaises(exceptions.NotFound,"},{"line_number":262,"context_line":"                          self.os_admin.servers_client.show_server,"},{"line_number":263,"context_line":"                          server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f2577a7_75e360a5","line":260,"range":{"start_line":260,"start_character":23,"end_line":260,"end_character":26},"updated":"2017-09-18 10:58:48.000000000","message":"s/are/is/","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"c988011498105382bdd2354e60fd23ecad22cda2","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        time.sleep(75)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":260,"context_line":"        # the instance are removed"},{"line_number":261,"context_line":"        self.assertRaises(exceptions.NotFound,"},{"line_number":262,"context_line":"                          self.os_admin.servers_client.show_server,"},{"line_number":263,"context_line":"                          server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f5c4f37_f0f8367d","line":260,"range":{"start_line":260,"start_character":23,"end_line":260,"end_character":26},"in_reply_to":"5f2577a7_75e360a5","updated":"2017-09-22 05:51:55.000000000","message":"Done","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"db483e12e75019c2c5811da9b560540515ed4901","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        # Wait until the lease expiration"},{"line_number":257,"context_line":"        time.sleep(75)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":260,"context_line":"        # the instance are removed"},{"line_number":261,"context_line":"        self.assertRaises(exceptions.NotFound,"},{"line_number":262,"context_line":"                          self.os_admin.servers_client.show_server,"},{"line_number":263,"context_line":"                          server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f2577a7_d5b9f478","line":263,"range":{"start_line":259,"start_character":0,"end_line":263,"end_character":39},"updated":"2017-09-18 10:58:48.000000000","message":"There could be more checks done here to verify that the lease has been correctly terminated:\n\n- check that the host aggregate was deleted\n- check that the host is back in the free pool\n- check the reservation status","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"c988011498105382bdd2354e60fd23ecad22cda2","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        # Wait until the lease expiration"},{"line_number":257,"context_line":"        time.sleep(75)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":260,"context_line":"        # the instance are removed"},{"line_number":261,"context_line":"        self.assertRaises(exceptions.NotFound,"},{"line_number":262,"context_line":"                          self.os_admin.servers_client.show_server,"},{"line_number":263,"context_line":"                          server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f5c4f37_73668b54","line":263,"range":{"start_line":259,"start_character":0,"end_line":263,"end_character":39},"in_reply_to":"5f2577a7_d5b9f478","updated":"2017-09-22 05:51:55.000000000","message":"Done","commit_id":"c437cd55644da6cf8693487e699bcb4bd9c04da7"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"24dd1c168459a5f051efebfa181207e4523728b2","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                                       server[\u0027id\u0027], \u0027ACTIVE\u0027)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        # wait until the lease expiration"},{"line_number":262,"context_line":"        while True:"},{"line_number":263,"context_line":"            current_time \u003d datetime.datetime.utcnow()"},{"line_number":264,"context_line":"            if dateutil.parser.parse(lease[\u0027end_date\u0027])\\"},{"line_number":265,"context_line":"               + datetime.timedelta(seconds\u003d15) \u003c\u003d current_time:"},{"line_number":266,"context_line":"                break"},{"line_number":267,"context_line":"            time.sleep(self.WAIT_TIME)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":270,"context_line":"        # the instance is removed"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_48598358","line":267,"range":{"start_line":262,"start_character":1,"end_line":267,"end_character":38},"updated":"2017-10-19 04:38:52.000000000","message":"You can use wait_for_lease_end method[1] instead of the while loop.\n\n1. https://github.com/openstack/blazar/blob/master/contrib/tempest/tempest/scenario/resource_reservation_scenario.py#L71","commit_id":"931d9c6884888046bb9b730dd633ce70729d6c2f"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"f4316fc44a343e69b5095b5c51b03d4c4ab775d4","unresolved":false,"context_lines":[{"line_number":259,"context_line":"                                       server[\u0027id\u0027], \u0027ACTIVE\u0027)"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        # wait until the lease expiration"},{"line_number":262,"context_line":"        while True:"},{"line_number":263,"context_line":"            current_time \u003d datetime.datetime.utcnow()"},{"line_number":264,"context_line":"            if dateutil.parser.parse(lease[\u0027end_date\u0027])\\"},{"line_number":265,"context_line":"               + datetime.timedelta(seconds\u003d15) \u003c\u003d current_time:"},{"line_number":266,"context_line":"                break"},{"line_number":267,"context_line":"            time.sleep(self.WAIT_TIME)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":270,"context_line":"        # the instance is removed"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f4b6375_e649338b","line":267,"range":{"start_line":262,"start_character":1,"end_line":267,"end_character":38},"in_reply_to":"3f4b6375_48598358","updated":"2017-10-24 08:13:15.000000000","message":"I fixed it. In order to wait until end_data, I needed to fix wait_for_lease_end.","commit_id":"931d9c6884888046bb9b730dd633ce70729d6c2f"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"5d74d397b7306280917aacb1e601cc595bf955c2","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        reservation_id \u003d next(iter(lease[\u0027reservations\u0027]))[\u0027id\u0027]"},{"line_number":242,"context_line":"        self.wait_until_aggregated(reservation_id, host[\u0027host\u0027])"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        # check the host aggregate for blazar"},{"line_number":245,"context_line":"        self.fetch_aggregate_by_name(reservation_id)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        create_kwargs \u003d {"},{"line_number":248,"context_line":"            \u0027scheduler_hints\u0027: {"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_fe3e61d8","line":245,"range":{"start_line":244,"start_character":0,"end_line":245,"end_character":52},"updated":"2017-11-14 18:29:45.000000000","message":"This code is not useful because it is already called by self.wait_until_aggregated()","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"d97f7cd376df577032b7cc1919cb9f430fab7225","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        reservation_id \u003d next(iter(lease[\u0027reservations\u0027]))[\u0027id\u0027]"},{"line_number":242,"context_line":"        self.wait_until_aggregated(reservation_id, host[\u0027host\u0027])"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        # check the host aggregate for blazar"},{"line_number":245,"context_line":"        self.fetch_aggregate_by_name(reservation_id)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        create_kwargs \u003d {"},{"line_number":248,"context_line":"            \u0027scheduler_hints\u0027: {"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_04389d3a","line":245,"range":{"start_line":244,"start_character":0,"end_line":245,"end_character":52},"in_reply_to":"1f485f77_fe3e61d8","updated":"2017-11-17 06:12:54.000000000","message":"I deleted it.","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"5d74d397b7306280917aacb1e601cc595bf955c2","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        server \u003d self.create_server(clients\u003dself.os_admin,"},{"line_number":255,"context_line":"                                    wait_until\u003dNone,"},{"line_number":256,"context_line":"                                    **create_kwargs)"},{"line_number":257,"context_line":"        waiters.wait_for_server_status(self.os_admin.servers_client,"},{"line_number":258,"context_line":"                                       server[\u0027id\u0027], \u0027ACTIVE\u0027)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        # wait for lease end"},{"line_number":261,"context_line":"        CONF.resource_reservation.lease_end_timeout \u003d 360"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_3e1e3970","line":258,"range":{"start_line":257,"start_character":0,"end_line":258,"end_character":62},"updated":"2017-11-14 18:29:45.000000000","message":"You should be able to remove this code if you remove the wait_until parameter from create_server, since wait_until\u003dACTIVE is the default.","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"d97f7cd376df577032b7cc1919cb9f430fab7225","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        server \u003d self.create_server(clients\u003dself.os_admin,"},{"line_number":255,"context_line":"                                    wait_until\u003dNone,"},{"line_number":256,"context_line":"                                    **create_kwargs)"},{"line_number":257,"context_line":"        waiters.wait_for_server_status(self.os_admin.servers_client,"},{"line_number":258,"context_line":"                                       server[\u0027id\u0027], \u0027ACTIVE\u0027)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        # wait for lease end"},{"line_number":261,"context_line":"        CONF.resource_reservation.lease_end_timeout \u003d 360"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_441b35cf","line":258,"range":{"start_line":257,"start_character":0,"end_line":258,"end_character":62},"in_reply_to":"1f485f77_3e1e3970","updated":"2017-11-17 06:12:54.000000000","message":"Done","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"5d74d397b7306280917aacb1e601cc595bf955c2","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        waiters.wait_for_server_status(self.os_admin.servers_client,"},{"line_number":258,"context_line":"                                       server[\u0027id\u0027], \u0027ACTIVE\u0027)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        # wait for lease end"},{"line_number":261,"context_line":"        CONF.resource_reservation.lease_end_timeout \u003d 360"},{"line_number":262,"context_line":"        self.wait_for_lease_end(lease_id)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":265,"context_line":"        # the instance is removed"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_492ca198","line":262,"range":{"start_line":260,"start_character":0,"end_line":262,"end_character":41},"updated":"2017-11-14 18:29:45.000000000","message":"This, combined with the 5 minutes lease duration, means that our legacy-blazar-devstack-dsvm gate job takes a lot longer. It would be best to miminize how long this test takes.","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"d97f7cd376df577032b7cc1919cb9f430fab7225","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        waiters.wait_for_server_status(self.os_admin.servers_client,"},{"line_number":258,"context_line":"                                       server[\u0027id\u0027], \u0027ACTIVE\u0027)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        # wait for lease end"},{"line_number":261,"context_line":"        CONF.resource_reservation.lease_end_timeout \u003d 360"},{"line_number":262,"context_line":"        self.wait_for_lease_end(lease_id)"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        # check if the lease has been correctly terminated and"},{"line_number":265,"context_line":"        # the instance is removed"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_a752ebdc","line":262,"range":{"start_line":260,"start_character":0,"end_line":262,"end_character":41},"in_reply_to":"1f485f77_492ca198","updated":"2017-11-17 06:12:54.000000000","message":"I changed a lease end time to 90 seconds.","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"5d74d397b7306280917aacb1e601cc595bf955c2","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # check the reservation status"},{"line_number":279,"context_line":"        lease \u003d self.reservation_client.get_lease(lease_id)[\u0027lease\u0027]"},{"line_number":280,"context_line":"        self.assertTrue(\u0027deleted\u0027in"},{"line_number":281,"context_line":"                        next(iter(lease[\u0027reservations\u0027]))[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_694e3d70","line":280,"range":{"start_line":280,"start_character":24,"end_line":280,"end_character":35},"updated":"2017-11-14 18:29:45.000000000","message":"Please add a space between \u0027deleted\u0027 and in.","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"},{"author":{"_account_id":11704,"name":"Maho Koshiya","email":"koshiya.maho@po.ntt-tx.co.jp","username":"koshi-m"},"change_message_id":"d97f7cd376df577032b7cc1919cb9f430fab7225","unresolved":false,"context_lines":[{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        # check the reservation status"},{"line_number":279,"context_line":"        lease \u003d self.reservation_client.get_lease(lease_id)[\u0027lease\u0027]"},{"line_number":280,"context_line":"        self.assertTrue(\u0027deleted\u0027in"},{"line_number":281,"context_line":"                        next(iter(lease[\u0027reservations\u0027]))[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"1f485f77_6464f14a","line":280,"range":{"start_line":280,"start_character":24,"end_line":280,"end_character":35},"in_reply_to":"1f485f77_694e3d70","updated":"2017-11-17 06:12:54.000000000","message":"Done","commit_id":"d25041493ab5b571fa1eef254d0dbbfaf3d686a2"}]}
