[Nova] Injection metadata disappears after instance resize

Bug #1709023 reported by Alexander Rubtsov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
In Progress
Medium
MOS Nova
9.x
Fix Released
Medium
MOS Nova

Bug Description

--- Environment ---
MOS 9 (ISO build 528)

--- Steps to reproduce ---
1. Launch a VM with injected file:
vim /root/inject.txt
nova boot --flavor m1.micro --image TestVM --nic net-id=832acbbf-9fe0-47e6-97e5-ece8ab7a9f96 --file /root/inject.txt=/root/inject.txt test_vm1

2. Check the content of config drive on the compute node
mkdir /mnt/config/
mount /var/lib/nova/instances/cb4913ab-a884-4d20-9907-aac52c082509/disk.config /mnt/config/

cat /mnt/config/openstack/latest/meta_data.json | jq .files
[
  {
    "content_path": "/content/0000",
    "path": "/root/inject.txt"
  }
]

3. Resize the instance
nova resize test_vm1 m1.tiny
nova resize-confirm test_vm1

4. Check the content of config drive on the new compute node
mkdir /mnt/config/
mount /var/lib/nova/instances/cb4913ab-a884-4d20-9907-aac52c082509/disk.config /mnt/config/
cat /mnt/config/openstack/latest/meta_data.json | jq .files

--- Actual result ---
The information about the injected file is not present in metadata:
cat /mnt/config/openstack/latest/meta_data.json | jq .files
null

--- Expected result ---
The information about the injected file is present in metadata:
cat /mnt/config/openstack/latest/meta_data.json | jq .files
[
  {
    "content_path": "/content/0000",
    "path": "/root/inject.txt"
  }
]

Revision history for this message
Alexander Rubtsov (arubtsov) wrote :

sla2 for 9.0-updates

Changed in mos:
importance: Undecided → Medium
assignee: nobody → MOS Nova (mos-nova)
milestone: none → 9.x-updates
tags: added: customer-found sla2
Revision history for this message
Alexander Rubtsov (arubtsov) wrote :

Upstream LP bug that is probably related:
https://bugs.launchpad.net/nova/+bug/1405533

Revision history for this message
Vladyslav Drok (vdrok) wrote :

Yes, that should fix the problem, there are abandoned patches on review, namely https://review.openstack.org/329421, https://review.openstack.org/329425 and https://review.openstack.org/329422

Revision history for this message
Alexander Rubtsov (arubtsov) wrote :

As far as I understand, these patches will never be merged in upstream due to Mitaka lifecycle phase. Can we take them directly to downstream?

Revision history for this message
Vladyslav Drok (vdrok) wrote :

Yes, I think so. I'll propose these downstream and see what other folks from nova team think about these.

Revision history for this message
Alexander Rubtsov (arubtsov) wrote :

Vladyslav,

Have you had a chance to disscuss this matter with the rest of your team?

Revision history for this message
Vladyslav Drok (vdrok) wrote :

Hey Alexander, sorry for the delay. Yes, we have discussed this, the patches are +2'd.

Revision history for this message
Alexander Rubtsov (arubtsov) wrote :

Thank you, Vladyslav.

I'm posting the links to the corresponding patches here:
1) https://review.fuel-infra.org/#/c/36195/
2) https://review.fuel-infra.org/#/c/36196/
3) https://review.fuel-infra.org/#/c/36197/

Please correct this list if I'm wrong (or add if some patches are missing).

Changed in mos:
status: New → In Progress
Revision history for this message
Denis Meltsaykin (dmeltsaykin) wrote :

All patches are merged.

Revision history for this message
Vladimir Jigulin (vjigulin) wrote :

Verified on 9.0-2017-09-01 snapshot

Without proposed: files section in meta_data.json exists before resizing and missed after resizing instance
With proposed: files section in meta_data.json exists after resizing instance and contain actual information

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.