* This will, when all NICs can be accounted for, allow the reconfiguring
of the network from stored database data after a node has been
reinstalled during an 'anvil-join-anvil --rejoin' run.
Signed-off-by: Madison Kelly <mkelly@alteeve.com>
* Updated (NOT COMPLETE!) System->check_if_configured to take the new
'thorough' parameter to see if the network is no longer configured.
When used, the method attempts to detect if a host has been
rebuilt and, thus, no longer configured.
* Started work on having 'anvil-join-anvil --rejoin' try to see if the
network needs to be reconfigured prior to rejoining the cluster.
Signed-off-by: Madison Kelly <mkelly@alteeve.com>
* Added a sync call to Tools->nice_exit() to ensure logs are flushed.
* Updated Database->quote() to be in an eval block to better handle
cases where the DB handle is lost.
* Added an hourly check to anvil-daemon and moved the memory in use
check to run only once per hour.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Added an explicit 'sync' call when writing to logs. TO BE REMOVED!
* Disabled anvil-monitor-daemons and anvil-monitor-performance in case
this is somehow trigging program exits.
* Converted prints to Log->entry calls in anvil-change-password
* Added PID state info logging for running jobs.
Signed-off-by: digimer <mkelly@alteeve.ca>
* This is meant to deal with a case where, when a DB is added to
anvil.conf but that new entry is not yet in hosts, the program crashes
because of a duplicate key when calling insert_or_update_hosts for all
DBs.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Created Database->get_mac_to_ip()
* Updated Database->insert_or_update_mac_to_ip() to find an entry using
both the IP and MAC address.
* Updated Network->get_ips() to store only the first IP it finds on an
interface as the main IP (for use in /etc/hosts, etc) and to store it
and any other IPs in a new hash.
* Updated scan-network to use the new hash above to record them in the
'mac_to_ip' table. Similarly, before marking an IP as removed, it
checks to see if it's an alternate IP.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Renamed the old ->wait_for_networks() to be ->wait_for_nm_online().
* The new ->wait_for_networks() waits for all interfaces we manage to be
'activated' before returning.
Signed-off-by: digimer <mkelly@alteeve.ca>