-
Notifications
You must be signed in to change notification settings - Fork 129
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
Support container provisioner in toolbox #3228
base: main
Are you sure you want to change the base?
Conversation
For Fedora Silverblue users it is common to run podman via `flatpak-spawn --host` which runs podman on the host system itself. This requires to pass the toolbox container name when running `podman cp` to correctly copy stuff from the toolbox container, where `tmt` is installed to the provisioned container. Fixes #1020 Signed-off-by: Miroslav Vadkerti <[email protected]>
@jkonecny12 this is the change I talked about, with it tmt container provisioner works well :) |
if line.startswith('name="'): | ||
return line[6:-1] | ||
|
||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two look like they belong to guest facts, as they are properties of a machine similar to has_selinux
or arch
, for example. Once moved, you would reach them via self.parent.plan.my_run.runner.facts.*
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the pointers
@functools.cached_property | ||
def _is_toolbox(self) -> bool: | ||
""" Return ``True`` if running in toolbox, ``False`` otherwise. """ | ||
if os.path.exists('/run/.toolboxenv'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os.path
should be replaced with Path().exists()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to remember we use pathlib here :)
I'm getting this error, any idea? The directory
|
@janhavlin this is something we should document, add this to your environment (I have it in .bashrc):
|
Thanks, I got it working! |
Couldn't we have this resolved by default correctly? Requesting users to set somewhere something to make things work seems like an issue generator and unhappy users. |
@jkonecny12 I agree it is sad, but we will need to have a discussion with |
So we agreed we will go with this default if we detect running in toolbox :) |
For Fedora Silverblue users it is common to run podman via
flatpak-spawn --host
which runs podman on the host system itself. This requires to pass the toolbox container name when runningpodman cp
to correctly copy stuff from the toolbox container, wheretmt
is installed to the provisioned container.Fixes #1020
Pull Request Checklist