Changes
Page history
other reboot host lists examples
authored
May 07, 2024
by
anarcat
The "needs reboot and physical" is particularly useful for fleet-wide reboots.
Show whitespace changes
Inline
Side-by-side
howto/upgrades.md
View page @
bdd787e5
...
...
@@ -299,14 +299,20 @@ defined to `justdoit` or `rotation`:
echo "rebooting 'rotation' hosts with a 10-minute delay, every 30 minutes...."
./reboot -H $(ssh db.torproject.org 'ldapsearch -H ldap://db.torproject.org -x -ZZ -b ou=hosts,dc=torproject,dc=org -LLL "(rebootPolicy=rotation)" hostname | awk "\$1 == \"hostname:\" {print \$2}" | sort -R') --delay-shutdown=10 --delay-hosts=1800
Another example, this will reboot all hosts running Debian
`bookworm`
:
Another example, this will reboot all hosts running Debian
`bookworm`
,
in random order:
./reboot -H $(ssh puppetdb-01.torproject.org "curl -s -G http://localhost:8080/pdb/query/v4 --data-urlencode 'query=inventory[certname] { facts.os.distro.codename = \"bookworm\" }'" | jq -r '.[].certname' | sort -R)
And this will reboot all hosts with a pending kernel upgrade (updates only when puppet agent runs):
And this will reboot all hosts with a pending kernel upgrade (updates
only when puppet agent runs), again in random order:
./reboot -H $(ssh puppetdb-01.torproject.org "curl -s -G http://localhost:8080/pdb/query/v4 --data-urlencode 'query=inventory[certname] { facts.apt_reboot_required = true }'" | jq -r '.[].certname' | sort -R)
And this is the list of all
*physical*
hosts with a pending upgrade, alphabetically:
./reboot -H $(ssh puppetdb-01.torproject.org "curl -s -G http://localhost:8080/pdb/query/v4 --data-urlencode 'query=inventory[certname] { facts.apt_reboot_required = true and facts.virtual = \"physical\" }'" | jq -r '.[].certname' | sort)
## Rebooting Ganeti nodes
See the
[
Ganeti reboot procedures
](
howto/ganeti#rebooting
)
for this procedure.
...
...
...
...