tmt icon indicating copy to clipboard operation
tmt copied to clipboard

tmt fails to report missing mrack

Open happz opened this issue 10 months ago • 0 comments

/var/tmp/tmt/run-013
Found 1 plan.

/default/plan
    provision
        queued provision.provision task #1: default-0
        
        provision.provision task #1: default-0
        how: beaker
        order: 50
        arch: s390x
        image: RHEL-10.1-updates-20250409.d.3
        fail: name 'ProvisioningError' is not defined
        multihost name: default-0

...

            File /usr/lib/python3.13/site-packages/tmt/steps/provision/mrack.py, line 1394, in start
              self._create(self._tmt_name())

              self = <tmt.steps.provision.mrack.GuestBeaker object at 0x7fbc1a35b0e0>

            File /usr/lib/python3.13/site-packages/tmt/steps/provision/mrack.py, line 1292, in _create
              except ProvisioningError as exc:

              self = <tmt.steps.provision.mrack.GuestBeaker object at 0x7fbc1a35b0e0>
              tmt_name = 'tmt-013-BNZxxUlH'
              data = CreateJobParameters(...)

This is caused by missing python3-mrack-beaker package - I don't know how it's possible, I for one cannot remove python3-mrack-beaker without also removing tmt, but, well, here we are. So:

  • mrack is not installed
  • beaker plugin starts provisioning by spawning BeakerAPI
  • before creating BeakerAPI instance, it tried to import mrack, but fails - exception si raised
  • with tmt.utils.signals.PreventSignals(self._logger):
        try:
            response = self.api.create(data)
    
        except ProvisioningError as exc:
    
    ^^ yeah, but ProvisioningError comes from mrack package, and that we fail to import, so Python will throw it on our head.

Changing the order fo things, e.g. explicitly calling import_and_load_mrack_deps() and then moving to GuestBeaker.create(), should provide the correct - well, any... - report WRT missing mrack.

happz avatar Apr 10 '25 10:04 happz