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

AA: add UpdateConfiguration API #549

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

Xynnn007
Copy link
Member

As discussed, this API is a workaround API for CoCo to apply initdata proposal. Once we agree on a better way (like systemd scheme), we can deprecate the API.

See kata-containers/kata-containers#9468

cc @fitzthum

@Xynnn007 Xynnn007 requested review from jialez0 and sameo as code owners April 24, 2024 02:14
@Xynnn007 Xynnn007 force-pushed the aa-updateconf branch 3 times, most recently from daa6ddb to 18ec35f Compare April 24, 2024 02:32
As discussed, this API is a workaround API for CoCo to apply initdata
proposal. Once we agree on a better way (like systemd scheme), we can
deprecate the API.

Signed-off-by: Xynnn007 <[email protected]>
Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

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

Looks good. One question.

tmpfile
.path()
.as_os_str()
.to_str()
Copy link
Member

@fitzthum fitzthum Apr 24, 2024

Choose a reason for hiding this comment

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

If this function takes a str, can we just use that directly in try_from rather than writing it to a tmp file?

Copy link
Member Author

Choose a reason for hiding this comment

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

The str here means the path. This is actually misleading.

Copy link
Member

Choose a reason for hiding this comment

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

oh right. I didn't read this closely enough.

I'm not really a fan of the tmpfile thing but I guess we can live with it temporarily. Another approach would be to have the kata agent write the file, like it will with other configs and just take the path here.

What is the purpose of the underscore here?

Copy link
Member Author

Choose a reason for hiding this comment

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

config is actually used only in the features coco-as and kbs. Without a underscore the lint will cry when we enable neither of them.

@Xynnn007 Xynnn007 merged commit 3e321fd into confidential-containers:main Apr 26, 2024
15 checks passed
@Xynnn007 Xynnn007 deleted the aa-updateconf branch April 26, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants