Skip to content

Commit b22542e

Browse files
authored
Merge c1d2feb into 7b91303
2 parents 7b91303 + c1d2feb commit b22542e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kvmagent/kvmagent/plugins/vm_plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3331,7 +3331,9 @@ def _create_ceph_secret_key(userKey, uuid):
33313331
try:
33323332
o = shell.call("virsh secret-define %s" % spath)
33333333
o = o.strip(' \n\t\r')
3334-
_, generateuuid, _ = o.split()
3334+
uuidReg = "[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"
3335+
pattern = re.compile(uuidReg)
3336+
generateuuid = pattern.findall(o)[0]
33353337
shell.call('virsh secret-set-value %s %s' % (generateuuid, userKey))
33363338
finally:
33373339
os.remove(spath)

0 commit comments

Comments
 (0)