Config CONF.libvirt.inject_partition=-1, build instance with metadata will remain some images in /var/tmp/.guestfs-0/appliance.d

Bug #1845284 reported by jiangyuhao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
Unassigned

Bug Description

Description
===========
Boot instance with metadata will remain some images in '/var/tmp/.guestfs-0/appliance.d' when this compute_node config CONF.libvirt.inject_partition=-1.

Steps to reproduce
==================
1) Config inject_partition=-1(/etc/nova/nova.conf) in compute_node.
2) boot instance with metadata on this compute_node.
3) boot instance success but some images were remained.

Expected result
===============
In the end of booting instance, can remove those images in /var/tmp/.guestfs-0/appliance.d

Actual result
=============
Those images be left forever.

Environment
===========
1. Exact version of OpenStack you are running. See the following
  openstack-nova-api-18.0.2-1.el7.noarch

2. Which hypervisor did you use?
   Libvirt + KVM

2. Which storage type did you use?
   LVM

3. Which networking type did you use?
   Neutron with OpenVSwitch)

Logs & Configs
==============
{'message': u"No operating system found in <LocalFileImage:{'path': u'/var/lib/nova/instances/7e79433f-917d-43da-88f0-757c6d3572c5/disk', 'format': 'qcow2'}>", 'class': 'NovaException', 'kwargs': {'code': 500}}

Revision history for this message
Matt Riedemann (mriedem) wrote :

This sounds like more of a libguestfs issue than a nova issue, unless nova isn't creating the guest in such a way that libguestfs would cleanup properly.

What version of libguestfs are you using?

Also note that file injection as a feature is disabled by default (it has been for years) and is also deprecated in the API:

https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id52

So in all this is very low priority to resolve IMO.

tags: added: file-injection libguestfs libvirt
Changed in nova:
importance: Undecided → Low
Revision history for this message
Matt Riedemann (mriedem) wrote :

What happens with the files in /var/tmp/.guestfs-0/appliance.d after you restart the compute host operating system? They still are not removed even though they are in a tmp directory?

Revision history for this message
Kashyap Chamarthy (kashyapc) wrote :

So, the libguestfs files in /var/tmp/.guestfs-0/appliance.d are the *cache* and libguestfs never removes those files.

(Double-checked with libguestfs maintainers.)

And Nova _shouldn't_ delete those files either; that's wrong.

Instead, we suggest to use a tool like `systemd-tmpfiles`; from its man page:

"`systemd-tmpfiles` creates, deletes, and cleans up volatile and temporary files and directories, based on the configuration file format and location specified in tmpfiles.d(5)"

So we should close this bug as "invalid", afraid.

Changed in nova:
status: New → Invalid
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.