)]}'
{"blazar/plugins/instances/instance_plugin.py":[{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"47839c69a4dc18f80fb53fc91a0b9097a9edcadc","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        \"\"\"Updates reserved resources in Nova."},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        This method updates reserved resources in Compute service. If the"},{"line_number":234,"context_line":"        reservation is in actice status, it adds new allocated hosts into"},{"line_number":235,"context_line":"        a reserved aggregate. If the reservation is not started yet, it"},{"line_number":236,"context_line":"        updates a reserved flavor."},{"line_number":237,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_fb1ad0c9","line":234,"range":{"start_line":234,"start_character":26,"end_line":234,"end_character":32},"updated":"2017-10-24 03:20:04.000000000","message":"active","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"04309d3cf95982e66e3e28e88e9c656ab52d77d0","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        \"\"\"Updates reserved resources in Nova."},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        This method updates reserved resources in Compute service. If the"},{"line_number":234,"context_line":"        reservation is in actice status, it adds new allocated hosts into"},{"line_number":235,"context_line":"        a reserved aggregate. If the reservation is not started yet, it"},{"line_number":236,"context_line":"        updates a reserved flavor."},{"line_number":237,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_0a0d54a0","line":234,"range":{"start_line":234,"start_character":26,"end_line":234,"end_character":32},"in_reply_to":"3f4b6375_fb1ad0c9","updated":"2017-10-24 08:10:49.000000000","message":"Done","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"47839c69a4dc18f80fb53fc91a0b9097a9edcadc","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                    err_msg \u003d (\u0027Fail to add host %s to aggregate %s.\u0027"},{"line_number":253,"context_line":"                               % (host, reservation[\u0027aggregate_id\u0027]))"},{"line_number":254,"context_line":"                    raise mgr_exceptions.NovaClientError(err_msg)"},{"line_number":255,"context_line":"        else:"},{"line_number":256,"context_line":"            try:"},{"line_number":257,"context_line":"                self.nova.nova.flavors.delete(reservation[\u0027id\u0027])"},{"line_number":258,"context_line":"                self._create_flavor(reservation[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_9bdcfce4","line":255,"range":{"start_line":255,"start_character":8,"end_line":255,"end_character":12},"updated":"2017-10-24 03:20:04.000000000","message":"Shouldn\u0027t it be \u0027if reservation[\u0027status\u0027] \u003d\u003d \u0027pending\u0027? What if the status is \u0027error\u0027?","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"04309d3cf95982e66e3e28e88e9c656ab52d77d0","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                    err_msg \u003d (\u0027Fail to add host %s to aggregate %s.\u0027"},{"line_number":253,"context_line":"                               % (host, reservation[\u0027aggregate_id\u0027]))"},{"line_number":254,"context_line":"                    raise mgr_exceptions.NovaClientError(err_msg)"},{"line_number":255,"context_line":"        else:"},{"line_number":256,"context_line":"            try:"},{"line_number":257,"context_line":"                self.nova.nova.flavors.delete(reservation[\u0027id\u0027])"},{"line_number":258,"context_line":"                self._create_flavor(reservation[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_4a546c21","line":255,"range":{"start_line":255,"start_character":8,"end_line":255,"end_character":12},"in_reply_to":"3f4b6375_9bdcfce4","updated":"2017-10-24 08:10:49.000000000","message":"Ideally speaking, the update_reservation() doesn\u0027t need to care \u0027error\u0027 status because of the following reason. But blazar-manager doesn\u0027t handle reservation\u0027s status now, so I\u0027ll add a validation at beginning of update_reservation().\n\nAs you mentioned in state-machine blueprint, a reservation which is in \u0027error\u0027 status only can go \u0027deleted\u0027 status. The blazar-manager shouldn\u0027t accept a updating request to a reservation in \u0027error\u0027 status.","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"47839c69a4dc18f80fb53fc91a0b9097a9edcadc","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        elif len(kept_host_ids) \u003c new_values[\u0027amount\u0027]:"},{"line_number":340,"context_line":"            less \u003d new_values[\u0027amount\u0027] - len(kept_host_ids)"},{"line_number":341,"context_line":"            if less \u003e len(extra_host_ids):"},{"line_number":342,"context_line":"                raise mgr_exceptions.NotEnoughHostsAvailable()"},{"line_number":343,"context_line":"            for i in range(less):"},{"line_number":344,"context_line":"                added_host_ids.add(extra_host_ids.pop())"},{"line_number":345,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_9ed2aaff","line":342,"range":{"start_line":342,"start_character":37,"end_line":342,"end_character":60},"updated":"2017-10-24 03:20:04.000000000","message":"How about adding a new exception like NotEnoughResourcesAvailale() because this exception may be for the host plugin?","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"88215a689f50f078f5c20f1927b95a142dc0bc3f","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        elif len(kept_host_ids) \u003c new_values[\u0027amount\u0027]:"},{"line_number":340,"context_line":"            less \u003d new_values[\u0027amount\u0027] - len(kept_host_ids)"},{"line_number":341,"context_line":"            if less \u003e len(extra_host_ids):"},{"line_number":342,"context_line":"                raise mgr_exceptions.NotEnoughHostsAvailable()"},{"line_number":343,"context_line":"            for i in range(less):"},{"line_number":344,"context_line":"                added_host_ids.add(extra_host_ids.pop())"},{"line_number":345,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_71011838","line":342,"range":{"start_line":342,"start_character":37,"end_line":342,"end_character":60},"in_reply_to":"3f4b6375_05d9c57d","updated":"2017-10-26 05:38:23.000000000","message":"Make sense.","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"04309d3cf95982e66e3e28e88e9c656ab52d77d0","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        elif len(kept_host_ids) \u003c new_values[\u0027amount\u0027]:"},{"line_number":340,"context_line":"            less \u003d new_values[\u0027amount\u0027] - len(kept_host_ids)"},{"line_number":341,"context_line":"            if less \u003e len(extra_host_ids):"},{"line_number":342,"context_line":"                raise mgr_exceptions.NotEnoughHostsAvailable()"},{"line_number":343,"context_line":"            for i in range(less):"},{"line_number":344,"context_line":"                added_host_ids.add(extra_host_ids.pop())"},{"line_number":345,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_05d9c57d","line":342,"range":{"start_line":342,"start_character":37,"end_line":342,"end_character":60},"in_reply_to":"3f4b6375_9ed2aaff","updated":"2017-10-24 08:10:49.000000000","message":"The reason it fails to update the reservation is there\u0027re not enough hosts in blazar\u0027s hosts to accommodate the requested instances.  So the exception looks fine to me. How do you think?","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"47839c69a4dc18f80fb53fc91a0b9097a9edcadc","unresolved":false,"context_lines":[{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        reservation \u003d db_api.reservation_get(reservation_id)"},{"line_number":347,"context_line":"        if reservation[\u0027status\u0027] \u003d\u003d \u0027active\u0027 and len(removed_host_ids) \u003e 0:"},{"line_number":348,"context_line":"            raise mgr_exceptions.NotEnoughHostsAvailable()"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"        return {\u0027added\u0027: added_host_ids, \u0027removed\u0027: removed_host_ids}"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_3ed5f6e5","line":348,"range":{"start_line":348,"start_character":33,"end_line":348,"end_character":56},"updated":"2017-10-24 03:20:04.000000000","message":"ditto","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"04309d3cf95982e66e3e28e88e9c656ab52d77d0","unresolved":false,"context_lines":[{"line_number":345,"context_line":""},{"line_number":346,"context_line":"        reservation \u003d db_api.reservation_get(reservation_id)"},{"line_number":347,"context_line":"        if reservation[\u0027status\u0027] \u003d\u003d \u0027active\u0027 and len(removed_host_ids) \u003e 0:"},{"line_number":348,"context_line":"            raise mgr_exceptions.NotEnoughHostsAvailable()"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"        return {\u0027added\u0027: added_host_ids, \u0027removed\u0027: removed_host_ids}"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_a5c79196","line":348,"range":{"start_line":348,"start_character":33,"end_line":348,"end_character":56},"in_reply_to":"3f4b6375_3ed5f6e5","updated":"2017-10-24 08:10:49.000000000","message":"I changed it to CantUpdateParameter exception.\n\nOnce NotEnoughResourcesAvailavle has been implemented, both host_plugin and instance_plugin are updated at same time.","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"47839c69a4dc18f80fb53fc91a0b9097a9edcadc","unresolved":false,"context_lines":[{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        This method allows users to update an instance reservation under the"},{"line_number":369,"context_line":"        following conditions."},{"line_number":370,"context_line":"        - If an instance reservation doesn\u0027t start"},{"line_number":371,"context_line":"             - vcpus, memory_mb disk_gb and amount can be updateable unless"},{"line_number":372,"context_line":"               Blazar can accomodate the new request."},{"line_number":373,"context_line":"        - If an instance reservation has already started"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_3b8d08d3","line":370,"range":{"start_line":370,"start_character":37,"end_line":370,"end_character":50},"updated":"2017-10-24 03:20:04.000000000","message":"has not started yet?","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"04309d3cf95982e66e3e28e88e9c656ab52d77d0","unresolved":false,"context_lines":[{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        This method allows users to update an instance reservation under the"},{"line_number":369,"context_line":"        following conditions."},{"line_number":370,"context_line":"        - If an instance reservation doesn\u0027t start"},{"line_number":371,"context_line":"             - vcpus, memory_mb disk_gb and amount can be updateable unless"},{"line_number":372,"context_line":"               Blazar can accomodate the new request."},{"line_number":373,"context_line":"        - If an instance reservation has already started"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_a5e8b1e1","line":370,"range":{"start_line":370,"start_character":37,"end_line":370,"end_character":50},"in_reply_to":"3f4b6375_3b8d08d3","updated":"2017-10-24 08:10:49.000000000","message":"Done","commit_id":"90512e3dd5dcb5eeb2cab9c4101a56abca5359f5"},{"author":{"_account_id":13192,"name":"Souville","display_name":"Bertrand Souville","email":"souville@docomolab-euro.com","username":"bertys"},"change_message_id":"7150cb570dd46489012d56fd57424159428c6eef","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        reservation \u003d db_api.reservation_get(reservation_id)"},{"line_number":386,"context_line":"        lease \u003d db_api.lease_get(reservation[\u0027lease_id\u0027])"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        updatable \u003d [\u0027vcpus\u0027, \u0027memory_mb\u0027, \u0027disk_gb\u0027, \u0027affinity\u0027, \u0027amount\u0027]"},{"line_number":389,"context_line":"        if (not any([k in updatable for k in new_values.keys()])"},{"line_number":390,"context_line":"                and new_values[\u0027start_date\u0027] \u003e\u003d lease[\u0027start_date\u0027]"},{"line_number":391,"context_line":"                and new_values[\u0027end_date\u0027] \u003c\u003d lease[\u0027end_date\u0027]):"},{"line_number":392,"context_line":"            # no update because of just shortening the reservation time"},{"line_number":393,"context_line":"            return"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        if (reservation[\u0027status\u0027] \u003d\u003d \u0027active\u0027 and"},{"line_number":396,"context_line":"                any([k in updatable[:-1] for k in new_values.keys()])):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_c8b6b63e","line":393,"range":{"start_line":388,"start_character":8,"end_line":393,"end_character":18},"updated":"2017-10-27 13:05:42.000000000","message":"We shall check that either we update \u0027vcpus\u0027, \u0027memory_mb\u0027, \u0027disk_gb\u0027, (\u0027affinity\u0027), \u0027amount\u0027 for a specific reservation id\nOR\nwe update start_date/end_date for all reservations associated with the lease","commit_id":"0af6665f3bb924b37ce422b3c5211152e6e702d0"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"596d400e94628bb55018ab1da5021c94c131f967","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        reservation \u003d db_api.reservation_get(reservation_id)"},{"line_number":386,"context_line":"        lease \u003d db_api.lease_get(reservation[\u0027lease_id\u0027])"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        updatable \u003d [\u0027vcpus\u0027, \u0027memory_mb\u0027, \u0027disk_gb\u0027, \u0027affinity\u0027, \u0027amount\u0027]"},{"line_number":389,"context_line":"        if (not any([k in updatable for k in new_values.keys()])"},{"line_number":390,"context_line":"                and new_values[\u0027start_date\u0027] \u003e\u003d lease[\u0027start_date\u0027]"},{"line_number":391,"context_line":"                and new_values[\u0027end_date\u0027] \u003c\u003d lease[\u0027end_date\u0027]):"},{"line_number":392,"context_line":"            # no update because of just shortening the reservation time"},{"line_number":393,"context_line":"            return"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        if (reservation[\u0027status\u0027] \u003d\u003d \u0027active\u0027 and"},{"line_number":396,"context_line":"                any([k in updatable[:-1] for k in new_values.keys()])):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_d515e6e6","line":393,"range":{"start_line":388,"start_character":8,"end_line":393,"end_character":18},"in_reply_to":"3f4b6375_c8b6b63e","updated":"2017-10-31 07:52:55.000000000","message":"To be clarified, your suggestion is blazar-manager should check all reservations belonging to one lease have same logic before really updating each reservations?\n\nIf so,  I agree your idea. But it\u0027s good to implement it as another bug. This isn\u0027t a instance plugin specific issue.","commit_id":"0af6665f3bb924b37ce422b3c5211152e6e702d0"}],"blazar/tests/plugins/instances/test_instance_plugin.py":[{"author":{"_account_id":13192,"name":"Souville","display_name":"Bertrand Souville","email":"souville@docomolab-euro.com","username":"bertys"},"change_message_id":"7150cb570dd46489012d56fd57424159428c6eef","unresolved":false,"context_lines":[{"line_number":644,"context_line":"                                                      \u0027host\u0027 + str(i + 1),"},{"line_number":645,"context_line":"                                                      stay_in\u003dTrue)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_update_reservaiton(self):"},{"line_number":648,"context_line":"        plugin \u003d instance_plugin.VirtualInstancePlugin()"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        old_reservation \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_486e46c9","line":647,"range":{"start_line":647,"start_character":20,"end_line":647,"end_character":31},"updated":"2017-10-27 13:05:42.000000000","message":"reservation","commit_id":"0af6665f3bb924b37ce422b3c5211152e6e702d0"}]}
