Ask Your Question

How do I disable the file injection and force metadata service method?

asked 2014-12-02 03:45:31 -0500

amirz gravatar image

updated 2014-12-09 11:56:49 -0500

smaffulli gravatar image

Since using Juno on Ubuntu 14.04., file injection is forced to open the virtual machine rootfs during VM creation. On The compute node /etc/nova/nova.conf under [libvirt] section is configured as follows and still injection is forced to be active.

inject_password = false
inject_key = false
inject_partition = -2

In my case the outcome will be that the VM creation fails. Here are the relevant example logs:

2014-12-01 16:42:45.163 1912 DEBUG nova.virt.disk.api [req-aa831aad-d580-4321-ad09-33c2a52049d1 None] Checking if we can resize filesystem inside /var/lib/nova/instances/926b8283-7063-4863-bd52-974bd9c67e91/disk. CoW=True is_image_partitionless /usr/lib/python2.7/dist-packages/nova/virt/disk/
2014-12-01 16:42:45.164 1912 DEBUG nova.virt.disk.vfs.api [req-aa831aad-d580-4321-ad09-33c2a52049d1 None] Instance for image imgfile=/var/lib/nova/instances/926b8283-7063-4863-bd52-974bd9c67e91/disk imgfmt=qcow2 partition=None instance_for_image /usr/lib/python2.7/dist-packages/nova/virt/disk/vfs/
2014-12-01 16:42:45.164 1912 DEBUG nova.virt.disk.vfs.api [req-aa831aad-d580-4321-ad09-33c2a52049d1 None] Using primary VFSGuestFS instance_for_image /usr/lib/python2.7/dist-packages/nova/virt/disk/vfs/
2014-12-01 16:43:09.095 1912 DEBUG nova.virt.disk.vfs.guestfs [req-aa831aad-d580-4321-ad09-33c2a52049d1 None] Setting up appliance for /var/lib/nova/instances/926b8283-7063-4863-bd52-974bd9c67e91/disk qcow2 setup /usr/lib/python2.7/dist-packages/nova/virt/disk/vfs/
2014-12-01 16:43:18.458 1912 DEBUG nova.virt.disk.vfs.guestfs [req-aa831aad-d580-4321-ad09-33c2a52049d1 None] Mount guest OS image /var/lib/nova/instances/926b8283-7063-4863-bd52-974bd9c67e91/disk partition None setup_os_static /usr/lib/python2.7/dist-packages/nova/virt/disk/vfs/
2014-12-01 16:43:18.570 1912 DEBUG nova.virt.disk.vfs.guestfs [req-aa831aad-d580-4321-ad09-33c2a52049d1 None] Tearing down appliance teardown /usr/lib/python2.7/dist-packages/nova/virt/disk/vfs/
2014-12-01 16:43:18.572 1912 WARNING nova.virt.disk.vfs.guestfs [req-aa831aad-d580-4321-ad09-33c2a52049d1 None] Failed to close augeas aug_close: do_aug_close: you must call 'aug-init' first to initialize Augeas
2014-12-01 16:43:18.595 1912 DEBUG nova.virt.disk.api [req-aa831aad-d580-4321-ad09-33c2a52049d1 None] Unable to mount image /var/lib/nova/instances/926b8283-7063-4863-bd52-974bd9c67e91/disk with error Error mounting /var/lib/nova/instances/926b8283-7063-4863-bd52-974bd9c67e91/disk with libguestfs (mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type). Cannot resize. is_image_partitionless /usr/lib/python2.7/dist-packages/nova/virt/disk/
edit retag flag offensive close merge delete


What's the reason for rejecting inject_partition = -1 ? It's working option on Juno. Then libguestfs would use inspection to determine the correct mounts. See your logs , it happens anyway, but -2 causes failure

dbaxps gravatar imagedbaxps ( 2014-12-02 05:52:24 -0500 )edit

I have the same issue, same OS. any workaround? Are u saying that the bug is that "-2" is refereed to as "-1"? the FS is inspected although is should have been ignored? All was ok in Ubuntu 14.04 running icehouse...

etlv gravatar imageetlv ( 2014-12-02 06:30:43 -0500 )edit

I want to make sure the file injection is disabled. Using -1,-2 or 0 doesn't seems to have effect and the result of creating a VM is the same. I did not experienced this issue with Icehouse. It can be a Bug or miss configuration on my side as I am trying to figure it up.

amirz gravatar imageamirz ( 2014-12-02 08:27:00 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2014-12-02 06:49:53 -0500

dbaxps gravatar image

updated 2014-12-09 13:04:05 -0500

Looks like Ubuntu specific issue or misconfiguration.
Working fragment nova.conf on Compute Node (CentOS 7) :-

    qemu_allowed_storage_drivers = gluster

Replaced with

    force_config_drive = always
    qemu_allowed_storage_drivers = gluster

Restarted openstack-nova-compute service first time with

force_config_drive = always

Launched new VM (Ubuntu 14.10 ) with no problems.
Commented out

# force_config_drive = always

Restarted openstack-nova-compute service second time
Launched CirrOS instance with no problems.
Seems that force_config_drive is set by default.
Both options for injection_partion (-1,-2) work
independently of presence force_config_drive = always
Juno set force_config_drive, rather then forces file injection.

edit flag offensive delete link more

answered 2014-12-10 03:30:48 -0500

To disable config drive in Juno I had to use force_config_drive= (yes, without any value) in nova.conf. Maybe this works on inject_partition too.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-12-02 03:45:31 -0500

Seen: 927 times

Last updated: Dec 10 '14