Skip to content

Conversation

@yasminvalim
Copy link
Contributor

@yasminvalim yasminvalim commented Dec 15, 2025

The fix removes the marshalli, now the code return raw bytes directly instead of marshalling parsed configs.

@yasminvalim yasminvalim self-assigned this Dec 15, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses an issue where empty metadata from the OpenStack service was not handled, leading to errors. The fix is straightforward and effective, adding a check for errors.ErrEmpty. The inclusion of a new test case to cover this scenario is a great addition. I have one suggestion to further improve the robustness of the error handling.

@yasminvalim yasminvalim added the skip-notes This PR does not need release notes label Dec 15, 2025
@prestist prestist removed the skip-notes This PR does not need release notes label Dec 16, 2025
@prestist
Copy link
Collaborator

prestist commented Dec 16, 2025

So I dont think this is the correct way to handle our issue unfortunately.

We will need release notes under fixes or bug fixes as we are fixing a bug in an older release.

Regarding the contents of the changes.

An easy way to remove the whole unmarshaling thing and pull the thread of what needs to change would be to remove the "encoding/json" import. That should highlight the unmarshaling code.

fetchConfigFromMetadataServiceIPv4Only and fetchConfigParallel both need changes.

The former needs to return unaltered data and the latter needs a signature change "return []byte" and also ensure unaltered data.

@yasminvalim yasminvalim changed the title openstack: handle ErrEmpty when metadata service returns empty data openstack: handle when metadata service returns empty data Dec 16, 2025
@yasminvalim yasminvalim force-pushed the bugfix-openstack-support branch from 96f4dd2 to 12f142f Compare December 16, 2025 18:46
…g/json

Remove encoding/json, changed fetchConfigFromMetadataServiceIPv4Only and fetchConfigParallel now returning raw data
@yasminvalim yasminvalim force-pushed the bugfix-openstack-support branch from 12f142f to d0c5d54 Compare December 16, 2025 19:01
@yasminvalim
Copy link
Contributor Author

yasminvalim commented Dec 16, 2025

@prestist Thanks for all information. I update the code to return raw bytes from fetchConfigParallel and fetchConfigFromMetadataServiceIPv4Only with no marshalling. Now we are not using FetchConfigDualStack because it returns a parsed types.Config anymore. I guess this is enough to fix the bug, but I need to test it manually and run the kola tests locally to be sure.

Can you take a look and see if this new changes makes sense?

@prestist
Copy link
Collaborator

@prestist Thanks for all information. I update the code to return now return raw bytes from fetchConfigParallel and fetchConfigFromMetadataServiceIPv4Only with no marshalling. Now we are not using FetchConfigDualStack because it returns a parsed types.Config anymore. I guess this is enough to fix the bug, but I need to test it manually and run the kola tests locally to be sure.

Can you take a look and see if this new changes makes sense?

Sure taking a look now :)

Copy link
Collaborator

@prestist prestist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is about what I was expecting, the main thing is to ensure dual stack still works (it should not really a big diffrence here) and then verify it fixed the kola test that was failing.

Overall LGTM, thank you for fixing this so quick!

Once you have tested it I will approve :)

@prestist
Copy link
Collaborator

@marmijo and @yasminvalim verified the efficacy of these changes and we can land them.

@prestist prestist merged commit b97b22c into coreos:main Dec 22, 2025
10 checks passed
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.

2 participants