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
Fix remove machine-id #4056
Comments
Launchpad user Brett Holman(holmanb) wrote on 2022-12-15T16:30:18.820463+00:00
I don't agree that that's not a thing that should happen. That is the stated purpose of this (new) flag. Please provide more details explaining how this behavior is incorrect for upstream cloud-init. |
Launchpad user Brett Holman(holmanb) wrote on 2022-12-15T16:36:42.920363+00:00
Based on this comment it sounds like maybe you hit a bug in an Ubuntu image and didn't know where to file it? If so, upstream cloud-init is likely not the right place, but if you share some details about your issue, we can try point you to the right project. Are you experiencing something similar to that bug you linked? |
Launchpad user l33tname(sirl33tname) wrote on 2022-12-19T19:20:36.271005+00:00 Yes if you delete /etc/machine-id from a ubuntu the image is broken.
I personally care more about that it works and less if it is fixed in ubunut or cloud-init. Problem is that if you remove /etc/machine-id your ubuntu system is broken. |
Launchpad user James Falcon(falcojr) wrote on 2023-01-03T15:57:07.070194+00:00 l33tname, can you explain what you're trying to accomplish? We need to understand the use case to know if this particular flag is a problem, or if we need to redirect your problem to another project. |
Launchpad user l33tname(sirl33tname) wrote on 2023-01-06T15:40:03.181047+00:00
I call it as part of my packer setup for my golden image.
|
Launchpad user Brett Holman(holmanb) wrote on 2023-01-06T17:28:39.966315+00:00
Which release of Ubuntu did you use?
Can you please attach the logs containing the errors you are seeing?
I don't think this statement is true. See the snippet from machine-id(5) below.
I don't think this is true. See this snippet from machine-id(5): FIRST BOOT SEMANTICS
|
Launchpad user Brett Holman(holmanb) wrote on 2023-01-06T17:29:02.663537+00:00 Also note that it works as expected on Jammy. $ lxc shell me |
Launchpad user Brett Holman(holmanb) wrote on 2023-01-06T18:59:22.078435+00:00 Looks like the issue you're hitting relates to older Ubuntu releases. bionic machine-id(5):
There is a problem, however, with simply making this file an empty file in all cases, since this would change first boot determination on newer systems: jammy machine-id(5): |
Launchpad user l33tname(sirl33tname) wrote on 2023-01-07T11:19:02.879931+00:00
And at least in the image I use: |
Launchpad user l33tname(sirl33tname) wrote on 2023-01-07T12:36:30.243025+00:00 I just checked and interestingly enough the lxd container also does not have systemd-firstboot but seems to work as you pointed out. machine-id is properly regenerated |
Launchpad user Brett Holman(holmanb) wrote on 2023-01-10T16:52:23.291658+00:00 For now, you should be able to use one of the following sequences as a workaround: cloud-init clean --seed --logs --machine-id or alternatively cloud-init clean --seed --logs |
Launchpad user Chad Smith(chad.smith) wrote on 2023-01-12T05:46:41.824045+00:00 Pull request up for discussion of this bug #1953 |
Launchpad user Alberto Contreras(aciba) wrote on 2023-02-22T16:52:38.781332+00:00 This bug is believed to be fixed in cloud-init in version 23.1. If this is still a problem for you, please make a comment and set the state back to New Thank you. |
This bug was originally filed in Launchpad as LP: #1999680
Launchpad details
Launchpad user l33tname(sirl33tname) wrote on 2022-12-14T17:43:32.169271+00:00
Right now --machine-id removes the /etc/machine-id file.
But apparently that's not the thing that should happen it should
only be truncated.
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1508766
Either fix it here or provide the systemd-firstboot with ubuntu.
The text was updated successfully, but these errors were encountered: