tmt: The `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:

test: ./task.sh
framework: beakerlib

Example report (login-logout-stress is not using beakerlib framework): Screenshot from 2024-01-25 13-50-12

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18

Most upvoted comments

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:

https://github.com/teemtee/tmt/blob/22731b9761b62177de00ee7818c2f0ee4efcfe03/tmt/steps/execute/upgrade.py#L251-L253

Packages gathered from require and recommend keys of upgrade tasks would be used to create a new PrepareInstall instances similar as here:

https://github.com/teemtee/tmt/blob/22731b9761b62177de00ee7818c2f0ee4efcfe03/tmt/steps/prepare/__init__.py#L305-L315

Created instances would be applied to all guests, as the execute step does not support the where key. As the upgrade scenarios are not primarily targeting multihost testing I’d say it’s not a hard requirement to do the guest preparation in parallel. If needed we can improve later in a separate pull request.

@happz, @lukaszachy, any additional thoughts on this?

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.