Workaround
Summary
Device workflow deployments from Concerto fail because the Controller rejects the PSK as invalid. The cause is a mismatch between the encryption (public/private) keys stored on the Controller and the keys the Director holds for that Controller. The fix is to regenerate the keys on the Controller, then update the Director's database and encryption metadata to match.
Applies To
Versa Director, Controller (VOS), Concerto
Product versions: 22.1.x
Symptoms
Concerto/Director device workflow deployment fails with a status of "Deploy device Failed".
The error shows the Controller rejecting the PSK:
Configuration of controller failed: com.tailf.maapi.MaapiException:
RPC error towards <controller-name>: invalid_value: inconsistent value:
[/orgs/org-services{<org>}/ipsec/vpn-profile{<profile>}/psk-auth-clients{<client-id>}] Invalid PSK
Cause
The Director encrypts sensitive values (such as PSKs) with the public key it holds for each Controller. If that key does not match the key pair actually on the Controller, the Controller cannot decrypt the value and reports an invalid PSK.
The Controller itself may also report the wrong keys. In the observed case, the config keys on the Controller were wrong, and the Director's copy was out of sync with them.
Before You Start
Identify the affected Controller name(s) and IP(s).
Take a backup or snapshot of the Controller and a database backup of the Director.
Plan a short maintenance window. vsh restart restarts services on the Controller.
You need admin access to the Director shell, the Director CLI, the Controller shell and Concerto.
Resolution
Steps 2, 3, 7 and 8 run on the Director. Steps 4 to 6 run on the Controller (VOS). Step 9 runs on Concerto.
1. Confirm the failure
In Concerto, open the failed deployment and confirm the Invalid PSK error against the Controller.
2. Copy the key utility to the Controller
From the Director shell, in the vnms/scripts directory:
./scp_bin_util.sh <controller-ip>
3. Read the Controller's actual keys
./flex_key_show.sh <controller-ip>
The script prints private_key and public_key. Keep this output; you need it in step 7. Treat the private key as a secret.
4. Compare with what VOS reports
On the Controller:
cli> show crypto pki config_keys
If the keys match the output from step 3, this KB does not apply. Look at other causes of PSK failure.
If they do not match, continue.
5. Remove the config_keys from the CDB
On the Controller shell:
echo "del /crypto/pki/config-keys{config_key}" | confd_cmd -u admin -g admin -o
6. Restart services to regenerate the keys
vsh restart
This regenerates the correct config_keys. Re-run show crypto pki config_keys and re-run flex_key_show.sh from the Director to read the new keys.
7. Update the keys on the Director database
On the Director shell:
sudo -u postgres psql
\c vnms
update appliance_keys set pvt_key='<private-key>', public_key='<public-key>' where device_name='<controller-name>';
8. Refresh the encryption metadata
On the Director CLI:
request system security update-encryption-metadata appliance-name <controller-name>
Expected result:
Successfully updated encryption metadata cache entry for appliance <controller-name>.
If it fails, check /var/log/vnms/spring-boot/vnms-spring-rest.log on the Director.
9. Redeploy from Concerto/Director
In Concerto/Director, republish the config with Workflow > Device > Redeploy. The deployment should now complete with no errors.
Verification
The Concerto redeploy completes successfully.
show crypto pki config_keys on the Controller matches the keys stored in appliance_keys on the Director.
The Controller no longer rejects the PSK.