This is an automated email from the ASF dual-hosted git repository.
weizhou pushed a commit to branch 4.20
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.20 by this push:
new 5dfeb79c63c systemvm: fix failed to get script version when patch
system vm or router (#10962)
5dfeb79c63c is described below
commit 5dfeb79c63ccd4e3364dd1ba1ef0254b9bf54a96
Author: Wei Zhou <[email protected]>
AuthorDate: Sat Sep 27 01:36:36 2025 +0200
systemvm: fix failed to get script version when patch system vm or router
(#10962)
This is a regression of #9900
prior to this PR
```
2025-06-05 12:28:53,992 DEBUG [cloud.agent.Agent]
(AgentRequest-Handler-1:[]) (logid:) Processing command:
com.cloud.agent.api.PatchSystemVmCommand
2025-06-05 12:29:25,959 DEBUG
[resource.wrapper.LibvirtPatchSystemVmCommandWrapper]
(AgentRequest-Handler-1:[]) (logid:) Patch result of systemVM s-368-VM: /root
2025-06-05 12:29:25,961 WARN
[resource.wrapper.LibvirtPatchSystemVmCommandWrapper]
(AgentRequest-Handler-1:[]) (logid:) Failed to get the latest script version
2025-06-05 12:29:25,962 DEBUG [cloud.agent.Agent]
(AgentRequest-Handler-1:[]) (logid:) Seq 2-7450361158554357406: { Ans: ,
MgmtId: 32986204472275, via: 2, Ver: v1, Flags: 10,
[{"com.cloud.agent.api.PatchSystemVmAnswer":{"templateVersion":"Cloudstack
Release 4.20.1 Wed May 14 05:22:13 PM UTC
2025","scriptsVersion":"5ebc6ded1a3880732363c1cdbbd54cfb
```
with this PR
```
2025-06-05 12:42:46,219 DEBUG [cloud.agent.Agent]
(AgentRequest-Handler-2:[]) (logid:) Request:Seq 2-7450361158554357463: { Cmd
, MgmtId: 32986204472275, via: 2, Ver: v1, Flags: 100011,
[{"com.cloud.agent.api.PatchSystemVmCommand":{"forced":"true","accessDetails":{"router.ip":"169.254.151.188","router.name":"s-368-VM"},"wait":"0","bypassHostMaintenance":"false"}}]
}
2025-06-05 12:42:46,220 DEBUG [cloud.agent.Agent]
(AgentRequest-Handler-2:[]) (logid:) Processing command:
com.cloud.agent.api.PatchSystemVmCommand
2025-06-05 12:43:18,083 DEBUG
[resource.wrapper.LibvirtPatchSystemVmCommandWrapper]
(AgentRequest-Handler-2:[]) (logid:) Patch result of systemVM s-368-VM: /root
2025-06-05 12:43:18,083 DEBUG [cloud.agent.Agent]
(AgentRequest-Handler-2:[]) (logid:) Seq 2-7450361158554357463: { Ans: ,
MgmtId: 32986204472275, via: 2, Ver: v1, Flags: 10,
[{"com.cloud.agent.api.PatchSystemVmAnswer":{"templateVersion":"Cloudstack
Release 4.20.1 Wed May 14 05:22:13 PM UTC
2025","scriptsVersion":"5ebc6ded1a3880732363c1cdbbd54cfb","result":"true","details":"Successfully
patched systemVM s-368-VM ","wait":"0","bypassHostMaintenance":"false"}}] }
```
---
systemvm/patch-sysvms.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/systemvm/patch-sysvms.sh b/systemvm/patch-sysvms.sh
index f24136155f8..7d026c20b9d 100644
--- a/systemvm/patch-sysvms.sh
+++ b/systemvm/patch-sysvms.sh
@@ -124,8 +124,10 @@ patch_systemvm() {
echo "Restored keystore file and certs using backup" >> $logfile 2>&1
fi
- # Import global cacerts into 'cloud' service's keystore
- keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts
-destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass
changeit -deststorepass vmops.com -noprompt || true
+ if [ "$TYPE" = "consoleproxy" ] || [ "$TYPE" = "secstorage" ]; then
+ # Import global cacerts into 'cloud' service's keystore
+ keytool -importkeystore -srckeystore /etc/ssl/certs/java/cacerts
-destkeystore /usr/local/cloud/systemvm/certs/realhostip.keystore -srcstorepass
changeit -deststorepass vmops.com -noprompt 2>/dev/null || true
+ fi
update_checksum $newpath/cloud-scripts.tgz