pve: better status text

This commit is contained in:
2026-06-08 00:21:52 +03:00
parent 56ebe214d8
commit 674a3bd805
2 changed files with 4 additions and 4 deletions

View File

@@ -39,7 +39,7 @@ trap cleanup EXIT
pvesh get /cluster/ha/rules --output-format json | jq '[ .[] | select(.affinity == "negative") | select(.type == "resource-affinity") ]' > "$rules" pvesh get /cluster/ha/rules --output-format json | jq '[ .[] | select(.affinity == "negative") | select(.type == "resource-affinity") ]' > "$rules"
if [[ "$maintenance" == 1 ]]; then if [[ "$maintenance" == 1 ]]; then
cat "$rules" | jq -r '.[] | select(.disable == 1) | .comment' | sed 's/^/already disabled rule/g' cat "$rules" | jq -r '.[] | select(.disable == 1) | .comment' | sed 's/^/already disabled rule /g'
cat "$rules" | jq -r '.[].rule' | while read -r rule; do cat "$rules" | jq -r '.[].rule' | while read -r rule; do
pvesh set "/cluster/ha/rules/${rule}" --type resource-affinity --disable 1 pvesh set "/cluster/ha/rules/${rule}" --type resource-affinity --disable 1

View File

@@ -14,7 +14,7 @@ alias rup="restic -q -r local:/root/jc/restic/"$HOSTNAME" -p /root/jc/restic/pas
#TODO: restic -p ~/jc/restic/passwd -r local:"??no more nas??/restic/$HOSTNAME" init #TODO: restic -p ~/jc/restic/passwd -r local:"??no more nas??/restic/$HOSTNAME" init
function waitNoRunning { function waitNoRunning {
echo '- - - - - - - - Waiting VMs to migrate or shutdown 200s - - - - - - - -' echo '- - - - - Waiting for CEPH health + VMs to migrate or shutdown 200s - - - - -'
while true; do while true; do
if /root/admin_scripts/confirm_norunning.sh "$@" >/dev/null; then if /root/admin_scripts/confirm_norunning.sh "$@" >/dev/null; then
return return
@@ -33,7 +33,7 @@ function upg {
fi fi
if ! timeout 200 bash -c waitNoRunning 0; then if ! timeout 200 bash -c waitNoRunning 0; then
tgmsg 'ERROR: upg: running VMs before upgrade' tgmsg 'ERROR: upg: CEPH unhealthy or running VMs before upgrade'
return 1 return 1
fi fi
@@ -100,7 +100,7 @@ function on {
_on "$HOSTNAME" _on "$HOSTNAME"
fi fi
echo 're-enable resource affinities: ron' echo 'PENDING: to re-enable resource affinities: $ ron'
} }
alias h="echo 'avail cmds: off on roff ron | upg upgr | updl localprogress'" alias h="echo 'avail cmds: off on roff ron | upg upgr | updl localprogress'"