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

Config: Revert map[string]string change for server settings #13498

Merged
merged 18 commits into from
May 24, 2024

Conversation

roosterfish
Copy link
Contributor

This reverts the change of the server config from map[string]any to map[string]string performed in #13373 as it breaks the lxc client when talking to older servers that still return a map[string]any on the clients GetServer() call.

See the reproducer steps here #13373 (comment).

It still keeps the bits from #13373 that removed the hidden configuration option as those changes are not connected with each other.

An option would have been to adapt the client to be able to talk with both the newer and older server but users of the pure REST API are also affected by this as config settings that were originally an int or bool are now returned as a string.
Contrary when setting the value they always have to be provided as a string in the JSON payload.

To not break the API we have to keep map[string]any.

@github-actions github-actions bot added the API Changes to the REST API label May 23, 2024
This reverts commit c9b39ed.

Signed-off-by: Julian Pelizäus <[email protected]>
This reverts commit 0410572.

Signed-off-by: Julian Pelizäus <[email protected]>
This reverts commit f46b54b.

Signed-off-by: Julian Pelizäus <[email protected]>
This reverts commit 9e9c362.

Signed-off-by: Julian Pelizäus <[email protected]>
This reverts commit 2346992.

Signed-off-by: Julian Pelizäus <[email protected]>
This reverts commit c746027.

Signed-off-by: Julian Pelizäus <[email protected]>
This reverts commit 517dc0f.

Signed-off-by: Julian Pelizäus <[email protected]>
This reverts commit d5c0ce6.

Signed-off-by: Julian Pelizäus <[email protected]>
This reverts commit 43d1eb1.

Signed-off-by: Julian Pelizäus <[email protected]>
@github-actions github-actions bot added the Documentation Documentation needs updating label May 24, 2024
Copy link

Heads up @ru-fu - the "Documentation" label was applied to this issue.

@roosterfish roosterfish marked this pull request as ready for review May 24, 2024 10:50
@roosterfish
Copy link
Contributor Author

@MusicDin using your reproducer I can confirm this unblocks the failing client when using a 5.0.3 server with the core.trust_password setting:

require github.com/canonical/lxd v0.0.0-20240523230039-b975d5778417

replace github.com/canonical/lxd => /home/julian/dev/lxd // changes from this PR
julian@thinkpad:~/dev/test/lxdtest$ go run main.go
Server version: 5.0.3
Instance name: v1
Instance arch: x86_64
Instance type: virtual-machine
Instance stat: Running

@MusicDin
Copy link
Member

Yep. Thank you very much 🚀

@tomponline tomponline merged commit a2426b7 into canonical:main May 24, 2024
29 checks passed
@roosterfish roosterfish deleted the fix_config branch May 24, 2024 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants