)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"51716cee607a16607b71ecb661c154049834a885","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Change-Id: I1027e4d296a7cdc68b37169dbec556ea666a81a9"},{"line_number":31,"context_line":"Closes-Bug: #1552777"},{"line_number":32,"context_line":"Signed-off-by: Kam Nasim \u003ckam.nasim@windriver.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7aa08908_8758eafb","line":32,"updated":"2016-06-11 14:52:26.000000000","message":"FYI Openstack doesn\u0027t necessitate commits to have a signed-off-by, but you are free to do it.\n\nhttp://docs.openstack.org/infra/manual/developers.html#using-signed-off-by","commit_id":"7b7df57e87bd4daf2216cfe3e4fcfb3746597795"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2d24e650d485ab2322d30f0ed10972a27e2a25ff","unresolved":false,"context_lines":[{"line_number":5273,"context_line":"        self._test_confirm_resize(power_on\u003dFalse)"},{"line_number":5274,"context_line":""},{"line_number":5275,"context_line":"    def test_confirm_resize_from_active_swap_to_noswap(self):"},{"line_number":5276,"context_line":"        self._test_confirm_resize(power_on\u003dTrue, swap_size\u003d10)"},{"line_number":5277,"context_line":""},{"line_number":5278,"context_line":"    def test_confirm_resize_with_migration_context(self):"},{"line_number":5279,"context_line":"        numa_topology \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_a34a3424","line":5276,"updated":"2016-05-19 23:08:45.000000000","message":"I don\u0027t think this test is useful because it doesn\u0027t trigger the bug. You could remove it IMO.","commit_id":"773d85294414f3d17dcf7c0a021e8670bb21ac0f"}],"nova/tests/unit/virt/libvirt/test_blockinfo.py":[{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"f04d21ac679cde2a1a1c68f3b69aaa32206b9993","unresolved":false,"context_lines":[{"line_number":471,"context_line":"                     \u0027swap_size\u0027: 10},"},{"line_number":472,"context_line":"            }"},{"line_number":473,"context_line":""},{"line_number":474,"context_line":"        # NOTE (knasim-wrs): ensure that the swap size is also"},{"line_number":475,"context_line":"        # set in the instance flavor as this will now be checked"},{"line_number":476,"context_line":"        instance_ref[\u0027flavor\u0027][\u0027swap\u0027] \u003d block_device_info[\u0027swap\u0027][\u0027swap_size\u0027]"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_c748a88d","line":474,"updated":"2016-04-01 21:07:08.000000000","message":"again d/-wrs/","commit_id":"602989114f4e4ddc72fd3933427a6809dd612161"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fc3461077d050018ce419b69ebc23119e4b23202","unresolved":false,"context_lines":[{"line_number":473,"context_line":""},{"line_number":474,"context_line":"        # NOTE (knasim): ensure that the swap size is also"},{"line_number":475,"context_line":"        # set in the instance flavor as this will now be checked"},{"line_number":476,"context_line":"        instance_ref[\u0027flavor\u0027][\u0027swap\u0027] \u003d block_device_info[\u0027swap\u0027][\u0027swap_size\u0027]"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        mapping \u003d blockinfo.get_disk_mapping(\"kvm\", instance_ref,"},{"line_number":479,"context_line":"                                             \"virtio\", \"ide\","}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_9a570d02","line":476,"range":{"start_line":476,"start_character":8,"end_line":476,"end_character":38},"updated":"2016-04-15 21:44:49.000000000","message":"instance_ref.flavor.swap","commit_id":"773d85294414f3d17dcf7c0a021e8670bb21ac0f"},{"author":{"_account_id":21109,"name":"Kam Nasim","email":"kam.nasim@windriver.com","username":"knasim-wrs"},"change_message_id":"efd934096cfc5c05c469024c3f0784bc9fe65324","unresolved":false,"context_lines":[{"line_number":473,"context_line":""},{"line_number":474,"context_line":"        # NOTE (knasim): ensure that the swap size is also"},{"line_number":475,"context_line":"        # set in the instance flavor as this will now be checked"},{"line_number":476,"context_line":"        instance_ref[\u0027flavor\u0027][\u0027swap\u0027] \u003d block_device_info[\u0027swap\u0027][\u0027swap_size\u0027]"},{"line_number":477,"context_line":""},{"line_number":478,"context_line":"        mapping \u003d blockinfo.get_disk_mapping(\"kvm\", instance_ref,"},{"line_number":479,"context_line":"                                             \"virtio\", \"ide\","}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_846794e9","line":476,"range":{"start_line":476,"start_character":8,"end_line":476,"end_character":38},"in_reply_to":"1a122d0e_9a570d02","updated":"2016-05-03 16:36:03.000000000","message":"thanks will change","commit_id":"773d85294414f3d17dcf7c0a021e8670bb21ac0f"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fc3461077d050018ce419b69ebc23119e4b23202","unresolved":false,"context_lines":[{"line_number":635,"context_line":""},{"line_number":636,"context_line":"        # NOTE (knasim): ensure that the swap size is also"},{"line_number":637,"context_line":"        # set in the instance flavor as this will now be checked"},{"line_number":638,"context_line":"        instance_ref[\u0027flavor\u0027][\u0027swap\u0027] \u003d block_device_info[\u0027swap\u0027][\u0027swap_size\u0027]"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"        mapping \u003d blockinfo.get_disk_mapping(\"kvm\", instance_ref,"},{"line_number":641,"context_line":"                                             \"virtio\", \"ide\","}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_5a74559b","line":638,"range":{"start_line":638,"start_character":8,"end_line":638,"end_character":38},"updated":"2016-04-15 21:44:49.000000000","message":"instance_ref.flavor.swap","commit_id":"773d85294414f3d17dcf7c0a021e8670bb21ac0f"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fc3461077d050018ce419b69ebc23119e4b23202","unresolved":false,"context_lines":[{"line_number":687,"context_line":""},{"line_number":688,"context_line":"        # NOTE (knasim): ensure that the swap size is also"},{"line_number":689,"context_line":"        # set in the instance flavor as this will now be checked"},{"line_number":690,"context_line":"        instance_ref[\u0027flavor\u0027][\u0027swap\u0027] \u003d block_device_info[\u0027swap\u0027][\u0027swap_size\u0027]"},{"line_number":691,"context_line":""},{"line_number":692,"context_line":"        blockinfo.get_disk_mapping(\"kvm\", instance_ref,"},{"line_number":693,"context_line":"                                   \"virtio\", \"ide\","}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_3a799994","line":690,"range":{"start_line":690,"start_character":8,"end_line":690,"end_character":38},"updated":"2016-04-15 21:44:49.000000000","message":"instance_ref.flavor.swap","commit_id":"773d85294414f3d17dcf7c0a021e8670bb21ac0f"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fc3461077d050018ce419b69ebc23119e4b23202","unresolved":false,"context_lines":[{"line_number":5910,"context_line":"        instance_ref \u003d objects.Instance(**self.test_instance)"},{"line_number":5911,"context_line":"        # NOTE (knasim): Set minimal default swap size"},{"line_number":5912,"context_line":"        # in instance flavor"},{"line_number":5913,"context_line":"        instance_ref[\u0027flavor\u0027][\u0027swap\u0027] \u003d 1"},{"line_number":5914,"context_line":"        network_info \u003d _fake_network_info(self, 1)"},{"line_number":5915,"context_line":""},{"line_number":5916,"context_line":"        drv \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_1730f800","line":5913,"updated":"2016-04-15 21:44:49.000000000","message":"instance_ref is an object so we want to avoid the dict-like access and instead do:\n\n instance_ref.flavor.swap \u003d 1","commit_id":"773d85294414f3d17dcf7c0a021e8670bb21ac0f"},{"author":{"_account_id":21109,"name":"Kam Nasim","email":"kam.nasim@windriver.com","username":"knasim-wrs"},"change_message_id":"efd934096cfc5c05c469024c3f0784bc9fe65324","unresolved":false,"context_lines":[{"line_number":5910,"context_line":"        instance_ref \u003d objects.Instance(**self.test_instance)"},{"line_number":5911,"context_line":"        # NOTE (knasim): Set minimal default swap size"},{"line_number":5912,"context_line":"        # in instance flavor"},{"line_number":5913,"context_line":"        instance_ref[\u0027flavor\u0027][\u0027swap\u0027] \u003d 1"},{"line_number":5914,"context_line":"        network_info \u003d _fake_network_info(self, 1)"},{"line_number":5915,"context_line":""},{"line_number":5916,"context_line":"        drv \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_a4b3b04c","line":5913,"in_reply_to":"1a122d0e_1730f800","updated":"2016-05-03 16:36:03.000000000","message":"sure, will change.","commit_id":"773d85294414f3d17dcf7c0a021e8670bb21ac0f"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"fc3461077d050018ce419b69ebc23119e4b23202","unresolved":false,"context_lines":[{"line_number":12695,"context_line":""},{"line_number":12696,"context_line":"        # NOTE (knasim): ensure that the swap size is also"},{"line_number":12697,"context_line":"        # set in the instance flavor as this will now be checked"},{"line_number":12698,"context_line":"        instance[\u0027flavor\u0027][\u0027swap\u0027] \u003d 512"},{"line_number":12699,"context_line":""},{"line_number":12700,"context_line":"        block_device_mapping \u003d ["},{"line_number":12701,"context_line":"            objects.BlockDeviceMapping("}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_371d3474","line":12698,"updated":"2016-04-15 21:44:49.000000000","message":"Same comment","commit_id":"773d85294414f3d17dcf7c0a021e8670bb21ac0f"}],"nova/virt/libvirt/blockinfo.py":[{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"f04d21ac679cde2a1a1c68f3b69aaa32206b9993","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        update_bdm(eph, eph_info)"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"    swap \u003d driver.block_device_info_get_swap(block_device_info)"},{"line_number":576,"context_line":"    # NOTE (knasim-wrs): only map swap disk if supported in flavor"},{"line_number":577,"context_line":"    if instance.get_flavor()[\u0027swap\u0027] \u003e 0:"},{"line_number":578,"context_line":"        if swap and swap.get(\u0027swap_size\u0027, 0) \u003e 0:"},{"line_number":579,"context_line":"            swap_info \u003d get_info_from_bdm("}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_2cfeab38","line":576,"updated":"2016-04-01 21:07:08.000000000","message":"d/-wrs/","commit_id":"602989114f4e4ddc72fd3933427a6809dd612161"},{"author":{"_account_id":21109,"name":"Kam Nasim","email":"kam.nasim@windriver.com","username":"knasim-wrs"},"change_message_id":"751dd207cbf5ffd17cc1d6567db48a94247eb0c7","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        update_bdm(eph, eph_info)"},{"line_number":574,"context_line":""},{"line_number":575,"context_line":"    swap \u003d driver.block_device_info_get_swap(block_device_info)"},{"line_number":576,"context_line":"    # NOTE (knasim-wrs): only map swap disk if supported in flavor"},{"line_number":577,"context_line":"    if instance.get_flavor()[\u0027swap\u0027] \u003e 0:"},{"line_number":578,"context_line":"        if swap and swap.get(\u0027swap_size\u0027, 0) \u003e 0:"},{"line_number":579,"context_line":"            swap_info \u003d get_info_from_bdm("}],"source_content_type":"text/x-python","patch_set":1,"id":"9a061dce_5c5a9284","line":576,"in_reply_to":"ba0121b8_2cfeab38","updated":"2016-04-04 16:37:38.000000000","message":"ok","commit_id":"602989114f4e4ddc72fd3933427a6809dd612161"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"62e01bf2cafc5e971366a49dfb44d4da693bb477","unresolved":false,"context_lines":[{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    swap \u003d driver.block_device_info_get_swap(block_device_info)"},{"line_number":588,"context_line":"    # NOTE (knasim): only map swap disk if supported in flavor"},{"line_number":589,"context_line":"    if instance.get_flavor()[\u0027swap\u0027] \u003e 0:"},{"line_number":590,"context_line":"        if swap and swap.get(\u0027swap_size\u0027, 0) \u003e 0:"},{"line_number":591,"context_line":"            swap_info \u003d get_info_from_bdm("},{"line_number":592,"context_line":"                instance, virt_type, image_meta,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_5043db41","line":589,"updated":"2016-12-06 06:35:27.000000000","message":"Good workaround. It is not a full solution of the problem, though, because it keeps swap bdm not changed having not actual size, which may affect other code. Also it does not release disk space allocated for swap (it is not actual for file based imagebackends, because driver.py removes backup directory containing the swap file, but it is actual for rbd for example). Which may lead to an error during resizing to a flavor with swap (since swap disk media exists, the create operation may do not check this and fail). Because that i\u0027d like to see a mention in the comment above that this is a workaround.\n\nHowever we might live with this. But it leads to a device name problems, which i think must be taken into account in this patch. The problem is that the unused swap bdm allocates a device name which may be really used by other device. And such swap bdm prevents other device bdm to have correct device name.\n\nE.g. an instance has swap and an attached volume. In this case /dev/vda - root, /dev/vdb - swap, /dev/vdc - the volume. These names are stored in bdms and reflect device names visible from inside a guest OS.\n\nAfter resizing the instance to a flavor with no swap, libvirt driver with this change no more attaches swap device to the instance, so root and the volume device are only used, and they get /dev/vda and /dev/vdb assigned in the guest OS, but do not in bdms. As the result the device name of the volume differs from the one stored in its bdm. This may confuse users and 3rd party tools/services.\n\nSo this patch leads to one problem (device names) immediately after resizing, and may lead to other problems (with rbd) on the next stages of an instance lifecycle. I\u0027d propose to investigate the last ones, and try to fix the first one (or engage danpb as a core member which believes that device names shell die :)","commit_id":"f5548e7e2416e40d30e5da2e281b00a1a774dbbc"}]}
