Commit Graph

928 Commits

Author SHA1 Message Date
digimer
68521cdab7 Updated striker-get-screenshots to set permissions properly.
This updates the /opt/alteeve/screenshot directories and the screenshots
in them to be readible by the WebUI.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-10-11 17:22:06 -04:00
digimer
55b1380031 Finished (but need more testing) of Server->locate().
This includes the changes in PR#492.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-10-11 17:22:06 -04:00
digimer
245f75de9b Added Server->update_definition()
* This takes a server and new definition XML and updated the database and any available hosts. Does not yet update defined or running servers.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-10-11 17:22:06 -04:00
digimer
e361d0b424 More progress on anvil-manage-server-system
* It now edits the XML to change the boot menu, but doesn't save yet.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-10-11 17:22:06 -04:00
digimer
201cd53265 Improved the logic behind Network->find_target_ip()
* This adds the new 'networks' and 'test_access' parameters to allow
  restricting/ordering matched networks, and adds 'test_access' to
  validate the link is working.
* Continued work on anvil-manage-server-system

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-10-11 17:22:06 -04:00
digimer
62fe62a44b * Continued work on anvil-manage-server-system. It now displays the boot devices, CPU and RAM info.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-10-11 17:22:06 -04:00
digimer
7762540f85 Fixed wrappers to handle quoted arguments properly.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-10-10 10:10:54 -04:00
digimer
3d4d7abfe3 Increased logging to debug server install failure.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-29 13:01:58 -04:00
digimer
c3fe39e6a8 Added a check file unlinked files.
* On subnodes and DR hosts, a check is made now in Storage->check_files() for files not linked in file_locations. Any found are added, with a check to see if the file already exists locally and, if so, that the md5sum is accurate or not (to set if the file is ready for use or not).

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-29 00:05:29 -04:00
digimer
0bff40b21e Fixed a bug where files that are ready for use were not found.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 21:35:16 -04:00
digimer
5a8f775db4 Removed the reboot job at the end of anvil-configure-host.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 18:23:57 -04:00
digimer
30248760b5 Moved the wait_on_subnodes function call to earlier in the script.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 17:52:11 -04:00
digimer
77bae80534 Added default values for MTU and DNS if not set in a manifest.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 17:47:53 -04:00
digimer
b8fb3d62e3 Added checks for the screenshot directory before collection.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 16:30:36 -04:00
digimer
663a1e0527 Quieted screenshot logging in anvil-daemon.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 16:27:40 -04:00
digimer
fcbace6713 Updated anvil-join-anvil to hold if either node is still running anvil-configure-host
* Fixed a minor bug and added logging of maintenance_mode calls in anvil-configure-host.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 16:01:32 -04:00
digimer
e480337239 Fixed wait loop for subnodes
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 11:47:48 -04:00
digimer
582a8b292c Added more job updates to anvil-manage-power.
* This is a test to see if the job waiting for the uptime to be 300s,
  leaving the job_progress as 0, was causing the job to be repeatedly
  called.
* This is related to issue #479

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 01:19:52 -04:00
digimer
5b286f2696 Added missing switch reading in anvil-manage-power.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 00:24:29 -04:00
digimer
ef042eef25 Cleaned up logging while waiting for subnodes.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-28 00:15:14 -04:00
digimer
5d5270486e Added a wait loop when forming node clusters.
* This adds a check where anvil-join-anvil waits until both subnodes are
  marked as configured and not in maintenance mode.
* Should address issue #479 (maybe, this shouldn't trigger reboots, but
  it was certainly a race condition found while investigating).

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-27 22:38:07 -04:00
digimer
d58521ceca Added screenshot capture to striker-collect-debug.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-27 11:46:56 -04:00
Digimer
745081b649
Merge branch 'main' into patch-screenshot 2023-09-22 23:28:12 -04:00
digimer
b1562e0301 * Added the new screenshot tool.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-22 17:16:19 -04:00
digimer
c039c58128 * This commit moves taking screenshots of hosted servers onto the strikers using the Sys::Virt module. This was needed because the screenshots were being taken by scan-server, and that was causing it to take a long time to run. It should never have been handled by the scan agent anyway. This update requires a WebUI fix to use the new screenshot tool. This tool also adds holding multiple screenshots to allow users to "scrub" through screenshots up to 10 hours in the past.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-22 17:15:09 -04:00
digimer
8925dabb9d * Updated anvil-shutdown-server to take the new '--immediate' switch which forces a server to shut down immediately (akin to pulling the power on a traditional machine). This is needed to allow a user to recover a crash or hung server.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-21 18:56:12 -04:00
digimer
3c9086d1f3 Fixed bugs related to running jobs.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-07 20:06:00 -04:00
digimer
e8a84e1c97 Added job handling to anvil-manage-server-storage (needs more testing though).
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-07 15:37:31 -04:00
digimer
2f429d2bc7 Fixed bugs related to adding drives and extending drives to servers.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-05 22:53:52 -04:00
digimer
e895e1f264 * Finished writting the anvil-manage-server-storage.
* Fixed handling --eject and --insert to work without a device target specified when only one exists, or to find the file path when only the file name is given.
* Updated anvil-manage-server-storage to show files when processing an optical devices without a file being passed.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-05 16:53:08 -04:00
digimer
17078347ee Reworked anvil-manage-server-storage to use the translation system.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-09-03 16:02:47 -04:00
Tsu-ba-me
adcf5ec818 fix(tools): enhance logging in access module 2023-08-21 20:57:31 -04:00
Tsu-ba-me
7845f8c170 fix(tools): correct key check in access_chain of access module
The old check evaluates the expression before determining whether the
resulting value is defined. However, when the expression refers to a
subroutine, it gets executed; if the subroutine doesn't protect against
missing parameters, it'll cause executions with bad input, i.e., the
Striker->generate_manifest subroutine without parameters.

