Save a Connection created by AddConnectionUnsaved does not store the PSK
When developing a setup procedure using AddConnectionUnsaved and Settings.Connection.Save, I stumbled over the issue demonstrated in the attached script:
-
Working:
- AddConnectionUnsaved
- ActivateConnection
- Settings.Connection.Save
- => the created connection file contains PSK
-
Not Working:
- AddConnectionUnsaved
- ActivateConnection
- Wait for connection established
- Settings.Connection.Save
- => the created connection file is missing the PSK
-
Working:
- AddConnectionUnsaved
- ActivateConnection
- Wait for connection established
- Settings.Connection.GetSecrets
- Settings.Connection.Save
- => the created connection files contains a PSK
How to use the script:
./nm-issue.sh save-immediately
... will create and connect, then save without any waiting. Afterwards it will try to find the PSK in the according connection file.
./nm-issue.sh wait-for-active
... will create and connect, then wait for the connection to be established, then save. When trying to find the PSK in the according connection file, it will fail.
./nm-issue.sh get-secrets
... will create and connect, then wait for the connection to be established, then call GetSecrets, then save. When trying to find the PSK in the according connection file, it will succeed.
Expected behavior would be that all three test cases will create proper connection files.
Running NM 1.22.10 on Ubuntu 20.04.3 LTS (Focal Fossa) Reproducible with NM 1.18.4 on yocto-based ARM firmware