libvirt.libvirtError: internal error: unable to execute QEMU command 'object-add': Incorrect number of padding bytes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Lee Yarwood |
Bug Description
Description
===========
When attempting to attach an encrypted volume the following trace is logged [1]:
File "/usr/lib/
line 1463, in attach_volume
guest.
File "/usr/lib/
line 303, in attach_device
self.
File "/usr/lib/
doit
result = proxy_call(
File "/usr/lib/
proxy_call
rv = execute(f, *args, **kwargs)
File "/usr/lib/
execute
six.reraise(c, e, tb)
File "/usr/lib/
625, in reraise
raise value
File "/usr/lib/
tworker
rv = meth(*args, **kwargs)
File "/usr/lib/
attachDeviceFlags
if ret == -1: raise libvirtError ('virDomainAtta
failed', dom=self)
libvirt.
'object-add': Incorrect number of padding bytes (57) found on decrypted data
This is due to a known libvirt issue detailed in the following bug report and fix:
Unable to use LUKS passphrase that is exactly 16 bytes long
https:/
[libvirt] [PATCH] Fix padding of encrypted data
https:/
Nova should log a breadcrumb when this issue is encountered directing the operator to update Libvirt to resolve this issue.
[1] http://
Steps to reproduce
==================
Using a version of Libvirt without the above fix simply attempt to attach and encrypted volume using the native LUKS decryption feature in Nova.
Expected result
===============
Breadcrumb line logged if this issue is hit.
Actual result
=============
Only the trace is logged.
Environment
===========
1. Exact version of OpenStack you are running. See the following
list for all releases: http://
Current Rocky master.
2. Which hypervisor did you use?
(For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...)
What's the version of that?
Libvirt
2. Which storage type did you use?
(For example: Ceph, LVM, GPFS, ...)
What's the version of that?
N/A
3. Which networking type did you use?
(For example: nova-network, Neutron with OpenVSwitch, ...)
N/A
Fix proposed to branch: master /review. openstack. org/577164
Review: https:/