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 systemd service for automatic system upgrades and reboots #3524

Merged
merged 7 commits into from
Nov 12, 2020

Conversation

okurz
Copy link
Member

@okurz okurz commented Nov 8, 2020

This is based on what we already use on o3 (openqa.opensuse.org) to
automatically apply nightly system patching, package upgrades and
planning system reboots where required, e.g. after kernel upgrades.

Related progress issue: https://progress.opensuse.org/issues/70978

docs/Installing.asciidoc Outdated Show resolved Hide resolved
openQA.spec Outdated Show resolved Hide resolved
Copy link
Contributor

@ilausuch ilausuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is over my knowledge but seems good job

Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is ok to add yet another sub-package but generally I'm wondering whether we should stop adding everything to one spec file.

Unlike the other service file this service file is also very distribution-specific. It is questionable whether we should install the script and service file via the regular install target.

openQA.spec Outdated Show resolved Hide resolved
openQA.spec Outdated Show resolved Hide resolved
script/openqa-auto-upgrade Outdated Show resolved Hide resolved
@okurz
Copy link
Member Author

okurz commented Nov 10, 2020

I think it is ok to add yet another sub-package but generally I'm wondering whether we should stop adding everything to one spec file.

Unlike the other service file this service file is also very distribution-specific. It is questionable whether we should install the script and service file via the regular install target.

Both points are linked. We use a single spec file because we first install everything in one call and then separate the files into packages.

I was considering the "distribution specific" aspect as well but I would only worry about that after we learned where we can do that better. It won't do any harm if the files are just present.

@Martchus
Copy link
Contributor

It won't do any harm if the files are just present.

It means that other distributions won't use our install target at all or they need to remove files manually. Both seems annoying considering they'll have to keep their custom solution in sync with our install target.

I would only worry about that after we learned where we can do that better.

Just add another install target, e.g. install-opensuse for distribution-specific files.

@okurz
Copy link
Member Author

okurz commented Nov 10, 2020

Just add another install target, e.g. install-opensuse for distribution-specific files.

@mkittler DONE, please check.

Copy link
Contributor

@Martchus Martchus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already unresolved one unaddressed review comment.

@okurz okurz force-pushed the feature/auto-upgrade branch 3 times, most recently from 2c54a79 to 942348e Compare November 11, 2020 07:40
@codecov
Copy link

codecov bot commented Nov 11, 2020

Codecov Report

Merging #3524 (1c9fcd5) into master (59caf76) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3524      +/-   ##
==========================================
- Coverage   95.61%   95.58%   -0.03%     
==========================================
  Files         366      366              
  Lines       31789    31789              
==========================================
- Hits        30394    30387       -7     
- Misses       1395     1402       +7     
Impacted Files Coverage Δ
t/44-scripts.t 100.00% <100.00%> (ø)
t/lib/OpenQA/Test/Utils.pm 65.52% <0.00%> (-3.71%) ⬇️
t/05-scheduler-full.t 97.43% <0.00%> (-0.52%) ⬇️
t/lib/OpenQA/Test/FullstackUtils.pm 93.93% <0.00%> (+7.07%) ⬆️

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 59caf76...1c9fcd5. Read the comment docs.

@Martchus Martchus self-requested a review November 11, 2020 09:33
@okurz
Copy link
Member Author

okurz commented Nov 11, 2020

Needed to add

BuildRequires: openSUSE-release

to openQA.spec so that /etc/os-release is present so that we can detect that we need to call the install-opensuse Makefile target

@okurz

This comment has been minimized.

@okurz okurz force-pushed the feature/auto-upgrade branch 4 times, most recently from b2ba52c to 2dfc26d Compare November 12, 2020 14:05
@okurz
Copy link
Member Author

okurz commented Nov 12, 2020

oh come on, finally all tests passed and now
"Rule: automatic merge (merge) — Base branch update has failed" :(

This is based on what we already use on o3 (openqa.opensuse.org) to
automatically apply nightly system patching, package upgrades and
planning system reboots where required, e.g. after kernel upgrades.

Related progress issue: https://progress.opensuse.org/issues/70978
@mergify mergify bot merged commit 42a5a30 into os-autoinst:master Nov 12, 2020
@okurz okurz deleted the feature/auto-upgrade branch November 12, 2020 16:44
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.

4 participants