← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1643181] [NEW] instance xml not consistent with image info

 

Public bug reported:

In our unit tests, both `test_get_instance_disk_info_works_correctly`
and `test_get_instance_disk_info_excludes_volumes` in
`virt/libvirt/test_driver.py` dummy xml are as follows:

dummyxml = ("<domain type='kvm'><name>instance-0000000a</name>"
                    "<devices>"
                    "<disk type='file'><driver name='qemu' type='raw'/>"
                    "<source file='/test/disk'/>"
                    "<target dev='vda' bus='virtio'/></disk>"
                    "<disk type='file'><driver name='qemu' type='qcow2'/>"
                    "<source file='/test/disk.local'/>"
                    "<target dev='vdb' bus='virtio'/></disk>"
                    "</devices></domain>")

But the mock image info:

ret = ("image: /test/disk\n"
               "file format: raw\n"
               "virtual size: 20G (21474836480 bytes)\n"
               "disk size: 3.1G\n"
               "cluster_size: 2097152\n"
               "backing file: /test/dummy (actual path: /backing/file)\n")

The image path(disk vs disk.local) and the file format(raw vs qcow2) are
not consistent with our define before. Thought these won't break out our
work, it's really a little misleading.

** Affects: nova
     Importance: Undecided
     Assignee: int32bit (int32bit)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => int32bit (int32bit)

** Description changed:

  In our unit tests, both `test_get_instance_disk_info_works_correctly`
  and `test_get_instance_disk_info_excludes_volumes` in
  `virt/libvirt/test_driver.py` dummy xml are as follows:
  
  dummyxml = ("<domain type='kvm'><name>instance-0000000a</name>"
-                     "<devices>"
-                     "<disk type='file'><driver name='qemu' type='raw'/>"
-                     "<source file='/test/disk'/>"
-                     "<target dev='vda' bus='virtio'/></disk>"
-                     "<disk type='file'><driver name='qemu' type='qcow2'/>"
-                     "<source file='/test/disk.local'/>"
-                     "<target dev='vdb' bus='virtio'/></disk>"
-                     "</devices></domain>")
+                     "<devices>"
+                     "<disk type='file'><driver name='qemu' type='raw'/>"
+                     "<source file='/test/disk'/>"
+                     "<target dev='vda' bus='virtio'/></disk>"
+                     "<disk type='file'><driver name='qemu' type='qcow2'/>"
+                     "<source file='/test/disk.local'/>"
+                     "<target dev='vdb' bus='virtio'/></disk>"
+                     "</devices></domain>")
  
  But the mock image info:
  
  ret = ("image: /test/disk\n"
-                "file format: raw\n"
-                "virtual size: 20G (21474836480 bytes)\n"
-                "disk size: 3.1G\n"
-                "cluster_size: 2097152\n"
-                "backing file: /test/dummy (actual path: /backing/file)\n")
+                "file format: raw\n"
+                "virtual size: 20G (21474836480 bytes)\n"
+                "disk size: 3.1G\n"
+                "cluster_size: 2097152\n"
+                "backing file: /test/dummy (actual path: /backing/file)\n")
  
- The image path and the file format are not consistent with our define
- before. Thought these won't break out our work, it's really a little
- misleading.
+ The image path(disk vs disk.local) and the file format(raw vs qcow2) are
+ not consistent with our define before. Thought these won't break out our
+ work, it's really a little misleading.

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1643181

Title:
  instance xml not consistent with image info

Status in OpenStack Compute (nova):
  New

Bug description:
  In our unit tests, both `test_get_instance_disk_info_works_correctly`
  and `test_get_instance_disk_info_excludes_volumes` in
  `virt/libvirt/test_driver.py` dummy xml are as follows:

  dummyxml = ("<domain type='kvm'><name>instance-0000000a</name>"
                      "<devices>"
                      "<disk type='file'><driver name='qemu' type='raw'/>"
                      "<source file='/test/disk'/>"
                      "<target dev='vda' bus='virtio'/></disk>"
                      "<disk type='file'><driver name='qemu' type='qcow2'/>"
                      "<source file='/test/disk.local'/>"
                      "<target dev='vdb' bus='virtio'/></disk>"
                      "</devices></domain>")

  But the mock image info:

  ret = ("image: /test/disk\n"
                 "file format: raw\n"
                 "virtual size: 20G (21474836480 bytes)\n"
                 "disk size: 3.1G\n"
                 "cluster_size: 2097152\n"
                 "backing file: /test/dummy (actual path: /backing/file)\n")

  The image path(disk vs disk.local) and the file format(raw vs qcow2)
  are not consistent with our define before. Thought these won't break
  out our work, it's really a little misleading.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1643181/+subscriptions


Follow ups