On 06/24/2016 08:51 AM, Peter Krempa wrote: > On Thu, Jun 23, 2016 at 13:29:10 -0400, John Ferlan wrote: >> Commit id 'a1344f70a' added AES secret processing for RBD when starting >> up a guest. As such, when the hotplug code calls qemuDomainSecretDiskPrepare >> an AES secret could be added to the disk about to be hotplugged. If an AES >> secret was added, then the hotplug code would need to generate the secret >> object because qemuBuildDriveStr would add the "password-secret=" to the >> returned 'driveStr' rather than the base64 encoded password. >> >> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> >> --- >> src/qemu/qemu_hotplug.c | 44 ++++++++++++++++++++++++++++++++++++++------ >> 1 file changed, 38 insertions(+), 6 deletions(-) > > [...] > >> @@ -3422,12 +3446,14 @@ qemuDomainDetachVirtioDiskDevice(virQEMUDriverPtr driver, >> qemuDomainMarkDeviceForRemoval(vm, &detach->info); >> >> qemuDomainObjEnterMonitor(driver, vm); >> - if (qemuMonitorDelDevice(priv->mon, detach->info.alias) < 0) { >> - if (qemuDomainObjExitMonitor(driver, vm) < 0) >> - goto cleanup; >> - virDomainAuditDisk(vm, detach->src, NULL, "detach", false); >> - goto cleanup; >> + if (secinfo && secinfo->type == VIR_DOMAIN_SECRET_INFO_TYPE_AES) { >> + if (qemuMonitorDelObject(priv->mon, secinfo->s.aes.alias) < 0) > > Additionally to the complaint about secinfo not being initialized. This > is the incorrect place to delete this. You need to do it in > qemuDomainRemoveDiskDevice. RemoveDiskDevice I thought was for SCSI and USB All those *still* confound me... DetachDisk/RemoveDisk... > > Also at that point you can't make the failure to delete the object > fatal. > Right... I'll post a v3 shortly with changes that weren't officially ACK'd, but it seems they were close, plus a few that were ACK w/ changes, plus two new ones borne out of review, and of course these last 2 patches. Thanks for the persistence! John >> + goto faildel; >> } >> + >> + if (qemuMonitorDelDevice(priv->mon, detach->info.alias) < 0) >> + goto faildel; >> + -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list