Skip to content
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

The feature plugin for epel does not work on command line #3032

Closed
psss opened this issue Jun 20, 2024 · 3 comments · Fixed by #3126
Closed

The feature plugin for epel does not work on command line #3032

psss opened this issue Jun 20, 2024 · 3 comments · Fixed by #3126
Assignees
Labels
step | prepare Stuff related to the prepare step
Milestone

Comments

@psss
Copy link
Collaborator

psss commented Jun 20, 2024

Seems that the feature plugin for epel is broken when called from the command line:

tmt run provision --how container --image centos:stream9 prepare --how feature --epel enabled login finish

Results into:

prepare
    prepare task #1: default-0 on default-0
    how: feature
    Enable EPEL
    fail: 

Works nicely when provided as a plan:

provision:
    how: container
    image: centos:stream9
prepare:
  - how: feature
    epel: enabled
  - how: install
    package: beakerlib
execute:
    how: tmt
    script: rpm -q beakerlib
@psss psss changed the title The feature prepare plugins for epel does not work on command line The feature plugin for epel does not work on command line Jun 20, 2024
@psss psss added this to the 1.35 milestone Jun 20, 2024
@therazix
Copy link
Collaborator

The issue appears to be caused by a missing fmf root. When the command-line option is used and the .fmf directory is not found, the root is set to None, leading to a failure at this line. The root is required when creating a relative path to the playbook here and here.

If we run the same command in a directory where the fmf tree exists, it seems to work correctly.

tmt init
tmt run provision --how container --image centos:stream9 prepare --how feature --epel enabled login finish

Results into:

prepare
    queued push task #1: push to default-0
    
    push task #1: push to default-0

    queued prepare task #1: default-0 on default-0
    queued prepare task #2: requires on default-0
    
    prepare task #1: default-0 on default-0
    how: feature
    Enable EPEL
    
    prepare task #2: requires on default-0
    how: install
    summary: Install required packages
    name: requires
    where: default-0
    package: /usr/bin/flock

    queued pull task #1: pull from default-0
    
    pull task #1: pull from default-0

    summary: 2 preparations applied

How should we handle this? Should we improve the error message or use a different path when the fmf root is not found?

@martinhoyer
Copy link
Collaborator

Keeping open as per #3126 (comment)

@martinhoyer martinhoyer modified the milestones: 1.36, 1.37 Sep 4, 2024
@psss
Copy link
Collaborator Author

psss commented Sep 13, 2024

Just verified with tmt-1.36 that applying the epel playbook works nicely even outside of an fmf tree. The use case above has been fixed by 3126 and now works as expected.

@psss psss modified the milestones: 1.37, 1.36 Sep 13, 2024
@psss psss linked a pull request Sep 13, 2024 that will close this issue
7 tasks
@psss psss added the step | prepare Stuff related to the prepare step label Sep 13, 2024
@psss psss closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
step | prepare Stuff related to the prepare step
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants