cloud-init team mailing list archive
-
cloud-init team
-
Mailing list archive
-
Message #00469
Re: The "maybe trap"
-
To:
Brett Holman <brett.holman@xxxxxxxxxxxxx>
-
From:
Robert Schweikert <rjschwei@xxxxxxxx>
-
Date:
Thu, 14 Mar 2024 07:19:23 -0400
-
Authentication-results:
smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=dwDxOm0k
-
Autocrypt:
addr=rjschwei@xxxxxxxx; keydata= xsBNBFNXkrABCADLEZufvUtnTs8CvygaUT8U9CMseEilU6MZoTgOQrYANuWNVWT91WweQuiQ psDJWnTZuTD9IRxuNeO4VRbbb0VaVef5IEPWoSrZnGqYuA5NqA9Bo4xwsmm089DEDWZa6+Em hrvaSUcYOnwc7VOKpGrl3ksYG0PWe7fUOHa1WaLVnqWMGGcaa/ljw55sXLh7SrueuD32ZJEl 4uWrPpujs7hjzd0DhdkdPtzFyi43XAC6SS6ksRd7KyGkKJErSwgPuL9oOjfIippstqz7WNJg 7cJQ6qA9NHrc9PcqODLzOXAF3VPRgdO9U2IhE2a3cz9UEucfv3jpMSn33f1M1wSDEsFnABEB AAHNJ1JvYmVydCBKIFNjaHdlaWtlcnQgPHJqc2Nod2VpQHN1c2UuY29tPsLAeQQTAQIAIwUC U1eTNAIbAwcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEE4FgL32d2UkHZgH/jn+HNIH nXLr/pHRkUQWCZtGbYoDXlk8QomAZiGUj/+2xSbxag45gyaTtEN5eh39jRvBH1RX5B+wJarC LSo/gutl2XGf4ULyldTjX6RMgi9EVgW9+byQuQmDnBSbnpp0QTyV4wxQpkpJ709O+GjRKV7q ktlGhiyYKamOO3v/zIADQcco4gNCel6I/RZWfZJ5BfjwrBZZ+cgdIG2AHCitnhtkJIQ4KP3P +Z6va8xC1M+EiEooZu5aDKUTUu99yvmKr9F2nZigpVZRb/SqXiiZp1s3O1wYtqDzvE5ti4XY 27mLiOTBsNEvDB20RERqEidoHT+WkS8hevKvSGdkmNTgqGPOwE0EU1eSsAEIAM+5gLM95G0L IyoY01tRdnXAUCeEOzRTHhtPA5eXIvNU9npza2MNxYJI1XJhlUah3RRbqJluoNniA4bZNlcC OQU0Y0WvrYsqYnWGpqp61dDogwZexwGSBXn+4z5QoU6Wfc8XcewcZFLBVcJw0gceu0lbnYJU LfrPEWzLckRXx9ngnTg/GQTtpqDA8Xd+0CIpZEEFXskCE1kKZBRqJ1W+Re5HUelLfpWLsQn5 DuHjLnjCHXFut2RW2pbTqHEK2yAPMMbKm6wJKq7pIMKZ73YcX9205bIRbhYQGyQ1oEVHt5Yx cBdvlkMNWVUsoEvcYpXK4vGBNU1kGneeaSB+MntsFI0AEQEAAcLAXwQYAQIACQUCU1eSsAIb DAAKCRBOBYC99ndlJN7/B/9pg6rRiZWPmm6l1BTbAnHj41GqMFSAMil371rOnG6hNLGZISUe KfnZdzbUAEDlIRUGAE/A30J2gcOP9Y6zKYffWYK4LlFknFZqDJRsjFkzDjsreQJ1jyvkm33O Dmx3QriBq8uFGWP57m34bs88f1Q3V04wNNLPVYoQjlyqU8ggKwUA3TyojmtUV+c0EUe1pzMd SwO7OhIVmE44WI95qTIA4GsnijWhqVUQXbLlMIFUndLGZ2SQNaeNhi5yeMWPveMFcg26MBwQ hHurJAcOfpOzW8bl7u+zQRlftAqhQ4o4n07dz2lPW+nPXdV68SWIbDsUCRWbInersTFXqUjp 4QxK
-
Cc:
cloud-init <cloud-init@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CAO+PAvZnu9AbOMzxHtsrgk-tSKY+hgw0mJaYFqzmBw9vR-o3LA@mail.gmail.com>
-
User-agent:
Mozilla Thunderbird
Hi,
On 3/13/24 19:59, Brett Holman wrote:
On aarch64 we are falling into the DS_MAYBE from [1] trap. While I do
not see any particular reason not to have a
aarch64) :;;
case to make this deterministic on aarch64 it does ultimately only work
as long as what we are doing sticks to those architectures.
As such I'd really like to get a better understanding why DS_MAYBE
exists. The way I see it it let's ds-identify kind of bail out and pass
the responsibility of identifying a data source to cloud-init by
enabling cloud-init.target.
When this was added, OpenStack was incapable of identifying itself on
non-x86 architectures[1]. The workaround, as you found, was to assume
Openstack is a possible datasource, and pass responsibility to cloud-init.
This unfortunately means that, yes, openstack is assumed on all non-x86
architectures.
Thanks for confirmation. When the responsibility for seraching for a
data source is passed from ds-identify to cloud-init it is my
understanding that cloud-init will write the cloud-id file, which is
symlinked form /run/cloud-init/cloud-id. The file will contain "none" if
an only if no data source if found, at least that is what I think based
on looking through the data sources code.
This means, we could trigger of this to run a different setup process to
isolate us from the format of the status.json file.
Is this correct?
Thanks,
Robert
DMI support on aarch64 has since made its way upstream[2],
however I don't think that anyone has gotten around to verifying whether
OpenStack correctly passes this information through Libvirt.
It looks like Libvirt is aware of aarch64 support for SMBIOS[3], but it doesn't
seem like nova is aware of this yet[4]. I don't know how to go about getting
this fixed, but I naively hope that the attached patch might be a step in the
right direction. Nova's development model / platform isn't intuitive to me,
but if someone knows the right folks to ask about this fix, that would be
helpful towards resolving the issue that you've raised.
Cheers,
Brett
[1] https://bugs.launchpad.net/cloud-init/+bug/1663304
[2] https://bugs.launchpad.net/bugs/1662345
[3] https://github.com/libvirt/libvirt/commit/ec6ce6363a78aaaf6e3aa4c0e2d683d7d0cce183
[4] https://github.com/openstack/nova/blob/db9351ab5191e058994209464aa7fc2b2fa34561/nova/virt/libvirt/driver.py#L6856
On Wed, Mar 13, 2024 at 2:17 PM Robert Schweikert <rjschwei@xxxxxxxx> wrote:
Hi,
On aarch64 we are falling into the DS_MAYBE from [1] trap. While I do
not see any particular reason not to have a
aarch64) :;;
case to make this deterministic on aarch64 it does ultimately only work
as long as what we are doing sticks to those architectures.
As such I'd really like to get a better understanding why DS_MAYBE
exists. The way I see it it let's ds-identify kind of bail out and pass
the responsibility of identifying a data source to cloud-init by
enabling cloud-init.target.
And this is where we are tripping over because we check if cloud-init
got enabled and if it did we skip other stuff. But in this case we need
other stuff to happen.
So instead of checking on whether or not cloud-init got enabled would it
make more sense to check what is in /run/cloud-init/cloud-id?
If it contains "none" do our special stuff?
Thanks,
Robert
[1]
https://github.com/canonical/cloud-init/blob/main/tools/ds-identify#L1368
--
Robert Schweikert MAY THE SOURCE BE WITH YOU
Distinguished Engineer LINUX
rjschwei@xxxxxxxx
IRC: robjo
--
Mailing list: https://launchpad.net/~cloud-init
Post to : cloud-init@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~cloud-init
More help : https://help.launchpad.net/ListHelp
--
Robert Schweikert MAY THE SOURCE BE WITH YOU
Distinguished Engineer LINUX
rjschwei@xxxxxxxx
IRC: robjo
Follow ups
References