neoave / mrack

Multicloud use-case based multihost async provisioner for CIs and testing during development
Apache License 2.0
12 stars 14 forks source link

When beaker client returns Fault object it is not treated as error and runtime fails when unpacking values #123

Closed Tiboris closed 3 years ago

Tiboris commented 3 years ago
2021-06-08 12:42:43,991 mrack.providers.provider INFO Beaker: Preparing provider resources
2021-06-08 12:42:43,991 mrack.providers.provider INFO Beaker: Validating hosts definitions
2021-06-08 12:42:43,991 mrack.providers.provider INFO Beaker: Host definitions valid
2021-06-08 12:42:43,991 mrack.providers.provider INFO Beaker: Checking available resources
2021-06-08 12:42:43,991 mrack.providers.provider INFO Beaker: Resource availability: OK
2021-06-08 12:42:43,991 mrack.providers.provider INFO Beaker: Issuing provisioning of 1 host(s)
2021-06-08 12:42:43,991 mrack.providers.beaker INFO Beaker: Creating server
2021-06-08 12:42:46,749 mrack.providers.provider INFO Beaker: Provisioning issued
2021-06-08 12:42:46,749 mrack.providers.provider INFO Beaker: Waiting for all hosts to be active
2021-06-08 12:42:46,750 mrack.run ERROR cannot unpack non-iterable Fault object
Traceback (most recent call last):
  File "/home/tdudlak/Work/mrack/src/mrack/run.py", line 250, in handle
    ret_code = func(*args, **kwargs)
  File "/home/tdudlak/Work/mrack/src/mrack/run.py", line 274, in run
    mrackcli(obj={})  # pylint: disable=no-value-for-parameter,unexpected-keyword-arg
  File "/home/tdudlak/Work/mrack/venv/lib64/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/tdudlak/Work/mrack/venv/lib64/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/tdudlak/Work/mrack/venv/lib64/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/tdudlak/Work/mrack/venv/lib64/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/tdudlak/Work/mrack/venv/lib64/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/tdudlak/Work/mrack/venv/lib64/python3.9/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/tdudlak/Work/mrack/src/mrack/run.py", line 65, in wrapper
    return loop.run_until_complete(func(*args, **kwargs))
  File "/usr/lib64/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/tdudlak/Work/mrack/src/mrack/run.py", line 168, in up
    await up_action.provision()
  File "/home/tdudlak/Work/mrack/src/mrack/actions/up.py", line 100, in provision
    provisioning_results = await asyncio.gather(*prov_aws)
  File "/home/tdudlak/Work/mrack/src/mrack/providers/provider.py", line 266, in provision_hosts
    success_hosts, error_hosts, _missing_reqs = await self.strategy_abort(reqs)
  File "/home/tdudlak/Work/mrack/src/mrack/providers/provider.py", line 309, in strategy_abort
    return await self._provision_base(reqs)
  File "/home/tdudlak/Work/mrack/src/mrack/providers/provider.py", line 177, in _provision_base
    logger.info(f"{self.dsp_name}: Provisioning issued")
  File "/home/tdudlak/Work/mrack/src/mrack/providers/beaker.py", line 236, in wait_till_provisioned
    beaker_id, req_name = resource

at this point ^^^ resource is Fault object from beaker-client. we need to patch that for the future. Possible reproducer: use unexisting distro in provisioning-config.yaml for beaker.