Files
nova/nova
melanie witt f2c65e36fa libvirt: Use common naming convention for ephemeral disk labels
The _create_ephemeral() method is responsible for creating ephemeral
disks with image type "raw" and formatting them with mkfs. In the case
of [libvirt]images_type "qcow2", _create_ephemeral() will create
backing files.

Currently we are not using a consistent naming convention for choosing
the filesystem label for ephemeral disks. When we create a server for
example, we go through the disks and label them "ephemeral0",
"ephemeral1", "ephemeral2", etc.

When we hard reboot a server, there is a check to create missing
backing files and if so, a new backing file will be created but instead
of being labeled "ephemeralN" the code attempts to label them with the
name of the backing file itself for example "ephemeral_1_40d1d2c". This
will fail if the filesystem used for ephemeral disks has limitations on
the length of filesystem label names (VFAT, XFS, ...). For example:

  mkfs.vfat: Label can be no longer than 11 characters

This adds a helper method for obtaining ephemeral disks filesystem
label names and uses it the same way in the few places fs_label is
specified.

Closes-Bug: #2061701

Change-Id: Id033a5760272e4fb06dee2342414b26aa16ffe24
(cherry picked from commit 82856f95c6)
(cherry picked from commit 09fc2fae42)
(cherry picked from commit 2fd65bd14a)
Signed-off-by: Pierre Riteau <pierre@stackhpc.com>
(cherry picked from commit d6cdd73c98)
(cherry picked from commit 911cc31b8c)
(cherry picked from commit a8c53ef4c3)
2026-04-01 16:08:20 +00:00
..
2021-09-07 14:29:08 +00:00
2024-08-26 12:03:59 +00:00
2021-02-25 16:01:43 -05:00
2021-11-08 12:37:27 +00:00
2022-03-08 16:16:11 +00:00
2022-04-07 10:19:02 +00:00