Commit Graph

69 Commits

Author SHA1 Message Date
Digimer
d647014ad1 * Created (finished but not yet tested) DRBD->update_global_common() to update DRBD's global_common.conf file.
* Cleaned up a lot of log levels.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-08-07 23:12:11 -04:00
Digimer
ef208fd3fb * Finished the logic for adding stonith devices and levels to pacemaker! More testing is needed though, bugs expected, but it adds them.
Signed-off-by: Digimer <digimer@alteeve.ca>
2020-08-06 17:45:43 -04:00
Digimer
c27cc7507f * Renamed striker-parse-fence-agents to anvil-parse-fence-agents and changed anvil-daemon to run it on all machines.
* Cleaned up a lot of logging.
* Updated Cluster->parse_cib() to track if a stonith device has 'delay' set.
* Got a lot more work done on anvil-join-anvil's stonith processing, but it still isn't complete. Updated it to change shell user passwords as well.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-08-06 01:20:53 -04:00
Digimer
61f4dcc41f * Updated Cluster->parse_cib() to pull out fencing (stonith) devices and levels.
Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-31 01:45:20 -04:00
Digimer
3c2f25a860 * Added 'fence_delay' fence agent to handle the corner cases where an IPMI BMC had crashed until a power cycle, and PDU fencing was effected, but failed to report as such.
* Updated Cluster->parse_cib() to take a CIB as a parameter.
* Fixed a bug in Database->get_hosts() where loading the host_ipmi value was filtered through Log->is_secure.
* Updated Striker->get_fence_data() to parse the switches to make it easier to map a fence agent's command line switches to STDIN arguments.
* Created System->parse_arguments() that converts a series of command line switches and their values into a hash. It's similar to Get->switches(), but works on any string.
* Continued work on anvil-join-anvil's fence configuration logic.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-30 00:23:47 -04:00
Digimer
d2d5d7b460 * Fixed a bug in Striker->load_manifest() where fences were parsed twice, the second time missing a hash reference.
* Updated striker to now only offer gateway for IFN networks. EL8 seems to ignore 'GATEWAY="x"' in interface configs which caused anvil-join-anvil to always think an interface needs to be updated. Updated as well to remove DNS entries set in interfaces that are not the default gateway.
* Fixed a bug where DNS entries were being missed, causing entries to be repeatedly added to the interface that was the gateway interface.
* In anvil-update-states, added Get->switches() so that verbosity switches are used.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-28 00:59:02 -04:00
Digimer
dcfdf1127c * Got more work done on System->configure_ipmi(). It should now configure the IP address, subnet mask and default gateway using information from the manifest and anvil-join-anvil data.
Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-22 03:00:44 -04:00
Digimer
1fa63d2ea3 * Added 'anvil_uuid' as a set parameter in Database->get_hosts().
* Added calling 'debug => $debug' in System->X methods.
* Got more work done on System->configure_ipmi(). It should now determine if a BMC exists and pull the OEM and network details automatically.
* Updated anvil-configure-host to log more data in an attempt to find a reproducer for an odd bug where (apparently) a host was picking up the wrong job data meant for another host.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-21 02:00:56 -04:00
Digimer
345d2e33d4 * Updated Cluster->parse_cib() to pre-fill some hashes to avoid undefined errors.
* Updated Storage->rsync() to only create the rsync wrapper if a password was given, allowing for rsync to work to/from a remote system when passwordless SSH is enabled.
* Updated anvil-join-anvil to disable/stop drbd.service, and to properly wait until both nodes are online.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-16 12:40:53 -04:00
Digimer
dcd1fd1492 * Created Cluster->check_node_status() that checks the status of a node (in pacemaker).
* Created Cluster->get_peers() that figures out who the peer node (and DR host, if applicable) are.
* Updated Cluster->parse_cib() to dig out more information.
* Created Cluster->start_cluster() to start pacemaker (via pcsd) locally or on all (both) nodes.
* Started working on ocf:alteeve:server to start/stop the libvirtd/drbd daemons as needed, instead of having pacemaker do it.
* Got more work done on anvil-join-anvil. Node 2 now waits for the cluster to start, and node 1 will do setup as needed, then wait for the cluster to start as well.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-15 18:40:37 -04:00
Digimer
597d9413a5 * Created the skeleton Cluster.pm.
* Got anvil-join-anvil to the point where is initializes and starts the cluster.
* Deleted the old ssh key handling logic in anvil-daemon.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-10 00:49:30 -04:00
Digimer
76b6550ac6 * Created Database->get_ip_addresses() that pulls the IPs out and stores them in a hash that allows for easy referencing to associated interfaces and networks.
* Created Get->trusted_hosts() that finds the dashboards the host uses and, if the host is in an Anvil!, the peers in the same anvil.
* Created (but not finished yet) System->update_hosts() that will add and edit entries for all IPs to trusted hosts.
* Fixed a logging bug in Striker->load_manifest().
* Fixed a bug in System->call where, the the output from the shell call didn't end in a new-line, it would not parse the return code and lease the return code string appended to the shell output.
* Fixed a big in System->change_shell_user_password() where a new-line (\n) meant for the shell call wasn't escaped properly. There was also a duplicate 'return_code' variable preventing the actual return code from being read.
* Got more work done on anvil-join-anvil to update the hacluster password (when needed).

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-03 18:11:56 -04:00
Digimer
aa2fdfb609 * Fixed a bug in Database->get_anvils() that was clearing the manifests hash.
* got anvil-join-anvil working up to the start of configuring pacemaker.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-07-03 00:49:08 -04:00
Digimer
453f5c6223 * Fixed a bug where $anvil->nice_exit() was being passed 'exit' instead of 'exit_code' as a parameter.
* Update striker manifest run to add an entry into the 'anvils' table, and pass the anvil_uuid to the jobs rather than the various host_uuid's.
* Fixed a bug in the 'anvils' SQL procedure that copied data into the history schema (a few columns were missing).
* Updated anvil-configure-host to reboot when finished to be certain network changes have taken effect. Also updated the handling of virsh bridges to delete the autostart symlinks if libvirtd daemon isn't running.
* Added some logic to anvil-daemon to call 'anvil-update-states' with the -v{1,3} flag depending on the active debug level.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-06-24 00:39:56 -04:00
Digimer
726a4374d1 * Renamed the database table 'host_keys' to 'ssh_keys' to better represent what it stores.
* Updated 'variables' -> 'variable_source_uuid' to type 'uuid' and removed the 'not null' constraint.
* Updated Database->insert_or_update_variables() to check/update 'variables_source_table' and 'variables_source_uuid'.
* Created the 'trusts' database table which will, when done, tell anvil-daemon which users@machines to trust (setup passwordkess SSH).
* Created (but not finished) System->manage_authorized_keys() and moved the logic over to it from anvil-daemon.
* Changed the host types "dashboard" to "striker".
* Moved the following methods from 'System' to 'Get';
** System->get_host_type to Get->host_type
** System->get_bridges to Get->bridges
** System->get_free_memory to Get->free_memory
** System->get_os_type to Get->os_type
** System->get_uptime to Get->uptime
* Updated striker to include the host_uuid for the 'node1', 'node2' and (if chosen) 'dr1' when running a job manifest.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-06-10 18:26:50 -04:00
Digimer
e9e18f8e3b * Fixed a bug where the interface name wasn't quoted when down/up'ing an interface.
Signed-off-by: Digimer <digimer@alteeve.ca>
2020-06-03 23:36:25 -04:00
Digimer
530fb31478 * Updated Jobs->get_job_details() to use --job-uuid switch or, failing that, look for an incomplete on this host with the same command as the calling program.
* Got anvil-join-anvil to the point that it reworks the network configs, updates MTUs and configured NTP.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-06-03 21:52:13 -04:00
Digimer
7a247aca4e * Fixed a bug in Database->insert_or_update_bonds() where 'bond_bridge_uuid' is NULL would cause a SQL error.
* Updated Database->insert_or_update_ip_addresses() to search for an existing entry by 'ip_address_on_uuid' first, when possible.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-05-28 15:16:00 -04:00
Digimer
613a7f0c58 * Created the new anvil-join-anvil tool that will run on nodes and the DR host to pick up the job to join an Anvil! system.
* Finished the saving of a "run manifest" job menu. Included filtering out potential machines already in other Anvil! systems from the select box and updating the password fields to not trigger a browser to save/auto-complete the field.
* Fixed a bug in Database->get_hosts() caused by the attempt to immediately return with a 0 if it had been called before. Now a check is made in ->insert_or_update_manifests() where the recursive loop was possible.
* Updated the RPM spec to v.33 after releasing .32 after the last commit. Also added the core requirement for perl-Data-Validate-Domain.

Signed-off-by: Digimer <digimer@alteeve.ca>
2020-05-27 22:39:00 -04:00