-
Notifications
You must be signed in to change notification settings - Fork 113
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
The beakerlib
package is missing for the upgrade
step
#2643
Comments
Looks like we ignore require/recommend of upgrade tasks as well, don't we? |
Hopefully small enough reproducer which runs fast as it doesn't upgrade :) tmt init
cat > parent.fmf <<EOF
discover:
how: shell
tests:
- name: check if beakerlib installed
test: test -e /usr/share/beakerlib/beakerlib.sh
provision:
how: container
execute:
how: upgrade
path: upgrade-path
EOF
cat > task-beakerlib.fmf <<EOF
framework: beakerlib
test: |
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartTest
rlPass "yes"
rlPhaseEnd
rlJournalEnd
EOF
cat > upgrade-path.fmf <<EOF
discover:
how: fmf
execute:
how: tmt
EOF |
So if I understand it correctly (as a total noob), the Upgrade being Execute step and having it's own tasks discovery, resolving the framework/requires/recommends of the tasks would need one of:
|
I'm not sure about this one. At one hand it makes it easier to compare old/new as just "upgrade" happen. On the other hand I think it could be more useful to have 'Upgrade' run also prepare/finish and as such it can add repos which make dependencies available (they are not available for the OLD and if finish step removes them then neither for NEW). |
So I'd advocate to change 'ExecuteUpgrade' to use provisioned guests of the parent run and run discover & prepare (including install require/recommend) & execute & finish. |
Do you mean by calling |
Currently upgrade does this: https://github.com/teemtee/tmt/blob/main/tmt/steps/execute/upgrade.py#L288 I'm not sure how much work would be to change current implementation to just call |
Regardless of how much work would it be, I'd like to humbly suggest that it might be a good idea to take a step back and decide what the "upgrade" is actually for and how it should be implemented, because what you're describing sounds like a full tmt run within a tmt run, just with extra custom steps :) |
With few _less _steps :) but yes. IMHO this is what upgrade plan is and I see no issue why it shouldn't be it. @psss Where would be best place to sync a bit about it? This was implemented by LEAPP, right? |
All I'm saying is that conceptually there should be only one prepare step. |
It might be a good opportunity to improve ways in which a plugin could invoke other steps and plugins when needed. It's not trivial today, |
What is 'step' in this case? Step as a implementation or Step as a time when it runs? OK for implementation, opt-out for time. |
As in resolving all dependencies and preparations before the first test(s) are being run. |
Then I beg to differ that "upgrade dependencies and preparations" should be run as part of the upgrade itself or at least have it configurable. |
Well we can't all have the same opinions on everything :) |
I think that 'upgrade' part of the execute upgrade plugin should behave as a nested tmt run with own discover/prepare/execute/finish (once guest cleanup is not part of the finish) steps and thus dependencies of upgrade tasks should be installed in this nested tmt run. Or at least have the option to work it this way. But it isn't something I treat as a priority, so if it is faster/easier and makes more sense for others to have upgrade gather its dependencies and install as part of the 'parent' tmt run, let's to it that way. |
Not directly related but #2784 might change how/when tmt gathers require/recommend. |
Summary from today's sync with @martinhoyer and @mmacura311: Placing the required installation right before the upgrade path execution seems to be the best approach and should not break any essential upgrade scenario. When the patch is ready @mmacura311 is willing to verify against their scenarios to ensure that everything's fine. Regarding the code, it seems the upgrade task requires could be gathered once the upgrade discovery is done, somewhere around here: tmt/tmt/steps/execute/upgrade.py Lines 251 to 253 in 22731b9
Packages gathered from tmt/tmt/steps/prepare/__init__.py Lines 305 to 315 in 22731b9
Created instances would be applied to all guests, as the @happz, @lukaszachy, any additional thoughts on this? |
beakerlib
package is missing for the upgrade
step
When adding an upgrade step which uses beakerlib framework, it seems beakerlib is not being installed and the upgrade tasks fail with
./task.sh: line 2: /usr/share/beakerlib/beakerlib.sh: No such file or directory
In the upgrade tasks main.fmf:
Example report (login-logout-stress is not using beakerlib framework):
The text was updated successfully, but these errors were encountered: