-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add action to run after a reboot #308
Draft
lizsalmon
wants to merge
21
commits into
main
Choose a base branch
from
post-reboot-action
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implement a class with the functionalities to call AlertManager. This is a first implementation with methods to: * Schedule a Silence * Removed a previously scheduled Silence * Download information of all existing Silences * Find out the ID of the current Silence for a given HyperVisor Implement the class to store the specifications for each Silence event. The code has been written using the existing one for icinga as guidance.
Create the ancillary file needed to implement a library to manage silences in AlertManager: * a file to handle credentials This directory and its files have been created following the existing content for icinga as guidance
Write some basic unittest for the methods to * schedule a Silence * remove a Silence * get information from recorded Silences The use cases being covered are: * when everything goes fine * when the RC code from the requests call is not 200 * when there the call to requests failed even though the RC is 200 * when some mandatory attribute is missing * an Exception is being raised * a proper log message is created
Implement a class with the functionalities to call AlertManager. This is a first implementation with methods to: * Schedule a Silence * Removed a previously scheduled Silence * Download information of all existing Silences * Find out the ID of the current Silence for a given HyperVisor Implement the class to store the specifications for each Silence event. The code has been written using the existing one for icinga as guidance.
Write some basic unittest for the methods to * schedule a Silence * remove a Silence * get information from recorded Silences The use cases being covered are: * when everything goes fine * when the RC code from the requests call is not 200 * when some mandatory attribute is missing * an Exception is being raised * a proper log message is created * the format of start_time and end_time strings
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #308 +/- ##
==========================================
- Coverage 98.19% 98.05% -0.15%
==========================================
Files 129 137 +8
Lines 4719 5251 +532
Branches 251 286 +35
==========================================
+ Hits 4634 5149 +515
- Misses 76 88 +12
- Partials 9 14 +5 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This PR:
post_reboot
action to remove the scheduled downtime, removes the alertmanager silence and enables the hv in openstack when the hv is back up after a rebootopenstack_actions.py
.Note: There are so many commits because of rebasing with Jose's PR (which went a bit wrong).
Submitter:
Have you (where applicable):
Reviewer
Does this PR:
lib
directory?lib
layers?