Commit Graph

880 Commits

Author SHA1 Message Date
Digimer
15e71768a1 * Started work on anvil-safe-start. The enable/disable logic and how it runs automatically is controlled by the database and the tool can be used to control anvil-safe-start on both the local and peer node. It will be started by ScanCore, if scancore starts within 10 minutes of the node booting. It will always be able to run manually.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-04-12 00:28:24 -04:00
digimer-bot
75343aadff
Merge pull request #70 from ClusterLabs/webui_anvil_page
* Finished the 'get_X' enpoints so far defined. Added get_servers and…
2021-04-11 16:32:03 -04:00
Digimer
942e0f66bf * Finished the 'get_X' enpoints so far defined. Added get_servers and completed get_status
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-04-11 16:26:42 -04:00
digimer-bot
9a7d9f235c
Merge pull request #69 from ClusterLabs/webui_anvil_page
* Fixed a typo that broke compiling anvil-daemon in the last commit. …
2021-04-10 01:32:07 -04:00
Digimer
5f0b7740e2 * Fixed a typo that broke compiling anvil-daemon in the last commit. Yay for CI/CD!
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-04-10 01:28:12 -04:00
digimer-bot
9aabf27fe6
Merge pull request #68 from ClusterLabs/webui_anvil_page
* THe get_cpu endpoint was completed.
2021-04-09 21:48:06 -04:00
Digimer
2384c44544
Merge branch 'master' into webui_anvil_page 2021-04-09 21:43:11 -04:00
Digimer
fb0836f912 * THe get_cpu endpoint was completed.
* The get_mmeory endpoint was completed.
* The get_replicated_storage endpoint was completed, though it requires testing and likely has issues.

