calm-dsl icon indicating copy to clipboard operation
calm-dsl copied to clipboard

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

Open choople opened this issue 6 months ago • 1 comments

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:**

  • OS: Windows
  • Python: 3.11.9
  • DSL: 3.8.0

choople avatar Aug 20 '24 15:08 choople