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

exoscale: disk images fail to provision #1160

Closed
dustymabe opened this issue Apr 9, 2022 · 12 comments · Fixed by coreos/fedora-coreos-docs#401 or mohelt/fedora-coreos-docs#1
Closed

Comments

@dustymabe
Copy link
Member

dustymabe commented Apr 9, 2022

I'm doing some testing on 36.20220325.1.0 for the Fedora CoreOS 36 Test Week. Trying to boot on Exoscale and it's not clear why initially. After grabbing the grub prompt and removing console=ttyS0.. from the kernel arguments I'm able to see it thinks it's getting garbage back from the meta-data service.

It turns out the user-data is now gzip compressed.

Another wrinkle is that you can't boot the nodes without any config at all. The service replies to http://169.254.169.254/1.0/user-data with an empty file. We need to handle that in the code as well. I guess in the past if this was the case the metdata service wouldn't reply with not found or something.


Update in #1160 (comment)

dustymabe added a commit to dustymabe/ignition that referenced this issue Apr 9, 2022
It appears the metadata service switched to compressing the user-data.
Let's adapt for that.

Fixes coreos/fedora-coreos-tracker#1160
@bgilbert
Copy link
Contributor

bgilbert commented Apr 9, 2022

Another wrinkle is that you can't boot the nodes without any config at all. The service replies to http://169.254.169.254/1.0/user-data with an empty file. We need to handle that in the code as well. I guess in the past if this was the case the metdata service wouldn't reply with not found or something.

We do handle that in the code. What error are you seeing in this case?

@dustymabe
Copy link
Member Author

Another wrinkle is that you can't boot the nodes without any config at all. The service replies to http://169.254.169.254/1.0/user-data with an empty file. We need to handle that in the code as well. I guess in the past if this was the case the metdata service wouldn't reply with not found or something.

We do handle that in the code. What error are you seeing in this case?

More info over at coreos/ignition#1345 (comment)

@bgilbert
Copy link
Contributor

bgilbert commented Apr 9, 2022

Okay, so you're saying we do handle empty configs correctly now, but the gzip case adds additional complications?

@dustymabe
Copy link
Member Author

Okay, so you're saying we do handle empty configs correctly now, but the gzip case adds additional complications?

Maybe before they converted to compressed user-data it worked when there was an empty config. But certainly now it doesn't work. So I think the answer to your question is "yes".