To prepare for the get_status endpoint work, I needed to update ScanCore and modules to track the host_status. This commit contains the work needed for this.
* Updated ScanCore->post_scan_analysis_striker() to use configured fence devices (except PDUs) to check if a target host is off or on, in there is no host_ipmi interface. In all cases, if a machine can be confirmed on or off, the host_status is now updated.
* To support the above fence based power checks, updated scan-cluster to store the on-disk CIB in the new scan_cluster -> scan_cluster_cib colume.
* Updated ScanCore->parse_cib() to map stonith primitive IDs to fence agents. Updated ->parse_crm_mon() to not call if the executable doesn't exist to avoid unhelpful error messages in the logs when called from a Striker.
* Update DRBD->gather_data() to get the size data from /sys/block/drbd<minor>/size' x '/sys/block/drbd<minor>/queue/logical_block_size so it works when a device is Secondary (and can't be promoted).
* Updated Database->get_hosts_info() to record the short host name as well as the stored host name. Created ->update_host_status() as a wrapper to ->insert_or_update_hosts() that only updates the host status.
* Updated anvil-join-anvil to disabled ksm and ksmtuned daemons.
* Updated scancore and anvil-daemon to set the host_status to 'online' on startup.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-04-09 20:51:29 -04:00
digimer-bot
b5aa81471c
Merge pull request #66 from ClusterLabs/webui_anvil_page
Webui anvil page
2021-04-02 22:26:41 -04:00
Digimer
c2fe3a2f0a * Finished (initial) get_shared_storage.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-04-02 22:22:07 -04:00
Digimer
fa3c861a97 * Started work again on get_shared_storage
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-04-02 18:31:54 -04:00
digimer-bot
59cee0185f
Merge pull request #65 from ClusterLabs/scancore-debugging
* Fixed a bug that caused striker-initialize-host to not compile / run.
2021-04-01 11:42:10 -04:00
Digimer
70aa6a7a5b
Merge branch 'master' into scancore-debugging 2021-04-01 11:39:00 -04:00
Digimer
cd87c0f521 * Fixed a bug that caused striker-initialize-host to not compile / run.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-04-01 11:35:44 -04:00
digimer-bot
f93a5eccc9
Merge pull request #64 from ClusterLabs/scancore-debugging
* Created Storage->manage_lvm_conf() that checks / updates lvm.conf t…
2021-04-01 00:04:29 -04:00
Digimer
70dc0598f2 * Created Storage->manage_lvm_conf() that checks / updates lvm.conf to add a filter to avoid seeing DRBD devices as LVM components. This is now called from striker-initialize-host and scan-drbd.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-31 23:59:19 -04:00
digimer-bot
c2386fabd4
Merge pull request #63 from ClusterLabs/webui_anvil_page
Webui anvil page
2021-03-31 12:22:35 -04:00
Digimer
5640eda9f2 * Fixed typos for scan-filesystems in Makefile.am
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-31 12:15:40 -04:00
Digimer
82fa42fe83 * Added scan-filesystems the Makefile.am
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-31 11:56:55 -04:00
Digimer
e1a841b76f
Merge branch 'master' into webui_anvil_page 2021-03-31 01:42:27 -04:00
Digimer
59b867cc25 * Updated DRBD->gather_data() to check if drbdadm exists before trying to call it to avoid scary errors in the logs. Also moved some strings that pulled from the scan-drbd agent into the main words file.
* Fixed a bug in ScanCore->agent_startup() where a (thankfully broken) check to append tables to the 'sys::database::check_tables' would cause an infinite loop as both were pointers to the same anonymous array.
* Fixed a bug in scan-ipmitool where the scan_ipmitool_variables table didn't use a host_uuid reference, causing resyncs of that table to sync for all hosts and cause DB errors when the scan_ipmitool record from another host wasn't sync'ed yet.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-31 01:36:11 -04:00
digimer-bot
d96d351bb0
Merge pull request #61 from ClusterLabs/webui_anvil_page
* Fixed a bug where the time check to trigger a rescan test was being…
2021-03-31 00:43:07 -04:00
Digimer
581778b507 * Fixed a bug where the time check to trigger a rescan test was being turned into a string.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-30 23:58:30 -04:00
digimer-bot
50041fadd9
Merge pull request #60 from ClusterLabs/webui_anvil_page
* Fixed bugs in scan-apc-ups and scan-apc-pdu that allowed PDUs and U…
2021-03-30 23:56:52 -04:00
Digimer
bd8021cc7e
Merge branch 'master' into webui_anvil_page 2021-03-30 23:51:26 -04:00
Digimer
48d7a8d611 * Fixed bugs in scan-apc-ups and scan-apc-pdu that allowed PDUs and UPSes to be recorded duplicate times in the database. Fixed multiple bugs in scan_apc_ups from when we cloned PDU as it's base.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-30 23:40:42 -04:00
digimer-bot
3c7f202f47
Merge pull request #59 from ClusterLabs/webui_anvil_page
* Updated Database->connect to track previous connected DB count to c…
2021-03-30 18:17:55 -04:00
Digimer
265e3c74d6 * Updated Database->connect to track previous connected DB count to current one (only useful for daemons). If the connection count has not changed, a check for resync is not performed.
* Updated Database->_find_behind_databases() to not trigger a resync if the only difference in a table is the last-updated time and the difference is less than ten seconds. This should dramatically cut back on unnecessary resyncs and reduce load.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-30 16:20:04 -04:00
digimer-bot
006737bfd9
Merge pull request #58 from ClusterLabs/webui_anvil_page
* Fixed a bug in Convert-round() where the requested number of digits…
2021-03-27 00:23:07 -04:00
Digimer
9fa24750d6 * Fixed a bug in Convert-round() where the requested number of digits after the decimal place was coming back one too long. Also added logging that should have been there for a while now.
* Finished scan-filesystems!
* Realized that filesystem UUIDs are not always actual UUIDs, and so created an additonal column in filesystems -> filesystem_internal_uuid and created a normal filesystem_uuid table.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-26 23:37:01 -04:00
digimer-bot
079f724e77
Merge pull request #56 from ClusterLabs/webui_anvil_page
* Updated Database->manage_anvil_conf() to not manually create a back…
2021-03-23 06:10:38 -04:00
Digimer
3383958ada
Merge branch 'master' into webui_anvil_page 2021-03-23 06:04:22 -04:00
Digimer
ebfecf39c3 * Updated Database->manage_anvil_conf() to not manually create a backup, as Storage->write_file() creates a backup anyway (so we were getting two backups per one change).
* Updated Storage->write_file() to add a short UUID suffix to the temp file before rsync'ing to the target to help avoid source temp file name collisions in parallel running copies to different targets.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-23 06:01:45 -04:00
digimer-bot
51192ca6e5
Merge pull request #55 from ClusterLabs/webui_anvil_page
* Fixed a bug where backing up a file on a remote machine returned a …
2021-03-23 00:42:38 -04:00
Digimer
69a767e87d
Merge branch 'master' into webui_anvil_page 2021-03-23 00:39:27 -04:00
Digimer
ec192d9041 * Fixed a bug where backing up a file on a remote machine returned a failure, if the target backup directory had to be created (even if it was created successfully).
* Fixed a bug in a mini bash command to chmod / chown a directory being created on a remote machine.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-23 00:36:17 -04:00
digimer-bot
bdaa4a2ceb
Merge pull request #54 from ClusterLabs/webui_anvil_page
Webui anvil page
2021-03-22 17:07:27 -04:00
Digimer
f3bbec53ef * Fixed cgi-bin/Makefile typo
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-22 17:04:39 -04:00
Digimer
b90b18f151
Merge branch 'master' into webui_anvil_page 2021-03-22 15:24:40 -04:00
Digimer
3ed857bacd * Bumped logging for striker-auto-initialize-all debugging.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-22 15:22:46 -04:00
Digimer
254ad5323c * Got scan-filesystem to the point where it now collects the data it needs. No processing done yet though. Also reworked the SQL schema for the agent to record more data.
* Created Storage->parse_df that, shock!, parses 'df' output. Finished the long-ago started ->parse_lsblk as well.
* Created the shell of System->parse_lshw(), but there's no plans to finish it any time soon.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-19 18:22:18 -04:00
Digimer
53d654fd9d * Got scan-filesystem to the point where it now collects the data it needs. No processing done yet though. Also reworked the SQL schema for the agent to record more data.
* Created Storage->parse_df that, shock!, parses 'df' output. Finished the long-ago started ->parse_lsblk as well.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-19 18:19:29 -04:00
Digimer
296556328b * Fixed a bug in Convert->bytes_to_human_readable() to handle being passed in bytes (with the size units of 'b' ot 'bytes').
* Fixed a bug in Database->_find_behind_databases() _find_behind_databases() where the logic to figure out which column was the host_uuid reference was too liberal, causing the wrong column to be selected in some cases. Also added a check to not look for host_uuid columns on specific tables where a match would be made, but the column is allowed to be null (like server_host_uuid that indicates the host of the server).
* Started work on the scan-filesystems scan agent, which is needed to record the data that the file system UI endpoints will need.
* Removed the 'not null' constraint from 'servers' -> 'server_host_uuid'.
* Fixed a bug in 'anvil-provision-server' where the driver ISO being 'none' caused the provision script to use the driver ISO switch.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-18 00:37:17 -04:00
Digimer
5536e8ff47 * Updated Cluster->assemble_storage_groups() and Cluster->anvil_name_from_uuid() and ->available_resources() to try to detect the anvil_uuid if not passed in.
* Updated Database->insert_or_update_storage_group_members() to use the host_uuid when trying to find existing members.
* Added the skeleton of a bunch of new json endpoints for the new UI features.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-16 02:40:50 -04:00
Fabio M. Di Nitto
ea051e7916
Merge pull request #52 from ClusterLabs/fix-deps
anvil-daemon: fix Requires:
2021-03-14 05:19:32 +01:00
Fabio M. Di Nitto
bc571ce53e anvil-daemon: fix Requires:
Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
2021-03-14 05:15:55 +01:00
Fabio M. Di Nitto
9da24c08a6
Merge pull request #51 from ClusterLabs/files
build: move striker-auto-initialize-all to proper location
2021-03-13 15:08:36 +01:00
Fabio M. Di Nitto
a2e2b5b235 build: move striker-auto-initialize-all to proper location
Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
2021-03-13 15:04:46 +01:00
Fabio M. Di Nitto
2164a4b038
Merge pull request #50 from ClusterLabs/add-ci-tools
testing: distribute striker auto setup tool outside of normal PATH
2021-03-12 07:00:59 +01:00
Fabio M. Di Nitto
6709efe33b testing: distribute striker auto setup tool outside of normal PATH
Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
2021-03-12 06:56:41 +01:00