simplified priority evaluation pipeline
This commit is contained in:
parent
35c4a96641
commit
9004e2bb6e
|
@ -20,7 +20,7 @@ function log {
|
||||||
case $1 in
|
case $1 in
|
||||||
start)
|
start)
|
||||||
# determine the order of VMs by boot priority
|
# determine the order of VMs by boot priority
|
||||||
ORDER=$(vmadm lookup -j -o uuid,tags | json -c 'this.tags.priority > 0' -a uuid tags.priority | sort -nk2 | cut -d " " -f1)
|
ORDER=$(vmadm list -Ho uuid,tags.priority -s tags.priority tags.priority='~[^0]' | cut -d " " -f1)
|
||||||
log start-up order determined as: $ORDER
|
log start-up order determined as: $ORDER
|
||||||
|
|
||||||
# start guests
|
# start guests
|
||||||
|
@ -42,7 +42,7 @@ case $1 in
|
||||||
|
|
||||||
stop)
|
stop)
|
||||||
# determine the order of VMs by reverse boot priority
|
# determine the order of VMs by reverse boot priority
|
||||||
ORDER=$(vmadm lookup -j -o uuid,tags state=running | json -a uuid tags.priority | sort -rnk2 | cut -d " " -f1)
|
ORDER=$(vmadm list -Ho uuid,tags.priority -s -tags.priority state=running | cut -d " " -f1)
|
||||||
log shutdown order determined as: $ORDER
|
log shutdown order determined as: $ORDER
|
||||||
|
|
||||||
# stop guests
|
# stop guests
|
||||||
|
|
Loading…
Reference in New Issue