← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1313107] [NEW] disk.local is not created when additional ephemeral disks are attached on boot

 

Public bug reported:

If you try to boot an instance with a flavor containing an ephemeral
disk and also attach an additional ephemeral disk to it at boot time,
the ephemeral disk specified in the flavor is not created.

I have the following flavor (4G root, 4G ephemeral, 1G memory, and 1 VCPU):
$ nova flavor-show m3.tiny
+----------------------------+--------------------------------------+
| Property                   | Value                                |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                |
| OS-FLV-EXT-DATA:ephemeral  | 4                                    |
| disk                       | 4                                    |
| extra_specs                | {}                                   |
| id                         | d63abfa8-64dc-4833-99bc-e29c2e1aa6e6 |
| name                       | m3.tiny                              |
| os-flavor-access:is_public | True                                 |
| ram                        | 1024                                 |
| rxtx_factor                | 1.0                                  |
| swap                       |                                      |
| vcpus                      | 1                                    |
+----------------------------+--------------------------------------+

I used the nova boot --ephemeral parameter to attach an additional ephemeral disk on boot:
$ nova boot --flavor m3.tiny --key_name stack --image precise-server-cloudimg-amd64 --ephemeral size=2 test3

If I examine the libvirt XML of the instance after it is created, I
noticed it does not have disk.local, as it usually does when an
ephemeral disk is specified by a flavor.  Instead, it only contains the
ephemeral disk specified by the --ephemeral parameter.

...
  <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/opt/stack/data/nova/instances/4f3bd658-1719-4074-a044-d51f24d92b76/disk'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none'/>
      <source file='/opt/stack/data/nova/instances/4f3bd658-1719-4074-a044-d51f24d92b76/disk.eph0'/>
      <target dev='vdb' bus='virtio'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
...

When I attempt to reboot the instance, it fails with the following
message in n-cpu log:

Apr 26 10:08:46 localhost 2014-04-26 10:08:46.850 ERROR
oslo.messaging._drivers.common [req-e1a531c9-3fbf-44a7-8f6a-1c6616b906e8
admin demo] Returning exception [Errno 2] No such file or directory:
'/opt/stack/data/nova/instances/4f3bd658-1719-4074-a044-d51f24d92b76/disk.local'
to caller

** Affects: nova
     Importance: Medium
     Assignee: Thang Pham (thang-pham)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Thang Pham (thang-pham)

** Changed in: nova
   Importance: Undecided => Medium

-- 
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/1313107

Title:
  disk.local is not created when additional ephemeral disks are attached
  on boot

Status in OpenStack Compute (Nova):
  New

Bug description:
  If you try to boot an instance with a flavor containing an ephemeral
  disk and also attach an additional ephemeral disk to it at boot time,
  the ephemeral disk specified in the flavor is not created.

  I have the following flavor (4G root, 4G ephemeral, 1G memory, and 1 VCPU):
  $ nova flavor-show m3.tiny
  +----------------------------+--------------------------------------+
  | Property                   | Value                                |
  +----------------------------+--------------------------------------+
  | OS-FLV-DISABLED:disabled   | False                                |
  | OS-FLV-EXT-DATA:ephemeral  | 4                                    |
  | disk                       | 4                                    |
  | extra_specs                | {}                                   |
  | id                         | d63abfa8-64dc-4833-99bc-e29c2e1aa6e6 |
  | name                       | m3.tiny                              |
  | os-flavor-access:is_public | True                                 |
  | ram                        | 1024                                 |
  | rxtx_factor                | 1.0                                  |
  | swap                       |                                      |
  | vcpus                      | 1                                    |
  +----------------------------+--------------------------------------+

  I used the nova boot --ephemeral parameter to attach an additional ephemeral disk on boot:
  $ nova boot --flavor m3.tiny --key_name stack --image precise-server-cloudimg-amd64 --ephemeral size=2 test3

  If I examine the libvirt XML of the instance after it is created, I
  noticed it does not have disk.local, as it usually does when an
  ephemeral disk is specified by a flavor.  Instead, it only contains
  the ephemeral disk specified by the --ephemeral parameter.

  ...
    <disk type='file' device='disk'>
        <driver name='qemu' type='qcow2' cache='none'/>
        <source file='/opt/stack/data/nova/instances/4f3bd658-1719-4074-a044-d51f24d92b76/disk'/>
        <target dev='vda' bus='virtio'/>
        <alias name='virtio-disk0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='qcow2' cache='none'/>
        <source file='/opt/stack/data/nova/instances/4f3bd658-1719-4074-a044-d51f24d92b76/disk.eph0'/>
        <target dev='vdb' bus='virtio'/>
        <alias name='virtio-disk1'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
      </disk>
  ...

  When I attempt to reboot the instance, it fails with the following
  message in n-cpu log:

  Apr 26 10:08:46 localhost 2014-04-26 10:08:46.850 ERROR
  oslo.messaging._drivers.common [req-e1a531c9-3fbf-44a7-8f6a-
  1c6616b906e8 admin demo] Returning exception [Errno 2] No such file or
  directory:
  '/opt/stack/data/nova/instances/4f3bd658-1719-4074-a044-d51f24d92b76/disk.local'
  to caller

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


Follow ups

References