mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-28 03:40:03 +00:00
VictoriaMetrics: Stop vmagent/vmalert before update (#14016)
Stop vmagent and vmalert services (if present) before deploying the vmutils tarball during updates, and restart them afterward. Running vmutils daemons (vmagent-prod, vmalert-prod) cause cp to fail with ETXTBSY when their binaries are overwritten in /opt/victoriametrics. Fixes #14014
This commit is contained in:
parent
615fc7d6ce
commit
347e0af359
1 changed files with 4 additions and 0 deletions
|
|
@ -32,6 +32,8 @@ function update_script() {
|
|||
msg_info "Stopping Service"
|
||||
systemctl stop victoriametrics
|
||||
[[ -f /etc/systemd/system/victoriametrics-logs.service ]] && systemctl stop victoriametrics-logs
|
||||
[[ -f /etc/systemd/system/vmagent.service ]] && systemctl stop vmagent
|
||||
[[ -f /etc/systemd/system/vmalert.service ]] && systemctl stop vmalert
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
victoriametrics_release=$(curl -fsSL "https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases" |
|
||||
|
|
@ -62,6 +64,8 @@ function update_script() {
|
|||
msg_info "Starting Service"
|
||||
systemctl start victoriametrics
|
||||
[[ -f /etc/systemd/system/victoriametrics-logs.service ]] && systemctl start victoriametrics-logs
|
||||
[[ -f /etc/systemd/system/vmagent.service ]] && systemctl start vmagent
|
||||
[[ -f /etc/systemd/system/vmalert.service ]] && systemctl start vmalert
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue