Skip to content
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

Implement pre/post scripts #123

Open
stdevel opened this issue May 4, 2020 · 1 comment
Open

Implement pre/post scripts #123

stdevel opened this issue May 4, 2020 · 1 comment
Assignees
Projects
Milestone

Comments

@stdevel
Copy link
Owner

stdevel commented May 4, 2020

Is your feature request related to a problem? Please describe.
It would be great to have the possibility to run pre/post scripts before/after system maintenance (e.g. in order to stop/start applications).

Describe the solution you'd like
The workflow could look like this:

  1. katprep maintenance is started
  2. pre script is executed
  3. Patches and package upgrades are installed
  4. post script is executed
  5. System might be rebooted
  6. Maintenance is completed

Describe alternatives you've considered

Additional context
Pre-/post scripts are assigned to hosts or hostgroups using key-value pairs (Uyuni: Custom Info Key, Foreman: Host Parameter):

  • katprep_pre-script - Pre-maintenance script
  • katprep_post-script - Post-maintenance script

It is possible to assign multiple scripts devided by newline, an URL needs to be supplied.
The scripts are downloaded via Remote Execution (Foreman) or Remote Command (Uyuni)
When a pre-script fails, system maintenance will not be executed. When multiple scripts are executed and one fails, remaining scripts are not executed, too. When maintenance fails, post scripts will not be run.

@stdevel stdevel added this to the 0.6 milestone May 4, 2020
@stdevel stdevel self-assigned this May 4, 2020
@stdevel stdevel modified the milestones: 0.6, 0.5.x Nov 18, 2020
@stdevel stdevel added this to To do in 0.5.x via automation Nov 18, 2020
@stdevel stdevel changed the title Dependency management, pre/post scripts Dependency management Nov 18, 2020
@stdevel stdevel changed the title Dependency management Implement dependency management Nov 18, 2020
@stdevel stdevel changed the title Implement dependency management Implement pre/post scripts Nov 18, 2020
@stdevel
Copy link
Owner Author

stdevel commented Jan 6, 2022

Investigating in branch 44-feat-pre_post_scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
0.5.x
  
To do
Development

No branches or pull requests

1 participant