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

feat: add cdi path to engine config #1834

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

micahcc
Copy link

@micahcc micahcc commented Jan 31, 2024

In response to:
containers/podman#18292

Adds config to pass CDI spec directory, so that it can be overridden. The enables rootless containers since otherwise users have to write to one of the shared, usually only root writeable paths at in /etc or /var.

Named to match cri-o's name

@micahcc micahcc changed the title add cdi config feat: add cdi path to engine config Jan 31, 2024
@rhatdan
Copy link
Member

rhatdan commented Jan 31, 2024

If you add a new field you need to document it in containers.conf file as well as containers.conf.5.md man page.

Is this for CRI-O or actually necessary for Podman? If this is just CRI-O then should it be in cri-o.conf file?

@haircommander @saschagrunert PTAL

Comment on lines 331 to 334
// Location of CDI configuration files. These define mounts devices and
// other configs according to the CDI spec. In particular this is used
// for GPU passthrough.
CdiSpecDir attributedstring.Slice `toml:"cdi_spec_dir,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saschagrunert are you saying this can be accomplished with CRI-O config? Or are you saying this should follow the same pattern fo CRIO? Or are you saying this is a useful thing to have?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably rename to cdi-spec-dirs to match

@rhatdan
Copy link
Member

rhatdan commented Jan 31, 2024

My brain read CNI not CDI, sorry about my confusion. Man page and containers.conf changes required though. Add a test also.

@micahcc
Copy link
Author

micahcc commented Feb 3, 2024

@rhatdan first PR.... where are the man page and containers.conf located?

@micahcc
Copy link
Author

micahcc commented Feb 25, 2024

@rhatdan can you take another look?

@rhatdan
Copy link
Member

rhatdan commented Feb 26, 2024

Please squash your commits and make sure they have proper signature
/approve
LGTM
@saschagrunert @Luap99 @vrothberg PTAL

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'd like to see a test with more than one directory. Just to be extra sure it's working as expected.

@micahcc
Copy link
Author

micahcc commented Mar 2, 2024

@vrothberg updated

Comment on lines 355 to 356
// Given
config1, err := New(nil)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks like a formatting issue. Same for the comments below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm yeah will fix

@micahcc micahcc force-pushed the mcc/add_cdi_arg branch 2 times, most recently from e43da3b to 1b58bc1 Compare March 7, 2024 04:58
@micahcc
Copy link
Author

micahcc commented Mar 7, 2024

How do I get the LGTM label?

@micahcc
Copy link
Author

micahcc commented Mar 16, 2024

@rhatdan how do I merge this?

@rhatdan
Copy link
Member

rhatdan commented Mar 17, 2024

@saschagrunert @vrothberg PTAL

Needs a second LGTM.

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

openshift-ci bot commented Mar 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: micahcc, rhatdan, saschagrunert

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rhatdan
Copy link
Member

rhatdan commented Mar 25, 2024

@cevich Any idea why this has not merged?

@cevich
Copy link
Member

cevich commented Mar 25, 2024

Ahh, yes, I see the problem. This PR is using really old code. Rebase it on main, then CI and the bot will work as expected.

Ref. Fix: #1906

Adds config to pass CDI spec directory, so that it can be overridden.
The enables rootless containers since otherwise users have to write to
one of the shared, usually only root writeable paths at in /etc or /var.

Signed-off-by: Micah Chambers <[email protected]>
Signed-off-by: Micah Chambers (minerva) <[email protected]>
@micahcc
Copy link
Author

micahcc commented Mar 28, 2024

@cevich ok, rebased, force pushed with sign 🤞

@cevich
Copy link
Member

cevich commented Mar 28, 2024

I see the fix has now been incorporated. @saschagrunert @rhatdan PTAL again, the bot should behave now.

@rhatdan
Copy link
Member

rhatdan commented Mar 28, 2024

/lgtm
Thanks @micahcc

@openshift-ci openshift-ci bot added the lgtm label Mar 28, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 8a0398c into containers:main Mar 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants