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

Use integer instead of string for cidata uid #2274

Closed
wants to merge 1 commit into from

Conversation

afbjorklund
Copy link
Member

sudo cloud-init schema --system

Cloud config schema deprecations: users.0.uid: Changed in version 22.3.
The use of string type is deprecated. Use an integer instead.

It was already an integer, in the template data and in LIMA_CIDATA_UID

Cloud config schema deprecations: users.0.uid:  Changed in version 22.3.
The use of ``string`` type is deprecated. Use an ``integer`` instead.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
@jandubois
Copy link
Member

jandubois commented Apr 8, 2024

Cloud config schema deprecations: users.0.uid: Changed in version 22.3.

22.3 was less than 2 years ago.

Did you verify that the "old" distros we support, like almalinux-8, centos-stream-8, etc. all ship with cloud-init 22.3 or later?

@afbjorklund
Copy link
Member Author

Did you verify that the "old" distros we support, like almalinux-8, centos-stream-8, etc. all ship with cloud-init 22.3 or later?

I did not.

And apparently that was a bad thing, the previous behaviour (before 22.1) was to ignore all integer UIDs...

canonical/cloud-init@2837b83 in 22.1

canonical/cloud-init@45b517a in 22.2

@afbjorklund afbjorklund marked this pull request as draft April 9, 2024 15:17
@afbjorklund
Copy link
Member Author

afbjorklund commented Apr 9, 2024

Living with the deprecated type seems less the lesser evil here, similar to ssh-authorized-keys

Especially since the cloud-init code has this wonderful hack, anyway:

        if "uid" in kwargs.keys():
            kwargs["uid"] = str(kwargs["uid"])

https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1875772

@afbjorklund afbjorklund closed this Apr 9, 2024
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.

3 participants