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

Add service files to restart worker after config changes without interrupting running jobs #3666

Conversation

Martchus
Copy link
Contributor

@Martchus Martchus commented Jan 11, 2021


  • We could actually also watch for a packaged file so it would also apply
    to package updates.
    Maybe that's better done on RPM level as suggested in https://progress.opensuse.org/issues/80908#note-8 (point 2.)?
  • Then we could also get rid of OPENQA_WORKER_TERMINATE_AFTER_JOBS_DONE=1
    in the auto-restart service file.

@codecov
Copy link

codecov bot commented Jan 11, 2021

Codecov Report

Merging #3666 (33ac2a4) into master (4bc4c9e) will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3666      +/-   ##
==========================================
+ Coverage   96.35%   96.39%   +0.04%     
==========================================
  Files         369      369              
  Lines       32321    32321              
==========================================
+ Hits        31144    31157      +13     
+ Misses       1177     1164      -13     
Impacted Files Coverage Δ
t/lib/OpenQA/Test/Utils.pm 81.50% <0.00%> (+3.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bc4c9e...33ac2a4. Read the comment docs.

@Martchus Martchus force-pushed the worker-soft-restart-on-config-change-via-systemd branch from 641d2e5 to 5b131df Compare January 27, 2021 12:09
@Martchus Martchus changed the title WIP: Add service files to restart worker after config changes without interrupting running jobs Add service files to restart worker after config changes without interrupting running jobs Jan 27, 2021
@Martchus Martchus marked this pull request as ready for review January 27, 2021 12:11
@Martchus
Copy link
Contributor Author

This seems to work as expected.

docs/Installing.asciidoc Outdated Show resolved Hide resolved
dist/rpm/openQA.spec Outdated Show resolved Hide resolved
@Martchus Martchus force-pushed the worker-soft-restart-on-config-change-via-systemd branch from 5b131df to bea2b9a Compare January 28, 2021 10:25
@Martchus Martchus force-pushed the worker-soft-restart-on-config-change-via-systemd branch from bea2b9a to a1322e2 Compare January 29, 2021 09:55
…rrupting running jobs

* As long as e.g. `openqa-reload-worker-auto-restart@1.path` is running
  the worker started via the corresponding service unit
  `openqa-worker-auto-restart@1.service` is restarted as soon as it
  becomes idle (and immediately if it is already idling) when
  `/etc/openqa/workers.ini` is edited.
* See https://progress.opensuse.org/issues/80910
  and https://progress.opensuse.org/issues/80908#note-8
@Martchus Martchus force-pushed the worker-soft-restart-on-config-change-via-systemd branch from a1322e2 to 33ac2a4 Compare January 29, 2021 13:56
@Martchus Martchus merged commit 8efacba into os-autoinst:master Feb 1, 2021
@Martchus Martchus deleted the worker-soft-restart-on-config-change-via-systemd branch February 1, 2021 09:26
openqabot pushed a commit to openqabot/openQA that referenced this pull request Feb 2, 2021
commit 8efacba
Merge: 1998b3c 33ac2a4
Author:     Martchus <martchus@gmx.net>
AuthorDate: Mon Feb 1 10:25:59 2021 +0100
Commit:     GitHub <noreply@github.com>
CommitDate: Mon Feb 1 10:25:59 2021 +0100

    Merge pull request os-autoinst#3666 from Martchus/worker-soft-restart-on-config-change-via-systemd

    Add service files to restart worker after config changes without interrupting running jobs
openqa-git-sync pushed a commit to os-autoinst/salt-states-openqa that referenced this pull request Apr 19, 2021
This way workers are restarted as soon as possible without
interfering currently running jobs when the worker config changes.

The restart of the services is triggered by a special systemd
unit. The salt configuration merely enables that unit. Hence this
change depends on the following upstream change:
os-autoinst/openQA#3666

Relevant tickets:
* https://progress.opensuse.org/issues/80910
* https://progress.opensuse.org/issues/80908#note-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants