nutanix / calm-dsl

Keep Calm and DSL On!
https://nutanix.github.io/calm-dsl/
Apache License 2.0
33 stars 51 forks source link

[Bug] Updating VMware account password fails in command `calm update account` #309

Open choople opened 2 months ago

choople commented 2 months ago

Describe the bug When the password has changed for a VMware account, and a platform sync has occurred, the account is in an error state. When Calm goes to update the account it fails because it sees the account in an error state and won't try updating the account with the new password.

Branch/Container master

To Reproduce

  1. Change the password of the account used by Self-Service to connect to vCenter Server
  2. Trigger a platform sync or wait for one to occur
  3. Update the account using calm update account

Expected behavior It should allow updating an account even in an error state. If the admin wants to use update the account using IaC, then DSL is the only way to do it.

Available Logs/Data [2024-08-19 21:49:46] [INFO] [calm.dsl.cli.accounts:161] xxx found [2024-08-19 21:49:46] [INFO] [calm.dsl.cli.accounts:167] Fetching account details [2024-08-19 21:49:50] [ERROR] [calm.dsl.api.connection:326] Oops! Something went wrong. { "error": { "api_version": "3.1", "code": 422, "kind": "blueprint", "message_list": [ { "details": { "ecc8b88b-3b8a-2e4a-76ce-00094ab6fe3a": [ "Unable to connect to vmware server xxx: due to error ServerFaultCode: Cannot complete login due to an incorrect user name or password. " ] }, "message": "Unable to connect to vmware server xxx: due to error ServerFaultCode: Cannot complete login due to an incorrect user name or password.", "reason": "INVALID_REQUEST" } ], "state": "ERROR" }, "code": 422 }

System Configuration:

choople commented 2 months ago

I am able to update the VMware account using the REST API directly, even with the account in an error state in Self-Service.