libvirt: Ephemeral disks are labeled with None

Bug #1087030 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Michael Still

Bug Description

When ephemeral disks are created, they sometimes get None in the fileneame. This happens if the glance image has no os_type set. The purpose of putting the image type in the filename is that different os types cause the fs to be formatted differently. Therefore, the None should at the very least be 'default' but it would be nice if it could search through the virt_mkfs option to see if another option matches default. For example, in the default config options the default option matches the linux option so it should really be using linux instead of None.

in _base:

ephemeral_0_20_None
ephemeral_0_20_None_20

Changed in nova:
status: New → Triaged
importance: Undecided → Low
assignee: nobody → Michael Still (mikalstill)
Revision history for this message
Michael Still (mikal) wrote :

This code was re-written as part of moving to not caching ephemeral disks, so this bug is no longer relevant.

Changed in nova:
status: Triaged → Invalid
Revision history for this message
Michael Still (mikal) wrote :

Re-opening this to take another look.

Changed in nova:
status: Invalid → Triaged
Revision history for this message
xiaohanyu (xiaohanyu1988) wrote :
Download full text (5.6 KiB)

this could caused instance failed to boot:

logs:

2012-12-14 02:18:27 DEBUG nova.utils [req-bf622be9-fa2b-4930-a5f9-7627e1ee2cf0 admin admin] Result was 0 from (pid=16046) execute /opt/stack/nova/nova/utils.py:199
2012-12-14 02:18:27 DEBUG nova.utils [req-bf622be9-fa2b-4930-a5f9-7627e1ee2cf0 admin admin] Running cmd (subprocess): mkfs.ext3 -L ephemeral0 -F /opt/stack/data/nova/instances/_base/ephemeral_0_1_None from (pid=16046) execute /opt/stack/nova/nova/utils.py:183
2012-12-14 02:18:27 ERROR nova.compute.manager [req-bf622be9-fa2b-4930-a5f9-7627e1ee2cf0 admin admin] [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] Instance failed to spawn
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] Traceback (most recent call last):
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] File "/opt/stack/nova/nova/compute/manager.py", line 843, in _spawn
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] block_device_info)
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] File "/opt/stack/nova/nova/exception.py", line 117, in wrapped
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] temp_level, payload)
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] self.gen.next()
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] File "/opt/stack/nova/nova/exception.py", line 92, in wrapped
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] return f(*args, **kw)
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1074, in spawn
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] admin_pass=admin_password)
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1348, in _create_image
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] ephemeral_size=ephemeral_gb)
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] File "/opt/stack/nova/nova/virt/libvirt/imagebackend.py", line 126, in cache
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] *args, **kwargs)
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] File "/opt/stack/nova/nova/virt/libvirt/imagebackend.py", line 173, in create_image
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-ca48-40ae-8330-f876e1b1c6f5] prepare_template(target=base, *args, **kwargs)
2012-12-14 02:18:27 TRACE nova.compute.manager [instance: 48f811a7-c...

Read more...

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/18293
Committed: http://github.com/openstack/nova/commit/0cecdf4b8632d3a4eea816869796b03e8b928256
Submitter: Jenkins
Branch: master

commit 0cecdf4b8632d3a4eea816869796b03e8b928256
Author: Michael Still <email address hidden>
Date: Tue Dec 18 16:32:14 2012 +1100

    Reliably include OS type in ephemeral filenames.

    Either include the OS type, or "default" if this isn't specified.

    Also, I don't see why we care what ephemeral disk number this disk
    was created as (they're all empty images in base, right?) so I've
    removed that.

    Resolves bug 1087030.

    Change-Id: Iee7f8e9033a2e6a829421763090ed0e67c6b2da8

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.