* This was added so that, in Database->reconnect(), no attempt is made
to update or disconnect from the DBs, preventing problems when the
target DB was unexpectedly lost.
Signed-off-by: Madison Kelly <mkelly@alteeve.com>
* 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 Database->get_variables() to store columns with
variable_source_table values in a more useful hash.
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>
* Updated Database->reconnect() to take 'lost_uuid' and, if passed,
deletes the cached file handle before calling ->disconnect().
* Updated Database->query() to return an empty hash reference instead of
'!!error!!', as almost always, callers do an array count, which
triggered errors as it's not a hash reference. Updated docs to reflect
this.
Signed-off-by: Madison Kelly <mkelly@alteeve.com>
* Updated Database->query() to track when a specific DB to read from is
passed. If so, and that is lost, return an error. If not, and another
DB is available, switch to it.
* Updated Database->write() to skip trying to write to a lost DB.
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>