)]}'
{"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"e281f99e91b3589134b50a6e5ea8a6b2e66f3023","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        disk_info[\u0027disk.local\u0027] \u003d {"},{"line_number":340,"context_line":"            \u0027type\u0027: type,"},{"line_number":341,"context_line":"            \u0027path\u0027: instance_path(\u0027disk.local\u0027),"},{"line_number":342,"context_line":"            \u0027ovirt_disk_size\u0027: eph_gb * units.Gi,"},{"line_number":343,"context_line":"            \u0027backing_file\u0027: eph_name(eph_gb),"},{"line_number":344,"context_line":"            \u0027disk_size\u0027: eph_gb * units.Gi,"},{"line_number":345,"context_line":"            \u0027over_committed_disk_size\u0027: 0}"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_eed20134","line":342,"updated":"2016-09-28 16:12:20.000000000","message":"Whoops","commit_id":"da01ad585344d2c0b8ad04aea3f79924651b7b67"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"e281f99e91b3589134b50a6e5ea8a6b2e66f3023","unresolved":false,"context_lines":[{"line_number":9270,"context_line":"        disk_info_byname \u003d fake_disk_info_byname(instance)"},{"line_number":9271,"context_line":""},{"line_number":9272,"context_line":"        disk_info_byname[\u0027disk.local\u0027][\u0027backing_file\u0027] \u003d \u0027ephemeral_foo\u0027"},{"line_number":9273,"context_line":"        disk_info_byname[\u0027disk.local\u0027][\u0027virt_disk_size\u0027] \u003d 1073741824"},{"line_number":9274,"context_line":""},{"line_number":9275,"context_line":"        disk_info \u003d disk_info_byname.values()"},{"line_number":9276,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_2eb4e9f0","line":9273,"updated":"2016-09-28 16:12:20.000000000","message":"nit: could you use units.Gi, or even the super-explicit 1 * units.Gi?","commit_id":"da01ad585344d2c0b8ad04aea3f79924651b7b67"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"e281f99e91b3589134b50a6e5ea8a6b2e66f3023","unresolved":false,"context_lines":[{"line_number":9300,"context_line":""},{"line_number":9301,"context_line":"            verify_base_size_mock.assert_has_calls(["},{"line_number":9302,"context_line":"                mock.call(root_backing, instance.flavor.root_gb * units.Gi),"},{"line_number":9303,"context_line":"                mock.call(ephemeral_backing, 1073741824)"},{"line_number":9304,"context_line":"            ])"},{"line_number":9305,"context_line":""},{"line_number":9306,"context_line":"    def test_create_images_and_backing_disk_info_none(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_cec5455c","line":9303,"updated":"2016-09-28 16:12:20.000000000","message":"nit: Ditto.","commit_id":"da01ad585344d2c0b8ad04aea3f79924651b7b67"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4e1412df152839a324d0ea328275d7ec042bb372","unresolved":false,"context_lines":[{"line_number":6570,"context_line":"    # no need to undefine and regenerate the domain XML to libvirtd,"},{"line_number":6571,"context_line":"    # plus by doing that, hot-plugged devices are not going to be"},{"line_number":6572,"context_line":"    # re-ordered after a hard reboot. After that we can make that"},{"line_number":6573,"context_line":"    # method to avoid create cache for ephemeral and swap disks."},{"line_number":6574,"context_line":"    def _create_images_and_backing(self, context, instance, instance_dir,"},{"line_number":6575,"context_line":"                                   disk_info, fallback_from_host\u003dNone):"},{"line_number":6576,"context_line":"        \"\"\":param context: security context"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a98d1f4_df341f4c","line":6573,"updated":"2016-09-28 12:49:20.000000000","message":"Normally I love big comments, and this is wonderfully descriptive :) I\u0027d ditch this one, though, for a couple of reasons. Firstly, I\u0027ve already proposed change Idfbca32a, which fixes this thoroughly, so it\u0027s hopefully in hand.\n\nSecondly, this behaviour in hard_reboot is a workaround for bugs in ImageCacheManager which we haven\u0027t addressed yet. Note that my change adds a comment to that effect in hard_reboot. You\u0027re right, of course, but I wouldn\u0027t want anybody to read this and think they can just delete this code.","commit_id":"ad057010e2476b60c076c109b496545c8ad9e791"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5a1c60cc49912f4f3c027fb2e8a16fe47edfa1ee","unresolved":false,"context_lines":[{"line_number":6562,"context_line":"    # a base image so thier size are going to be defined by the first"},{"line_number":6563,"context_line":"    # flavor booted on the host, then, if a flavor with smaller disks"},{"line_number":6564,"context_line":"    # try to migrate on that host an exception FlavorDiskTooSmall is"},{"line_number":6565,"context_line":"    # raised by verify_base_size."},{"line_number":6566,"context_line":"    #"},{"line_number":6567,"context_line":"    # Before to fix this issue and to avoid any strange behaviors we"},{"line_number":6568,"context_line":"    # should make hard_reboot to stop using this method, a hard reboot"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_36ca8850","line":6565,"updated":"2016-09-28 14:34:00.000000000","message":"This comment isn\u0027t quite right. The backing file of an ephemeral or swap disk *is* named according to its size, so correctly used the base image size isn\u0027t going to be defined by the first flavor booted on the host. The bug here is that we\u0027re passing in the correct backing file name (which has a size component), and the wrong size. If we pass in the correct size then this particular issue isn\u0027t going to cause problems. As you\u0027re fixing this below, this comment us just a potential source of confusion.","commit_id":"da01ad585344d2c0b8ad04aea3f79924651b7b67"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ed6cbc0450204d419d6248470f690c9fbe5bfedb","unresolved":false,"context_lines":[{"line_number":6562,"context_line":"    # a base image so thier size are going to be defined by the first"},{"line_number":6563,"context_line":"    # flavor booted on the host, then, if a flavor with smaller disks"},{"line_number":6564,"context_line":"    # try to migrate on that host an exception FlavorDiskTooSmall is"},{"line_number":6565,"context_line":"    # raised by verify_base_size."},{"line_number":6566,"context_line":"    #"},{"line_number":6567,"context_line":"    # Before to fix this issue and to avoid any strange behaviors we"},{"line_number":6568,"context_line":"    # should make hard_reboot to stop using this method, a hard reboot"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_869fab5e","line":6565,"in_reply_to":"3a98d1f4_36ca8850","updated":"2016-09-28 14:42:42.000000000","message":"Yes It is, and actually I made mistake, let me double check and fix it and as you said, in that case no need of the whole comment :)","commit_id":"da01ad585344d2c0b8ad04aea3f79924651b7b67"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5a1c60cc49912f4f3c027fb2e8a16fe47edfa1ee","unresolved":false,"context_lines":[{"line_number":6570,"context_line":"    # to undefine and regenerate the domain XML to libvirtd, plus, by"},{"line_number":6571,"context_line":"    # doing that, hot-plugged devices are not going to be re-ordered"},{"line_number":6572,"context_line":"    # \"for each\" hard reboot. After that we can make this method to"},{"line_number":6573,"context_line":"    # avoid creating cache for ephemeral and swap disks."},{"line_number":6574,"context_line":"    def _create_images_and_backing(self, context, instance, instance_dir,"},{"line_number":6575,"context_line":"                                   disk_info, fallback_from_host\u003dNone):"},{"line_number":6576,"context_line":"        \"\"\":param context: security context"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_1672ece5","line":6573,"updated":"2016-09-28 14:34:00.000000000","message":"I agree that destroying the domain during a reboot doesn\u0027t make sense. However, that\u0027s orthogonal to this issue, which is about recreating backing files. The reason we call this method from hard_reboot is bugs in image cache manager. If ICM deleted our backing files while we\u0027re still running, we won\u0027t notice until we reboot the guest. When we reboot, qemu will close its open file handles to deleted disk images, and fail to reopen them.\n\nSo this comment isn\u0027t quite right either, because creating the image cache entry is precisely the required behaviour for both hard_reboot and pre_live_migration, and we can\u0027t ditch it from hard_reboot until we fix image cache manager.","commit_id":"da01ad585344d2c0b8ad04aea3f79924651b7b67"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"5a1c60cc49912f4f3c027fb2e8a16fe47edfa1ee","unresolved":false,"context_lines":[{"line_number":6621,"context_line":"                        # migrated which have ephemeral disks"},{"line_number":6622,"context_line":"                        # smaller than the one cached."},{"line_number":6623,"context_line":"                        size\u003dinfo[\u0027virt_disk_size\u0027],"},{"line_number":6624,"context_line":"                        ephemeral_size\u003dinfo[\u0027virt_disk_size\u0027] / units.Gi)"},{"line_number":6625,"context_line":"                elif cache_name.startswith(\u0027swap\u0027):"},{"line_number":6626,"context_line":"                    inst_type \u003d instance.get_flavor()"},{"line_number":6627,"context_line":"                    swap_mb \u003d inst_type.swap"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_d635e4f7","line":6624,"updated":"2016-09-28 14:34:00.000000000","message":"LGTM.","commit_id":"da01ad585344d2c0b8ad04aea3f79924651b7b67"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"d9afbfa75a8204ca2700097517f2f40eb9a0f477","unresolved":false,"context_lines":[{"line_number":6602,"context_line":"                        # if the disk is not cached. That"},{"line_number":6603,"context_line":"                        # creates a problem for instances"},{"line_number":6604,"context_line":"                        # migrated which have ephemeral disks"},{"line_number":6605,"context_line":"                        # smaller than the one cached."},{"line_number":6606,"context_line":"                        size\u003dinfo[\u0027virt_disk_size\u0027],"},{"line_number":6607,"context_line":"                        ephemeral_size\u003dinfo[\u0027virt_disk_size\u0027] / units.Gi)"},{"line_number":6608,"context_line":"                elif cache_name.startswith(\u0027swap\u0027):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a95cdbc_831c9d78","line":6605,"updated":"2016-10-06 12:41:44.000000000","message":"it\u0027s actually really odd to put the comment inside the function signature, can we extract this and put it first?","commit_id":"537e49fd7b00ba6ab73ecb0ba2ff08a687b165ca"}]}
