summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/test/disk_availability_test.py
Commit message (Collapse)AuthorAgeFilesLines
* openshift_checks: enable providing file outputsLuke Meyer2017-09-181-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some refactoring of checks and the action plugin to enable writing files locally about the check operation and results, if the user wants them. This is aimed at enabling persistent and machine-readable results from recurring runs of health checks. Now, rather than trying to build a result hash to return from running each check, checks can just register what they need to as they're going along, and the action plugin processes state when the check is done. Checks can register failures, notes about what they saw, and arbitrary files to be saved into a directory structure where the user specifies. If no directory is specified, no files are written. At this time checks can still return a result hash, but that will likely be refactored away in the next iteration. Multiple failures can be registered without halting check execution. Throwing an exception or returning a hash with "failed" is registered as a failure. execute_module now does a little more with the results. Results are automatically included in notes and written individually as files. "changed" results are propagated. Some json results are decoded. A few of the checks were enhanced to use these features; all get some of the features for free.
* openshift_checks: refactor find_ansible_mountLuke Meyer2017-08-081-11/+23
| | | | Reuse the code for finding the ansible_mounts mount for a path.
* add pre-flight checks to ugrade pathjuanvallejo2017-08-021-5/+64
|
* Revert "Add health checks to upgrade playbook"Rodolfo Carvalho2017-07-281-64/+5
|
* fixes after rebasing with #4485juanvallejo2017-07-261-2/+2
|
* add pre-flight checks to ugrade pathjuanvallejo2017-07-261-5/+64
|
* openshift_checks: refactor to internalize task_varsLuke Meyer2017-07-251-7/+4
| | | | | | | | | Move task_vars into instance variable so we don't have to pass it around everywhere. Also store tmp. Make sure both are filled in on execute_module. In the process, is_active became an instance method, and task_vars is basically never used directly outside of test code.
* Enable disk check on containerized installsRodolfo Carvalho2017-06-221-13/+10
| | | | | | | According to the docs the disk requirements should be similar to non-containerized installs. https://docs.openshift.org/latest/install_config/install/rpm_vs_containerized.html#containerized-storage-requirements
* Require at least 1GB in /usr/bin/local and tempdirRodolfo Carvalho2017-06-221-1/+1
| | | | During install, those paths are used and require some free space.
* Refactor DiskAvailability for arbitrary pathsRodolfo Carvalho2017-06-221-1/+1
| | | | Prepare the check to support verifying multiple paths, not only /var.
* disk/memory checks: make threshold configurableLuke Meyer2017-05-231-4/+32
|
* Simplify memory availability check, review testsRodolfo Carvalho2017-04-171-3/+3
| | | | | | | | | | | | | | - Fix required memory for etcd hosts (10 -> 20 GB), as per documentation. - Some changes to make the code more similar to the similar DiskAvailability check. - Do not raise exception for hosts that do not have a recommended memory value (those are ignored anyway through `is_active`, so that was essentially dead code). - Test that the required memory is the max of the recommended memories for all groups assigned to a host. E.g. if a host is master and node, we should check that it has enough memory to be a master, because the memory requirement for a master is higher than for a node.
* Simplify disk availability check, review testsRodolfo Carvalho2017-04-171-78/+127
| | | | | | | | | | | - only support a fixed list of recommended values for now, no overwriting via Ansible variables (keep it simple, add features as needed). - implement is_active: run this check only for hosts that have a recommended disk space. - test priority of mount paths / and /var.
* add disk and memory availability check testsjuanvallejo2017-04-171-0/+106