Device tagging does not work with block_device_mapping with source=blank,destination=local

Bug #1599201 reported by Artom Lifshitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Medium
Sivasathurappan Radhakrishnan

Bug Description

When booting instance with a block_device_mapping with source=blank,destination=local,tag=foo no entry is created in the block_device_mapping table and the volume is not tagged. While the former is existing normal behaviour, the latter is definitely a bug.

Changed in nova:
assignee: nobody → Artom Lifshitz (notartom)
Revision history for this message
John Garbutt (johngarbutt) wrote :

Hmm, I am not sure the work has yet been completed to support the tagging of ephemeral disks.

Matt Riedemann (mriedem)
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Maciej Szankin (mszankin) wrote :

Artom, are you still working on this? If yes, please provide a patch. If not, please unassign yourself and change bug status to Confirmed.

Changed in nova:
status: Confirmed → In Progress
Changed in nova:
assignee: Artom Lifshitz (notartom) → nobody
status: In Progress → Confirmed
Changed in nova:
assignee: nobody → Sivasathurappan Radhakrishnan (siva-radhakrishnan)
Revision history for this message
Sivasathurappan Radhakrishnan (siva-radhakrishnan) wrote :

Below are few questions that I would like to get clarified before proceeding to do any code changes

•When booting an instance with block_device_mapping with source=blank, destination=local, tag=foo you had mentioned that no entry would be created in the block_device_mapping table, but I was able to create an entry with volume_size set . Is that how it is supposed to work ?.

•I found the root cause to be created by this piece of code https://github.com/openstack/nova/blob/master/nova/compute/api.py#L1240. On looking at this, I somehow feel that both block device mapping and device tagging are interdependent on each other.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/369176

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Matthew Booth (mbooth-9) wrote :

I have attempted to reproduce this. Here is my reproducer:

$ nova flavor-create tiny.eph2 auto 256 1 1 --ephemeral 2 --swap 256
$ nova boot --image cirros-0.3.4-x86_64-uec --flavor tiny.eph2 --block-device dest=local,source=blank,tag=foo foo

This seems to be what the reporter is describing. However, contrary to what the reporter describes, this creates the expected 2G ephemeral disk tagged with 'foo'.

After looking at the proposed patch, I tried the following instead:

$ nova boot --image cirros-0.3.4-x86_64-uec --flavor tiny.eph2 --block-device dest=local,source=blank,tag=foo,size=0 foo

This doesn't create a BDM. However, this is expected behaviour, because with a size of zero the disk itself isn't created, so there's nothing to map, or tag.

I don't think this is a bug.

Revision history for this message
Matthew Booth (mbooth-9) wrote :

Adding to comment #5, I tried the same with m1.tiny, which has no ephemeral disk:

$ nova boot --image cirros-0.3.4-x86_64-uec --flavor m1.tiny --block-device dest=local,source=blank,tag=foo foo

Again, the observed behaviour is that no ephemeral disk is created. This is expected behaviour: as the size was omitted it defaults to the flavor size, which is zero, so it is not created. We might argue that as the user has explicitly specified one we should raise an error, but that's not related to device tagging.

Matt Riedemann (mriedem)
Changed in nova:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Sivasathurappan Radhakrishnan (<email address hidden>) on branch: master
Review: https://review.openstack.org/369176
Reason: Bug was reproduced with flavor which has no ephemeral disk size. Hence abandoning this patch.

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.