-
Notifications
You must be signed in to change notification settings - Fork 123
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
tmt clean (virtual)guests doesn't work well with --workdir-root cli opt #2834
Comments
|
Sorry for a little late reply,got high fever from my vacation🥲
testcloud plugin should probably follow the suite and start using
effective_workdir_root()...
That is what I was thinking,just didn't get enough energy to work out a
merge request due to the high fever 🥴
Or, better, it shouldn't touch WORKDIR_ROOT, and it should be told what
the workdir root is.
Nope, we need pass workdir-root to ProvisionPlugin which will affect other
plugins than testcloud.
Here is the merge request:#2838 for this
issue^^
…On Mon, Apr 8, 2024 at 6:37 PM Miloš Prchlík ***@***.***> wrote:
testcloud plugin should probably follow the suite and start using
effective_workdir_root()... Or, better, it shouldn't touch WORKDIR_ROOT,
and it should be told what the workdir root is. Otherwise, we would need a
global name for the current workdir root, resolved and set by the current
command. But shared global state is a PITA in general, so I'd like to avoid
that. I wonder whether we could replace tmt.steps.testcloud.TESTCLOUD_DATA
with something like self.plan.workdir.parent or something like that, i.e.
derive it from the plan and run itself - they should already be aware of
their workdir and its root.
—
Reply to this email directly, view it on GitHub
<#2834 (comment)>, or
unsubscribe
<https:/notifications/unsubscribe-auth/AKFR23COZMFXBMUGQTDOZBLY4JXPRAVCNFSM6AAAAABF4NI4P6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBSGQYTGMJXGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I disagree, that's exactly what we should not do. By the time So you have two issues for the price of one:
So to me, adding this computation to |
Basically, I'd go for the following:
That way, we would control the flow of workdir root info in tmt, from places that have all necessary info to decide what the workdir root should be to mere users, like Propagating |
Here is the first merge request:#2850 ^^ |
If users specify a workdir-root different from TMT_WORKDIR_ROOT ,clean guests will fail,
that's because virtual plugin doesn't accept and apply cli_opts
dev) lnie@fedora:~/tmt$ echo $TMT_WORKDIR_ROOT
/var/tmp/tmt
(dev) lnie@fedora:~/tmt$ tmt clean guests -vvdd --workdir-root /var/tmp/test
clean
guests
Using tree '/home/lnie/tmt'.
Workdir '/var/tmp/test/run-001' already exists.
Read file '/var/tmp/test/run-001/run.yaml'.
Workdir '/var/tmp/test/run-001/plans/testcloud' already exists.
Create the data directory '/var/tmp/test/run-001/plans/testcloud/data'.
Create the environment file '/var/tmp/test/run-001/plans/testcloud/data/variables.env'.
Workdir '/var/tmp/test/run-001/plans/testcloud/discover' already exists.
Read file '/var/tmp/test/run-001/plans/testcloud/discover/step.yaml'.
Successfully loaded step data.
Module 'tmt.steps.discover.shell' already imported.
status: done
Read file '/var/tmp/test/run-001/plans/testcloud/discover/tests.yaml'.
Workdir '/var/tmp/test/run-001/plans/testcloud/provision' already exists.
Read file '/var/tmp/test/run-001/plans/testcloud/provision/step.yaml'.
Successfully loaded step data.
Module 'tmt.steps.provision.testcloud' already imported.
status: done
Read file '/var/tmp/test/run-001/plans/testcloud/provision/guests.yaml'.
Module 'tmt.steps.provision.testcloud' already imported.
Workdir '/var/tmp/test/run-001/plans/testcloud/prepare' already exists.
Read file '/var/tmp/test/run-001/plans/testcloud/prepare/step.yaml'.
Successfully loaded step data.
Module 'tmt.steps.prepare.install' already imported.
Module 'tmt.steps.prepare.shell' already imported.
status: todo
Workdir '/var/tmp/test/run-001/plans/testcloud/execute' already exists.
Read file '/var/tmp/test/run-001/plans/testcloud/execute/step.yaml'.
Successfully loaded step data.
Module 'tmt.steps.execute.internal' already imported.
status: todo
Read file '/var/tmp/test/run-001/plans/testcloud/execute/results.yaml'.
Workdir '/var/tmp/test/run-001/plans/testcloud/report' already exists.
Read file '/var/tmp/test/run-001/plans/testcloud/report/step.yaml'.
Successfully loaded step data.
Module 'tmt.steps.report.display' already imported.
status: todo
Workdir '/var/tmp/test/run-001/plans/testcloud/finish' already exists.
Read file '/var/tmp/test/run-001/plans/testcloud/finish/step.yaml'.
Successfully loaded step data.
Module 'tmt.steps.finish.shell' already imported.
status: todo
Read file '/var/tmp/test/run-001/plans/testcloud/provision/step.yaml'.
Successfully loaded step data.
Module 'tmt.steps.provision.testcloud' already imported.
Read file '/var/tmp/test/run-001/plans/testcloud/provision/guests.yaml'.
Module 'tmt.steps.provision.testcloud' already imported.
Step is done, not touching its data.
Using the 'ProvisionTestcloud' plugin for the 'virtual' method.
step is done, not overwriting plugin data
Waking up testcloud instance 'tmt-001-uduSmlAv'.
testcloud version: 0.9.12
Provision wake up complete (already done before).
Stopping guests in run '/var/tmp/test/run-001' plan '/plans/testcloud'.
finish
workdir: /var/tmp/test/run-001/plans/testcloud/finish
The text was updated successfully, but these errors were encountered: