Skip to content

Commit 671229a

Browse files
author
gitlab
committed
Merge branch 'ZSTAC-30578-zstore-client@@2' into '3.10.0-xinchuang'
[BugFix: ZSTACK-30578] zstack-store-client.bin when client is true See merge request zstackio/zstack-utility!253
2 parents 3557952 + e3af59c commit 671229a

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

imagestorebackupstorage/ansible/imagestorebackupstorage.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@
7474
else:
7575
src_pkg_imagestorebackupstorage = "zstack-store.bin"
7676
src_pkg_exporter = "collectd_exporter"
77-
dst_pkg_imagestorebackupstorage = "zstack-store.bin"
77+
78+
if client != "true":
79+
dst_pkg_imagestorebackupstorage = "zstack-store.bin"
80+
else:
81+
dst_pkg_imagestorebackupstorage = "zstack-store-client.bin"
7882
dst_pkg_exporter = "collectd_exporter"
7983

8084
# include zstacklib.py
@@ -142,7 +146,7 @@
142146
error("ERROR: Unsupported distribution")
143147

144148
# name: copy imagestore binary
145-
command = 'rm -rf {};mkdir -p {}'.format(imagestore_root, imagestore_root + "/certs")
149+
command = 'mkdir -p {}'.format(imagestore_root + "/certs")
146150
run_remote_command(command, host_post_info)
147151
copy_arg = CopyArg()
148152
dest_pkg = "%s/%s" % (imagestore_root, dst_pkg_imagestorebackupstorage)
@@ -187,8 +191,7 @@
187191
run_remote_command(command, host_post_info)
188192

189193
# name: restart image store server
190-
server = client != "true" or run_remote_command("pkill -0 zstore", host_post_info, return_status=True, return_output=False)
191-
if server:
194+
if client != "true":
192195
# integrate zstack-store with init.d
193196
run_remote_command("/bin/cp -f /usr/local/zstack/imagestore/bin/zstack-imagestorebackupstorage /etc/init.d/", host_post_info)
194197
if distro in RPM_BASED_OS:

0 commit comments

Comments
 (0)