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
Support optional machine alias besides the machine ID #8
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
margamanterola
reviewed
Dec 1, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One nitpick about one of the comments.
Also, there's 2 typos in the commit description: the first line says "unique identifier or a client" and it should be "of a client". Then it says "Nebraska support" and it should be "Nebraska supports".
The machine ID is the unique identifier of a client but it does not carry much information about the machine and is hard to remember or compare for humans. Nebraska supports an optional machinealias Omaha field to display besides the machine ID. Allow to set a MACHINE_ALIAS variable in the update.conf file to specify the machine_alias field and fall back to the empty string otherwise which will be ignored by Nebraska. As with the other variables in /etc/flatcar/update.conf the MACHINE_ALIAS variable can be changed while update-engine runs and it will pick up the change, which is useful for scripts that set the machine alias like this: sudo sed -i "/MACHINE_ALIAS=.*/d" /etc/flatcar/update.conf echo "MACHINE_ALIAS=$(hostname)" | sudo tee -a /etc/flatcar/update.conf
fa54db5
to
077876e
Compare
sayanchowdhury
approved these changes
Dec 3, 2020
pothos
added a commit
to flatcar/coreos-overlay
that referenced
this pull request
Dec 3, 2020
This pulls in flatcar/update_engine#8 to support sending a machine alias to the update server.
pothos
added a commit
to flatcar/coreos-overlay
that referenced
this pull request
Dec 8, 2020
This pulls in flatcar/update_engine#8 to support sending a machine alias to the update server.
pothos
added a commit
to flatcar/coreos-overlay
that referenced
this pull request
Dec 8, 2020
This pulls in flatcar/update_engine#8 to support sending a machine alias to the update server.
pothos
added a commit
to flatcar/coreos-overlay
that referenced
this pull request
Dec 15, 2020
This pulls in flatcar/update_engine#8 to support sending a machine alias to the update server.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
The machine ID is the unique identifier of a client but it does not
carry much information about the machine and is hard to remember or
compare for humans. Nebraska supports an optional machinealias Omaha
field to display besides the machine ID.
Allow to set a MACHINE_ALIAS variable in the update.conf file to
specify the machine_alias field and fall back to the empty string
otherwise which will be ignored by Nebraska. As with the other
variables in /etc/flatcar/update.conf the MACHINE_ALIAS variable can be
changed while update-engine runs and it will pick up the change, which
is useful for scripts that set the machine alias like this:
How to use
Build an image and set the new variable and observe the effect in Nebraska.
Testing done
Built an image and first steered the machine to a local Nebraska (set SERVER=http://…, FLATCAR_RELEASE_VERSION=3333.0.0, and GROUP=stable) and triggered an update to see that it registers (but doesn't update because there is no newer version), then added the machine alias variable and triggered an update again, seeing the alias set in Nebraska.