Skip to content

Commit a04828a

Browse files
author
zstackio
committed
Merge branch 'f64244' into '5.1.0'
<fix>[ha]:simplejson not support item assignment See merge request zstackio/zstack-utility!4682
2 parents 3b08300 + 08cee62 commit a04828a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kvmagent/kvmagent/plugins/ha_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -999,10 +999,10 @@ def update_shareblock_vm_ha_params(vg_uuids):
999999
return
10001000
with open(SHAREBLOCK_VM_HA_PARAMS_PATH, 'r+') as f:
10011001
cmd = f.read().strip()
1002-
if len(cmd) == 0:
1002+
if len(cmd) == 0 or cmd == '{}':
10031003
return
10041004

1005-
cmd_json = jsonobject.loads(cmd)
1005+
cmd_json = json.loads(cmd)
10061006
cmd_json["vgUuids"] = vg_uuids
10071007
f.seek(0)
10081008
f.truncate(0)

0 commit comments

Comments
 (0)