Putting the working server in a failover pair into "partner down" state
  • 29 Dec 2020
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Putting the working server in a failover pair into "partner down" state

  • Dark
    Light
  • PDF

You can either edit the leases file or do this via omshell/OMAPI.

To change via the leases file:

Stop the server, then look for the last failover statement:

failover peer "Failover-Pair-Name" state {
  my state state at 1 date;
  partner state state at 1 date;
}

Data will vary depending on your machine, actual date, etc. In the "my state" section, change from the existing state to "partner-down":

failover peer "Failover-Pair-Name" state {
  my state partner-down at 1 date;
  partner state state at 1 date;
}

Leave the date and everything else as is. Restart the server.

To change via omshell/OMAPI:

omshell << EOF
server localhost
key omapi_key "XXX=="
connectnew failover-state
set name = "foo"
openset local-state = 4
update
EOF

Note that you will have to enable OMAPI in your dhcpd.conf file to use omshell:

# To enable OMAPI
omapi-port 7911;
key omapi_key {
        algorithm HMAC-MD5;
        secret "XXXX==";
};
omapi-key omapi_key;