Field notes: The tool that fell with it
Graceful shutdown that couldn't reach the hosts, and logs that vanished with the cluster. Same root cause both times.
Graceful shutdown is what turns a power cut into a controlled event instead of a crash: when the UPS goes to battery, a tool shuts down the virtual machines and hypervisors in the right order before the battery runs out. It works – if the tool can reach what it is supposed to shut down.
The symptom
During a test of the automation, shutting down the hosts failed. The tool could talk to vCenter and read the UPSs, but the actual shutdown step against the hypervisors fell over.
The easy assumption
When an automation job fails, you look in the job first: wrong account, wrong password, wrong order in the scenario. It was none of those.
How I isolated it
I followed the path instead of the configuration. The tool sat in one VLAN, hypervisor management in another. Between them was a firewall, and the rules for the tool let two things through: HTTPS to vCenter and SNMP to the UPSs. Shutting down the hosts goes over SSH – and SSH wasn't allowed between the two networks.
The root cause
The firewall rules had been written for what the tool monitors, not for what it does when it matters.
The fixes
- Write firewall rules for the tool's whole chain: what it reads, what it sends and what it must be able to do for real.
- Test the whole chain, not just that the tool can see the UPS.
- Make sure the shutdown tool reaches the UPS and the hosts over a path that doesn't fail along with what it protects.
# How to test the whole chain – from the tool's network, not from your own computer $ nc -vz <vcenter> 443 Connection to <vcenter> 443 port [tcp/https] succeeded! $ nc -vz <host> 22 nc: connect to <host> port 22 (tcp) failed: Connection timed out
The lesson
Always ask: what happens to the tool if it lives on the infrastructure it is meant to save? Monitoring, logging, backup and shutdown should be the last things to fall – not the first.