The new check uses can(), which correctly determines whether the key
"exists" on the blessed object; although it doesn't strictly mean
"exists", but it does the job.
2023-08-21 20:50:24 -04:00
Tsu-ba-me
ee259f5a3a fix(tools): reduce UUIDv4 check strictness in access module 2023-08-21 18:59:32 -04:00
digimer
d255adc7b4 * Updated anvil-daemon to set the mode of /mnt/shared/* to 0777 during creation and to check that that mode is set for existing sub-directories. This resolves issue #443.
* Cleaned up anvil-manage-dr.8 hyphen escapes.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-08-17 22:14:40 -04:00
digimer
4c118cf3b4 * Created empty man page files all remaining tools.
* Started fixing existing man pages, and writting needed ones.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-08-11 13:55:51 -04:00
digimer
7bf7c3747c * Added anvil-file-details.8, but it's not completely written yet. Converted anvil-file-details to use the new switch loading method.
* Fixed the RC in ocf:alteeve:server to exit with 0 on notify calls, resolves issue #392.
* Fixed typo references in issue #390.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-08-10 16:21:20 -04:00
digimer
1667d1f132 * Wrote the man page for anvil-download-file, and updated it to use the new switch method. Changed it's default download directory from /mnt/shared/temp to /mnt/shared/incoming.
* Added the new man pages to the Makefile.am file.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-08-10 16:19:05 -04:00
digimer
d39b0af67b * Added support for migration networks, and wrote the man page for anvil-cycle-vm-nics.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-08-10 16:17:49 -04:00
digimer
a81a110261 * Remove forced log level and secure logging. This addresses issue #386
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-08-09 18:20:14 -04:00
digimer
a0cb791f47 This contains fixes needed for beta from additional testing.
* Updated the pcs wrapper to flock anything but status calls.
* Updated scan-apc-pdu to purge regardless of the host it's called on any host.
* Fixed a bug striker-purge-target that wouldn't purge anvil nodes in various cases.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-08-09 18:07:03 -04:00
digimer
cc71df686b Added a pcs wrapper to serialize pcs constraint calls.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-08-08 14:32:33 -04:00
Fabio M. Di Nitto
824e3e07e3 virsh: add wrapper to serialize calls to virsh list
avoid storm of virsh list that overloads libvirtd API causing
unnecessary timeouts during pcmk monitoring operations.

Resolves: https://github.com/ClusterLabs/anvil/issues/395

Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
2023-08-07 08:35:08 +02:00
digimer
6ee2ad75db * Updated anvil-delete-server to actively check for and delete any drbd-fenced attributes left over in the CIB after a server is deleted. This addresses issue #374.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-07-25 21:45:34 -04:00
digimer
ed480cf1cb * Fixed a double-$ bug in Remote->_check_known_hosts_for_target()
* Updated striker-update-cluster to take '--timeout' and a number of seconds, or 'Xm' or 'Xh' for minutes or hourse, respectively. Also updated to show the remaining time while waiting, and added waiting timeout to the rest of the while loops that prior had no time limit. This addresses issue #383 and issue #382.

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-07-25 19:13:41 -04:00
digimer
0471fb90ea * Upped the logging in these three tools to help diagnose run errors. To be removed before tagging beta
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-07-25 13:07:38 -04:00
digimer
88e8978305 * Fixed a bug where getting the job_uuid after a no-db run wouldn't actually update the job progress.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-07-25 12:43:28 -04:00
digimer
be290bf561 This commit fixes a bug where the drbd kernel module build was being killed mid-compile, leaving DBRD unusable.
* Created System->wait_on_dnf() which was plucked from anvil-daemon, and now also called in scancore and anvil-safe-start.
* Updated scancore and anvil-safe-start to check on start that DRBD's kernel module is available (and build if not).

Signed-off-by: digimer <mkelly@alteeve.ca>
2023-07-24 22:32:41 -04:00
digimer
d68adb5b4e * Updated anvil-manage-power to not reboot if anvil-version-changes is running (which, if it's taking time, is generating new kmods).
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-07-24 20:44:40 -04:00
digimer
8b3d472b9c Updated striker-update-cluster to set primary_host_uuid to node 1 if not returned from Cluster->get_primary_host_uuid.
Signed-off-by: digimer <mkelly@alteeve.ca>
2023-07-24 19:00:19 -04:00