You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
KVM agent logs the Ceph key when a qemu-img copy to RBD fails #14933
When a qemu-img convert to or from an RBD pool fails, the KVM agent logs the image URI with the cephx key in it, for example at ERROR from LibvirtStorageAdaptor.copyPhysicalDisk:
Failed to convert from /mnt/<secondary>/<template>.qcow2 to rbd:<pool>/<image>:mon_host=<mon>:auth_client_required=cephx:id=<user>:key=<the key>:rbd_default_format=2:client_mount_timeout=30 the error was: ...
qemu-img repeats the URI in its own error output, so Script logs the key a second time at WARN ("Process [...] encountered the error"). Script already masks an argument that starts with rbd:, but not an rbd URI inside --image-opts, inside the comma-joined disk list passed to nasbackup.sh, or the rbd du ... --key <key> command run for every RBD snapshot (logged at DEBUG). Some of these messages are also returned to the management server in the Answer.
versions
4.22 and main, KVM with Ceph RBD primary storage.
The steps to reproduce the bug
Register a QCOW2 template whose image cannot be read (for example a corrupt L1 table).
Deploy a VM from it on an RBD primary storage pool, so the agent copies the template to RBD with qemu-img convert.
The copy fails; agent.log holds the cephx key in the ERROR line and in the Script WARN line.
What to do about it?
Mask the key wherever a command line, its output, a qemu-img error or an RBD file name is logged or returned, as key=******.
Activity