While testing Peter's changes to my patches, I discovered that when
restarting libvirt with domains running, they would no longer show
up when a 'virsh list' was issued. I tracked this bug down to this
section of code within virDomainDiskDefParseXML. The symptom was
that libvirt was issuing an internal error saying that the secret
type was invalid. This is caused because this function didn't handle
storage pool volumes. I do not have any ISCSI volumes with which to
test, but it would theoretically affect those, as well. I attempted
to make the function smarter, by checking the pool type and setting
expected_secret_usage properly, but this function does not have a
valid connection pointer, and I was thus unable to do so.
---
src/conf/domain_conf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 332cb50..82587eb 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5311,7 +5311,8 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
cur = cur->next;
}
- if (auth_secret_usage != -1 && auth_secret_usage != expected_secret_usage) {
+ if (auth_secret_usage != -1 && auth_secret_usage != expected_secret_usage
&&
+ def->type != VIR_DOMAIN_DISK_TYPE_VOLUME) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("invalid secret type '%s'"),
virSecretUsageTypeTypeToString(auth_secret_usage));
--
1.8.4.2