yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #51339
[Bug 1584236] [NEW] Empty /etc/machine-id file fails instance creation
Public bug reported:
Description
===========
If the /etc/machine-id file is present but empty for some reason, instance creation fails if the sysinfo_serial config option is set to 'auto' (default). The _get_host_sysinfo_serial_os function in libvirt driver treats empty file the same as missing file and throws NovaException in both cases. This change was made as part of https://bugs.launchpad.net/nova/+bug/1475353.
However, if the sysinfo_serial config option is set to 'auto', the driver only checks for the presence of file when choosing to report 'os' serial. If the file is present but empty, this throws NovaException instead of falling back to reporting 'hardware' serial instead.
Filing this bug to treat empty and missing file as the same in
_get_host_sysinfo_serial_auto function in libvirt driver (similar to
_get_host_sysinfo_serial_os).
Steps to reproduce
==================
1. Empty the contents of /etc/machine-id file on a KVM host.
2. Set sysinfo_serial option in nova.conf to 'auto' (default).
3. Try to create an instance.
Expected result
===============
Instance creation should be successful.
Actual result
=============
Instance creation failed with error:
NovaException: Unable to get host UUID: /etc/machine-id is empty
Environment
===========
Openstack Liberty
Hypervisor - Libvirt + KVM
Storage - Local disk
Networking - Nova-network
** Affects: nova
Importance: Undecided
Assignee: Pooja Ghumre (pooja-9)
Status: New
** Changed in: nova
Assignee: (unassigned) => Pooja Ghumre (pooja-9)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1584236
Title:
Empty /etc/machine-id file fails instance creation
Status in OpenStack Compute (nova):
New
Bug description:
Description
===========
If the /etc/machine-id file is present but empty for some reason, instance creation fails if the sysinfo_serial config option is set to 'auto' (default). The _get_host_sysinfo_serial_os function in libvirt driver treats empty file the same as missing file and throws NovaException in both cases. This change was made as part of https://bugs.launchpad.net/nova/+bug/1475353.
However, if the sysinfo_serial config option is set to 'auto', the driver only checks for the presence of file when choosing to report 'os' serial. If the file is present but empty, this throws NovaException instead of falling back to reporting 'hardware' serial instead.
Filing this bug to treat empty and missing file as the same in
_get_host_sysinfo_serial_auto function in libvirt driver (similar to
_get_host_sysinfo_serial_os).
Steps to reproduce
==================
1. Empty the contents of /etc/machine-id file on a KVM host.
2. Set sysinfo_serial option in nova.conf to 'auto' (default).
3. Try to create an instance.
Expected result
===============
Instance creation should be successful.
Actual result
=============
Instance creation failed with error:
NovaException: Unable to get host UUID: /etc/machine-id is empty
Environment
===========
Openstack Liberty
Hypervisor - Libvirt + KVM
Storage - Local disk
Networking - Nova-network
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1584236/+subscriptions