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

Remove dependency on uuidgen #626

Merged
merged 2 commits into from
Nov 20, 2024
Merged

Conversation

simondeziel
Copy link
Member

ovs-ctl uses uuidgen only on the first startup when there is no system-id.conf file. After the first startup, the freshly created UUID is saved into that file for later use.

By generating the exact same kind and format of UUID ahead of time using systemd-id128 (readily available from core base), we can remove that dependency on uuidgen.

Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

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

What project were you working on to come across this out of interest?

@simondeziel
Copy link
Member Author

What project were you working on to come across this out of interest?

Saw that uuid-runtime package while working on canonical/lxd#14497 and that jogged my memory about wanting to drop that snap dep :)

@simondeziel
Copy link
Member Author

This was tested successfully to generate and persist a UUID between snap restarts after doing snap set lxd openvswitch.builtin=true. The patched daemon.start was bind mount for the test and /bin/false was bind mount on top of /snap/lxd/curent/bin/uuidgen to make sure that binary wasn't used.

@simondeziel simondeziel marked this pull request as ready for review November 19, 2024 21:40
@tomponline tomponline merged commit c300b9d into canonical:latest-edge Nov 20, 2024
4 checks passed
@simondeziel simondeziel deleted the uuidgen branch November 20, 2024 14:20
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