Commit Graph

3159 Commits

Author SHA1 Message Date
Digimer
c0dd34334e * Fixed another bug in making ocf:alteeve:server work in pacemaker.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-21 01:14:10 -04:00
Digimer
ed2e83a1a4 * Fixed a few more bugs in 'ocf:alteeve:anvil', but it's still failing when invoked by pacemaker.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-20 23:46:59 -04:00
Digimer
f5caec52dc * Made DRBD->allow_two_primaries() smarter about finding the 'target_node_id' when it wasn't passed.
* Fixed a couple bugs, and now ocf:alteeve:server properly can pull and push servers between nodes.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-20 00:59:41 -04:00
Digimer
113a44ecc6 * Got 'migrate_to' working in ocf:alteeve:server. 'migrate_from' still needs work.
* Created DRBD->allow_two_primaries() and ->reload_defaults() that enables (and resets/disables) dual-primary operation (allow-two-primaries=yes), used to enable live migration.
* Created Remote->test_access() that simply verifies that a remote target can be accessed (as a given user).
* Created Server->migrate() that actually migrates a server. It can push already, and pull will be added next.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-16 01:41:47 -04:00
Digimer
7db542b9b0 * Fixed a bug where definition files that used '<source file='X'/>' instead of '<source dev='X'/>' for the backing block device for disks.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-14 01:48:36 -04:00
Digimer
873ed3e2b0 * Fixed some typo bugs.
* Added stop_drbd_resources() to ocf:alteeve:server.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-12 23:15:13 -04:00
Digimer
dff74102db * Create (but not yet tested) Server->shutdown() to, well, shutdown servers.
* Modified Server->boot() to now only work locally. Also updated it to optionally take the XML definition path for the server to boot.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-10 01:35:08 -04:00
Digimer
d224be9344 * Created DRBD->manage_resource() that allows for up/down/primary/secondary'ing a resource on a local or remote system.
* Created Server->boot() that starts a server and verifies that it did actually start.
* Got ocf:anvil:server smarter about starting DRBD resources, properly handing resources where auto-promote isn't enabled. The 'start' process is now complete (baring bugs).

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-08 22:58:21 -04:00
Digimer
b1ddf945e2 * Got ocf:alteeve:server working again to boot servers. It's now smarter, knowing when the server is running locally already (success), running on the other node (hard error) and running on DR (fatal error).
* Updated DRBD->get_devices() to store data all under 'drbd::config::<host>::x'.
* Created Server->find() that takes a target and collects the servers running on it.
* Updated System->check_storage() to redirect all calls STDERR to /dev/null to supress errors about failing to open /dev/drbdX when LVM's filter isn't setup.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-08 01:10:38 -04:00
Digimer
324ef351fe * Updated DRBD->get_devices() to properly identify the peer node, when run on an actual node in the cluster (not DR or Striker).
* Created System->active_lv() that, surprise, activates an inactive logical volume. Also created ->check_storage() that parses out the LVM data.
* Fixed a bug in tools/fence_pacemaker that was preventing it from compiling and running.
* Updated ocf:alteeve:server to validate the target server's storage.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-06 23:31:35 -04:00
Digimer
16f79ca244 * Created System->get_bridges() that gets a list of bridges (and connected interfaces, and data). Also created ->get_free_memory() that returns the amount of available RAM.
* Got ocf:alteeve:server validating bridges.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-03 01:38:12 -04:00
Digimer
4a93682447 * Started rebuilding ocf:alteeve:server using the new module methods.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-02 00:06:06 -04:00
Digimer
948ef37172 * Finished (for now) Server->_parse_definition.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-08-01 20:17:40 -04:00
Digimer
0248080143 * Continued work on parsing server XML data.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-31 01:07:49 -04:00
Digimer
7a7e3db0c1 * Created DRBD->get_devices() that finds and maps the /dev/drbdX devices to their resources and backing LVs.
* Got Server->get_status() and ->_parse_definition() pulling out all but the device bus data from the XML files. Under devices, started parsing, with 'channel' devices now being parsed.
* Fixed a bug in several Storage->X calls where the test to see if a 'target' was the local host or not wasn't smart enough.
* Purged 'ocs:alteeve:server' to prepare for the rewrite where a lot of the logic is being moved into the Anvil::Tools modules as their functionality will be needed elsewhere anyway.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-30 02:10:04 -04:00
Digimer
312c949648 * Actually added the new Anvil::Tools::DRBD module, as well as a new ::Server module that will handle anything related to the virtual servers.
* Started a re-write of the ocf:alteeve:server resource agent. It has bugs and is missing logic, and trying to clean it up given most of the bugs come from trying to clean up the original agent doesn't make sense. Moving much of the logic into module methods as the functions will be needed elsewhere anyway.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-25 01:12:25 -04:00
Digimer
63a86b685a * Finished Anvil::Tools::DRBD->get_status().
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-24 00:43:20 -04:00
Digimer
0f873c45b5 * Created the new Anvil::Tools::DRBD moduke to hold all DRBD related stuff. Started working of ->get_status, still very much a work in progress.
* Started working on ocf:alteeve:server to make it smarter (and more patient) when bringing a DRBD resource up so we don't get false failures when we hit a race.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-23 02:37:14 -04:00
Digimer
f294d48777 * Updated notes with working pcs config example (enable, disable and migrate all work!)
* Minor fix to ocf/alteeve/server to not print anything except the XML meta information when requested

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-20 01:36:02 -04:00
Digimer
a5761df894 * Got migration (push and pull) working.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-19 01:05:30 -04:00
Digimer
0dc2e5d2e9 * Fixed up an issue with down'ing resources under a server after it's shut down.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-18 03:18:38 -04:00
Digimer
3cf1ad2ff8 * Fairly heavy rework of ocf:alteeve:server to update how it handles storage during server start. It now properly handles the new "one resource, multiple volumes" and "start resource, not daemon" approach.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-18 02:53:05 -04:00
Digimer
7e4a170382 * Fixed a bug where Tools.pm->_anvil_version() and Get->host_uuid() were storing values in the wrong $anvil hash.
* Fixed a bug where Get->host_uuid() wasn't reading from the host.uuid file.
* Updated Remote->call() to record a target's fingerprint when needed.
* The ocf:alteeve:server resource agent now properly stopps a server and the corresponding DRBD resource.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-17 02:41:05 -04:00
Digimer
b56fbf923c * Finished the initial convertion of ocf:alteeve:server to use Anvil::Tools.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-16 00:14:13 -04:00
Digimer
c0220c9635 * Continues work on migrating ocf:alteeve:server to use Anvil::Tools.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-14 01:01:50 -04:00
Digimer
9c0f6b8f79 * Added automatic 'echo return_code:$?' to System->call and Remote->call which is parsed out and returned automatically on all calls.
* Started porting ocf:alteeve:server to use the Anvil::Tools module and updating it for RHEL 8.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-13 04:16:03 -04:00
Digimer
302a8aade9 * Fixed some bugs in tools/anvil-manage-firewall, it's working again (though new features are pending).
* Moved firewall.txt out of the templates directory and into the tools directory so that it is accessible on nodes and DR hosts (which don't get the apache files).

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-09 02:01:05 -04:00
Digimer
e55594f58f * Notes updated with working network config for RHEL 8 proper. Two notes; Creating a BCN bridge by default, and switch the DR third octet to 12 (13 for IPMI) and fourth octet to sequence number.
* Fixed a bug in System->get_ips() where DHCP-assigned IPs were not being parsed properly to get the default gateway.
* Added the alteeve-el8-repo to the kickstart files install package list.
* Updated anvil-daemon to sleep 2 seconds between loops, instead of 1. Added a check to 'check_firewall' to not run until after the system has been configured.
* Quieted a lot of logging.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-07-05 01:36:21 -04:00
Digimer
44f8fa2e21 * Missed a couple packages needed to install Striker over PXE.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-06-28 01:19:52 -04:00
Digimer
188ecdbbd7 * Improved handling of missing RPMs when downloading RPMs for tools/striker-manage-install-target's repo.
* Updated package list to fix changed dependencies from RHEL 8 beta to final.
* Changed anvil_daemon to only check DHCP once per minute instead of every loop.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-06-28 00:37:08 -04:00
Digimer
e54ca987e8 * Fixed a few bugs (typos and such) to update the RPMs for the new RHEL 8 proper repo.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-06-25 22:31:19 -04:00
Digimer
ae095ab85a * Updated the RPM build order and list for RHEL 8 final.
* Replaced 'screen' with 'tmux' in the spec file.
* Fixed a couple typos in the SQL schema that prevented it from loading.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-06-24 17:54:52 -04:00
Digimer
d92a6225c7 * a small note for myself.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-05-23 21:05:08 -04:00
Digimer
5d91211dff * Continued work on 'anvil-download-file', in-progress adding support for job processing.
* Updated Database->insert_or_update_jobs() to use job_data when looking for a job uuid. Also fixed logging and adapted 'jobs::X' variable feeding to prevent them being undefined. Also made the search find jobs with the program name anywhere in the string, instead of just the start of the strong.
* Started work on Jobs->update_progress() to handle updating downloading file information.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-04-04 12:27:27 -04:00
Digimer
605c3c4ffb * Got anvil-download-file downloading files. Much testing is needed, and it's just the barebones so far.
* Added to Convert->time the 'translate' parameter that controls if the returned string is already translated or not.
* Updated Storage->change_mode and ->change_owner to rename the parameter 'target' to 'path' to help prevent future confusion woth most other instances of the 'target' parameter meaning a target machine.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-29 02:51:47 -04:00
Digimer
c41adb17ff * Finished converting Remote->call() to use Net::OpenSSH. Also updated all calls to this method to expect the output as a single (sometimes multi-line) string instead of an array reference. Also updated all calles to expect 'output' first, 'error' second.
* Added a 'timeout' parameter to Remote->call() to limit the time that a command on a remote host can run, with a default of '10' (seconds).

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-27 02:16:45 -04:00
Digimer
559dbafb39 * Finished Convert->time (needs testing).
* Started reworking Remote->call to use Net::OpenSSH instead of Net::SSH2.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-22 00:57:53 -04:00
Digimer
b1326e1b4e * Created tools/anvil-download-file which will handle downloading, aborting and reporting status of downloads.
* Started working on Convert->time().
* Changed anvil-manage-files skip /mnt/shared/temp when looking for files to add to the database.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-15 02:40:44 -04:00
Digimer
beb1197c1b * Finished support for deleting files (locally and globally) using anvil-manage-files.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-14 01:13:49 -04:00
Digimer
dc95b8c4e3 * Got anvil-manage-files able to find and pull down missing files.
* Added 'expect' the anvil-core spec requirements.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-12 02:27:31 -04:00
Digimer
e8afd2efe4 * Created anvil-file-details that is (meant to be) called by anvil-file-details on a remote machine.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-08 00:27:30 -05:00
Digimer
48d9f70c87 * Started the new Database->get_alert_recipients() method.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-06 14:02:18 -05:00
Digimer
27ba3dcbb9 * Created Database->read() to store and return the handle to whichever database is used for read operations. Also created Database->quote that uses ->read to access the DBI 'quote' method more cleanly. Updated all calls to use these new methods.
* anvil-manage-files now identifies peers on the same subnet(s) and stores them in a sortable hash.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-06 01:49:59 -05:00
Digimer
040f189ea6 * Finished (barring bugs) the SSH handling in anvil-daemon. Now, keys added to the database (machine and user's) will auto-propegate out to any other machines in the cluster (all machine types).
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-05 01:26:21 -05:00
Digimer
ff5ef43940 * Continued work on the ssh configuration system in anvil-daemon.
* Created Database->insert_or_update_host_keys().

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-03-01 01:42:12 -05:00
Digimer
80e7bc5ce0 * Started work on a system to provide inter-machine ssh communication without needing to track or record passwords in the database or config files (outside the database access passwords). Added 'host_key' to the 'hosts' table that stores the host public key. Also now create ssh public/private key pairs for the 'root' and 'admin' users.
* Fixed some bugs in anvil-update-states so that bonds are recorded properly in the database.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-02-27 00:23:03 -05:00
Digimer
47280c8fd9 * Added 'files -> file_directory' to help distinquish cases where two different files of the same name exist in different directories.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-02-22 02:10:55 -05:00
Digimer
529c12d2e2 * Updated anvil-manage-files to scan all /mnt/shared/* directories to search for new files. Only files in incoming are moved though, as before. Starting work on pulling files now.
* Updated the files table to add the file_mtime. In the future, if two versions of the same file exists on different machines, the one with the more recent mtime will be copied over the others.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-02-21 23:57:26 -05:00
Digimer
d9e9884e53 * Created Storage->move_file().
* Finished getting anvil-manage-files to find and process new files in /mnt/shared/incoming. Created a 'convert_mimetype' function to translate returned mimetype to a file type we care about.

Signed-off-by: Digimer <digimer@alteeve.ca>
2019-02-21 01:37:51 -05:00
Digimer
e3d11fd938 * Did some more work on anvil-manage-files.
Signed-off-by: Digimer <digimer@alteeve.ca>
2019-02-15 01:50:38 -05:00