/ update_engine Public
Support optional machine alias besides the machine ID #8
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.
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.