canonical / charm-cloudsupport

Support charm for OpenStack operations. It's main purpose is to package common tasks into easy-to-use actions.
Other
0 stars 2 forks source link

Fix functional tests on juju3 #27

Closed samuelallan72 closed 2 months ago

samuelallan72 commented 2 months ago

juju model-config had breaking changes for reading from a yaml file between 2.9 and 3.4 - note the new --file argument:

juju 2.9:

$ juju_29 model-config --help
...
Set the model config key value pairs defined in a file:
    juju model-config path/to/file.yaml
...

juju 3.4

$ juju_34 model-config --help
...
Set the model config to key=value pairs defined in a file:

    juju model-config --file path/to/file.yaml
...

Fixes: #22

samuelallan72 commented 2 months ago

The test setup is now successfully updating the cloudinit-userdata model-config:

$ juju model-config cloudinit-userdata
postruncmd:
  - |
    bash -c '
    cat >> /home/ubuntu/.ssh/authorized_keys <<EOF
    ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOOROpTZ33ncLCc0nLqb44Y8T6H5c6Zi0B3qsjVwReHN ubuntu@desktop

    EOF
    '

However test_25_test_connectivity failed for me locally with:

2024-07-02 17:17:10 [INFO] action `test-connectivity` result: failed
{
  "error": "No Server found for warning: Client Error for url: https://10.5.0.116:8774/v2.1/servers/warning, Instance warning could not be found.",
  "return-code": 1
}

I see the CI just passed here, so I guess it was something flaky on my environment. :thinking: