Commit Graph

812 Commits

Author SHA1 Message Date
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
digimer-bot
f07f77d060
Merge pull request #49 from ClusterLabs/auto-build-anvil
* Removed debug logging from tools.
2021-03-10 21:18:43 -05:00
Digimer
5e9e7e4dde * Removed debug logging from tools.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-10 21:14:56 -05:00
digimer-bot
350de4e97f
Merge pull request #48 from ClusterLabs/auto-build-anvil
* Added a check to Database->get_ip_addresses() to check is a hash is…
2021-03-10 20:46:32 -05:00
Digimer
b308199856
Merge branch 'master' into auto-build-anvil 2021-03-10 20:41:22 -05:00
Digimer
54496cbeb0 * Added a check to Database->get_ip_addresses() to check is a hash is set before using it, to help avoid unitialized variable messages.
* Updated Remote->test_access() to not used cached SSH access.
* Updated anvil-configure-host to abort if the host is in a cluster.
* Updated anvil-join-anvil to clean up some variable checks to help avoid unitialized variable messages.
* Updated striker-initialize-host to check if an anvil RPM is installed and, if so, not install the Anvil! repo.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-10 20:35:05 -05:00
digimer-bot
5d5cb0158e
Merge pull request #47 from ClusterLabs/auto-build-anvil
* Updated anvil-join-anvil to actively call a cluster start once per …
2021-03-10 14:24:57 -05:00
Digimer
a12a144d71
Merge branch 'master' into auto-build-anvil 2021-03-10 14:20:08 -05:00
Digimer
5db09f565d * Updated anvil-join-anvil to actively call a cluster start once per minute while waiting for initial startup.
* Added a check to striker-initialize-host the see if anvil-X RPM is already installed. If so, it will not install the Alteeve repo, even if it's not found.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-10 14:14:04 -05:00
digimer-bot
66ef8af014
Merge pull request #46 from ClusterLabs/auto-build-anvil
* Updated Log->entry() to prefix log lines with the short 'job-uuid',…
2021-03-10 02:34:50 -05:00
Digimer
3733220b50 * Updated Log->entry() to prefix log lines with the short 'job-uuid', when the log entry is coming from a program running as a job. This is meant to make it easier to break up what log lines belong to what jobs, if multiple jobs are running at the same time (ie: when initializing multiple nodes / dr hosts in parallel).
* Updated Remote->call() to return ('!!error!!', '!!error!!', 9999) when an error hits. Made Remote->test_access() explicitely check for '1' to be returned in order to confirm access, fixing a bug where bad target value caused false positives. Updated ->_check_known_hosts_for_target() to no longer explicitely check for 'ssh-rsa' so that machine keys using different cyphers are detected as being in known_hosts properly.
* Updated striker-auto-initialize-all to initialize nodes and DR hosts networks before trying to form them into an Anvil!. Fixed several other bugs as well. More testing is needed, but it works now.
* Updated striker-initialize-host to check for the alteeve repo and, it not found, check for accress to alteeve.com. If access, it will install our repo now.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-10 02:26:09 -05:00
digimer-bot
560c8da4c2
Merge pull request #45 from ClusterLabs/auto-build-anvil
Auto build anvil
2021-03-09 11:12:55 -05:00
Digimer
55ff964d0e
Merge branch 'master' into auto-build-anvil 2021-03-09 11:09:30 -05:00
Digimer
53eefee56c * Re-enabling tools/striker-auto-initialize-all.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-09 11:04:25 -05:00
Digimer
426b5f58f7 * Finished (but not yet tested) tools/striker-auto-initialize-all. Expect many bugs if used.
Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-09 00:49:09 -05:00
Digimer
e71c7d4966 * Finished getting tools/striker-auto-initialize-all to merge the built Strikers.
* Fixed a bug in Remote->call() where the output of the call not ending in a newline wasn't having the return code parsed off properly.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-04 23:28:39 -05:00
Digimer
15fd0e5ce8 * Updated anvil-daemon (and Database->insert_or_update_jobs) to now recognize jobs with the job_status of 'scancore_startup' to run only when ScanCore starts.
* Finished initial Striker setup in tools/striker-auto-initialize-all. Started working on peering.
* Cleaned up the handling of converting UIDs to user names in Remote->add_target_to_known_hosts() and ->_call_ssh_keyscan().
* Did a bunch of white-space/alignment cleanup.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-04 01:41:33 -05:00
Digimer
0fb191c00f * Made more progress on tools/striker-auto-initialize-all, now to the point where it loads the variables needed to initialize Striker dashboard.
* Cleaned up / added some logging in various locations.

Signed-off-by: Digimer <digimer@alteeve.ca>
2021-03-02 01:18:18 -05:00
digimer-bot
1a10f2ddd9
Merge pull request #44 from ClusterLabs/auto-build-anvil
* Fixed a bug introduced in the last commit that made Get->os_type() …
2021-02-23 02:08:54 -05:00