I can do some more testing around this later and see if going back to non GZIP setting in FetchOptions allows it to work (If I remember correctly it still didn't work right).

@bgilbert
Copy link
Contributor

bgilbert commented Apr 9, 2022

As I understand it, you're seeing the metadata service provide compressed metadata if a config was provided, and provide zero-length metadata if no config was provided. In that case, an unmodified FCOS image should correctly handle the no-config case, since no gzip is involved there. If not, then our understanding is wrong, and we should track that down. A console log would really help here.

@dustymabe
Copy link
Member Author

As I understand it, you're seeing the metadata service provide compressed metadata if a config was provided, and provide zero-length metadata if no config was provided. In that case, an unmodified FCOS image should correctly handle the no-config case, since no gzip is involved there.

Went back and tested. This is correct. With no config the current next image (36.20220325.1.0) comes up.

dustymabe added a commit to dustymabe/ignition that referenced this issue Apr 11, 2022
It appears the metadata service switched to compressing the user-data.
Let's adapt for that.

We couldn't do this by simply adding Compression: "gzip" to the
FetchOptions because there is a corner case where passing in no
config means the metadata service provides an empty file. This breaks
the gzip path in decompressCopyHashAndVerify(). To workaround we'll
first read in all the data, check it for zero length and then
decompress.

Fixes coreos/fedora-coreos-tracker#1160
dustymabe added a commit to dustymabe/ignition that referenced this issue Apr 11, 2022
It appears the metadata service switched to compressing the user-data.
Let's adapt for that.

We couldn't do this by simply adding Compression: "gzip" to the
FetchOptions because there is a corner case where passing in no
config means the metadata service provides an empty file. This breaks
the gzip path in decompressCopyHashAndVerify(). To workaround we'll
first read in all the data, check it for zero length and then
decompress.

Fixes coreos/fedora-coreos-tracker#1160
dustymabe added a commit to dustymabe/ignition that referenced this issue Apr 12, 2022
It appears the metadata service switched to compressing the user-data.
Let's adapt for that.

We couldn't do this by simply adding Compression: "gzip" to the
FetchOptions because there is a corner case where passing in no
config means the metadata service provides an empty file. This breaks
the gzip path in decompressCopyHashAndVerify(). To workaround we'll
first read in all the data, check it for zero length and then
decompress.

Fixes coreos/fedora-coreos-tracker#1160
@dustymabe
Copy link
Member Author

dustymabe commented Apr 12, 2022

It turns out the compressed user-data only happens when using the exo CLI. When using the web UI the data isn't compressed.

See coreos/ignition#1345 (comment)

@dustymabe
Copy link
Member Author

For the record here is the error the user would see:

Untitled

dustymabe added a commit to dustymabe/ignition that referenced this issue Apr 12, 2022
It appears the userdata can be provided compressed. Currently it
appears to be based on whether the user is using the web UI or
the CLI. Either way let's adapt so that we can handle either way.

Fixes coreos/fedora-coreos-tracker#1160
dustymabe added a commit to dustymabe/ignition that referenced this issue Apr 12, 2022
It appears the userdata can be provided compressed. Currently it
appears to be based on whether the user is using the web UI or
the CLI. Either way let's adapt so that we can handle either way.

Fixes coreos/fedora-coreos-tracker#1160
dustymabe added a commit to dustymabe/ignition that referenced this issue Apr 12, 2022
It appears the userdata can be provided compressed. Currently it
appears to be based on whether the user is using the web UI or
the CLI. Either way let's adapt so that we can handle either way.

Fixes coreos/fedora-coreos-tracker#1160
@dustymabe
Copy link
Member Author

OK. The exoscale CLI has been updated to not compress by default exoscale/cli#451 - Maybe we just update our docs to tell people not to use --cloud-init-compress.

@bgilbert
Copy link
Contributor

bgilbert commented May 3, 2022

Yes, and to use a suitable version of the CLI.

@dustymabe
Copy link
Member Author

The exoscale CLI has been updated to not compress by default exoscale/cli#451

This landed in https://github.com/exoscale/cli/releases/tag/v1.54.0

dustymabe added a commit to dustymabe/fedora-coreos-docs that referenced this issue May 3, 2022
Recommend users to use v1.54.0 and above and to never use the
`--cloud-init-compress` argument.

Closes coreos/fedora-coreos-tracker#1160
@dustymabe
Copy link
Member Author

docs update: coreos/fedora-coreos-docs#401

dustymabe added a commit to coreos/fedora-coreos-docs that referenced this issue May 3, 2022
Recommend users to use v1.54.0 and above and to never use the
`--cloud-init-compress` argument.

Closes coreos/fedora-coreos-tracker#1160
mohelt pushed a commit to mohelt/fedora-coreos-docs that referenced this issue May 9, 2022
Disable automatic configuration on ethernet devices (DHCP/SLAAT) with no other matching connections

Update modules/ROOT/pages/sysconfig-network-configuration.adoc

Co-authored-by: Dusty Mabe <[email protected]>

Update modules/ROOT/pages/sysconfig-network-configuration.adoc

Co-authored-by: Dusty Mabe <[email protected]>

Update modules/ROOT/pages/sysconfig-network-configuration.adoc

Co-authored-by: Dusty Mabe <[email protected]>

Update modules/ROOT/pages/sysconfig-network-configuration.adoc

Co-authored-by: Dusty Mabe <[email protected]>

provisioning/exoscale: Add note/warning about CLI compression

Recommend users to use v1.54.0 and above and to never use the
`--cloud-init-compress` argument.

Closes coreos/fedora-coreos-tracker#1160

Add page for enabling kdump through ignition (coreos#388)

sysconfig-network-configuration: Improve readability and look

Improve readability and look of sysconfig-network

Final commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment