* 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>
Added the call to Network->wait_for_network to pause scancore and
anvil-daemon startups until NetworkManager says it's up and running.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Added a default timeout of 180 seconds, and updated
anvil-configure-host to reduce this to 60 seconds while configuring
the host.
* Added a check for interfaces configured under a bond. If none are
found, the bond is ignored.
* Updated Storage->update_config() to take the new 'append' attribute to
allow adding a variable if it wasn't found already in the config.
* Added the new 'network::wait_for_bonds::timeout' variable to enable
changing the default timeout for Network->wait_for_bonds().
Signed-off-by: digimer <mkelly@alteeve.ca>
This tool (and it's parent 'anvil-monitor-daemons' daemon) simplies
starting, stopping, enabling, and disabling all Anvil! daemons.
More importantly, the daemon will monitor for failed daemons and attempt
to restart them.
Signed-off-by: digimer <mkelly@alteeve.ca>
booting an unexpectedly off host and only update it's power state if the
boot actually succeeded.
* Started work on a new anvil-manage-daemons tool and
anvil-monitor-daemons systemd unit.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Updated anvil_join_anvil->wait_for_etc_hosts() to add the short host
name and the FQDN to the /etc/hosts file using the first BCN network's
IP address.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Updated anvil-provision-server to only call add_server_to_cluster() if
it's NOT the peer.
* Added the new 'ok_if_exists' parameter to Cluster->add_server() to
return 0 if the server already existed in pacemaker as a resource.
Signed-off-by: digimer <mkelly@alteeve.ca>
This is required as we need to be able to ssh into peer strikers and
into nodes and DR hosts during initialization.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Updated Job->update_progress() to log and return if there are not DB
connections.
* Bumped some logging in Database->connect().
* Deleted ifcfg code from anvil-configure-host.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Network->find_matches() was trying to compare two IPs when the second
IP wasn't actually defined.
* Disabled scancore's blocking of running before the host is configured.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Database->get_ip_addresses() was marking IPs that weren't on a network
we managed, the IP would be marked as DELETEd, which caused problems
with initializing targets, and it generated a lot of repeat alerts.
* Updated logging in Network.pm to help with debugging.
Signed-off-by: digimer <mkelly@alteeve.ca>
* Network->collect_data() wasn't deleting old data before rescans.
* anvil-configure-host wasn't checking links that should be in a bond if
the bond already existed.
Signed-off-by: digimer <mkelly@alteeve.ca>