From 7b54bc44000a5e2aeca595665b6a7c4206ee1f92 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Thu, 25 Jan 2024 21:22:04 -0600 Subject: [PATCH] nut-monitor: Require both UPS to be online Unfortunately, the automatic transfer switch does not seem to work correctly. When the standby source is a UPS running on battery, it does *not* switch sources if the primary fails. In other words, when the power is out and both UPS are running on battery, when the first one dies, it will NOT switch to the second one. It has no trouble switching when the second source is mains power, though, which is very strange. I have tried messing with all the settings including nominal input voltage, sensitivity, and frequency tolerence, but none seem to have any effect. Since it is more important for the machines to shut down safely than it is to have an extra 10-15 minutes of runtime during an outage, the best solution for now is to configure the hosts to shut down as soon as the first UPS battery gets low. This is largely a waste of the second UPS, but at least it will help prevent data loss. --- group_vars/nut-monitor.yml | 2 +- host_vars/vmhost0.pyrocufflink.blue.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/group_vars/nut-monitor.yml b/group_vars/nut-monitor.yml index 2977b35..b82bfbb 100644 --- a/group_vars/nut-monitor.yml +++ b/group_vars/nut-monitor.yml @@ -7,5 +7,5 @@ nut_monitor: powervalue: 1 username: '{{ ansible_hostname }}' password: '{{ nut_monitor_password }}' -nut_monitor_minsupplies: 1 +nut_monitor_minsupplies: 2 nut_monitor_shutdowncmd: /sbin/shutdown -h +0 diff --git a/host_vars/vmhost0.pyrocufflink.blue.yml b/host_vars/vmhost0.pyrocufflink.blue.yml index 5d0f714..3e14615 100644 --- a/host_vars/vmhost0.pyrocufflink.blue.yml +++ b/host_vars/vmhost0.pyrocufflink.blue.yml @@ -46,7 +46,6 @@ networkd_networks: samba_interfaces: - enp5s0 -nut_monitor_minsupplies: 2 nut_monitor_password: !vault | $ANSIBLE_VAULT;1.1;AES256 33336330623563356364343833616665343930643764333863613036303530396232333062326466