Symptoms
After trying to deploy the power panel (following this guide) multiple times without success it's common to get an error during the installation in the "TASK [keystone : Create local application credential]". The error shown could be like this:
TASK [keystone : shell] **********************************************************************************************************************************************************************
changed: [powerpanel.test.com] => (item=endpoint create vzapi admin http://127.0.0.1:6556/v1)
changed: [powerpanel.test.com] => (item=endpoint create vzapi public http://127.0.0.1:6556/v1)
changed: [powerpanel.test.com] => (item=implied role delete --implied-role reader member)
changed: [powerpanel.test.com] => (item=implied role delete --implied-role member admin)
TASK [keystone : Create local application credential] ****************************************************************************************************************************************
fatal: [powerpanel.test.com]: FAILED! => {"changed": true, "cmd": "openstack --os-cloud=local application credential create local_credential -f json", "delta": "0:00:02.854548", "end": "2023-02-03 15:28:19.851494", "msg": "non-zero return code", "rc": 1, "start": "2023-02-03 15:28:16.996946", "stderr": "Conflict occurred attempting to store application_credential - Duplicate entry found with name local_credential. (HTTP 409) (Request-ID: req-87ee02ac-3790-4cdb-80d2-88e86533cb12)", "stderr_lines": ["Conflict occurred attempting to store application_credential - Duplicate entry found with name local_credential. (HTTP 409) (Request-ID: req-87ee02ac-3790-4cdb-80d2-88e86533cb12)"], "stdout": "", "stdout_lines": []}
PLAY RECAP ***********************************************************************************************************************************************************************************
powerpanel.test.com : ok=55 changed=11 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0
Besides, the httpd logs show errors implying the same conflict about deuplicate entry found with the name local_credential:
2023-02-03 17:08:16.610 5762 WARNING keystone.server.flask.application [req-2ae16cb5-0a0d-43c1-8847-f53740235c72 93730324db604f69bfb43c1e9b1e301f 13590554992949edb60e283ce8f4c1a5 - default default] Conflict occurred attempting to store application_credential - Duplicate entry found with name local_credential.: Conflict: Conflict occurred attempting to store application_credential - Duplicate entry found with name local_credential.
Cause
This could be caused by many failed attempts of the power panel deploy. After first attempt, the install process stores a local application credential in openstack, thus when there is a second and following attempt there will get conflicts about storing application credentials locally.
Resolution
Firstly, you should identify if there is an already application credential stored:
[root@tlpowerpanel ~]# openstack --os-cloud local application credential list
+----------------------------------+------------------+----------------------------------+-------------+------------+
| ID | Name | Project ID | Description | Expires At |
+----------------------------------+------------------+----------------------------------+-------------+------------+
| 9577d2d8b99f469491b7dc1bde93289d | local_credential | 13590554992949edb60e283ce8f4c1a5 | None | None |
+----------------------------------+------------------+----------------------------------+-------------+------------+
Once you have the ID of the stored credential, you should proceed to delete the register from openstack:
# openstack --os-cloud local application credential delete 9577d2d8b99f469491b7dc1bde93289d
After that, you will be able to deploy the power panel without trouble as there is a clean local application credential list. According to our guide the simple command to deploy by using a self-signed certificate is the following:
# vzapi-installer controller --ask-passwd --private-ip <IP_address>
The--private-ip<IP_address>is the required parameter that sets the IP address of the network interface that the controller will use to communicate with compute nodes.
In case you have an SSL certificate from a third-party or you have an own CA file, please review our official documentation.
https://docs.virtuozzo.com/virtuozzo_powerpanel_administrators_guide/installing-pp/index.html
Diagnostic steps
1) Try to deploy the Power Panel controller application as per the guide by using this command:
# vzapi-installer controller --ask-passwd --private-ip <IP_address>
2) If you get the following error:
TASK [keystone : Create local application credential] ****************************************************************************************************************************************
fatal: [powerpanel.test.com]: FAILED! => {"changed": true, "cmd": "openstack --os-cloud=local application credential create local_credential -f json", "delta": "0:00:02.854548", "end": "2023-02-03 15:28:19.851494", "msg": "non-zero return code", "rc": 1, "start": "2023-02-03 15:28:16.996946", "stderr": "Conflict occurred attempting to store application_credential - Duplicate entry found with name local_credential. (HTTP 409) (Request-ID: req-87ee02ac-3790-4cdb-80d2-88e86533cb12)", "stderr_lines": ["Conflict occurred attempting to store application_credential - Duplicate entry found with name local_credential. (HTTP 409) (Request-ID: req-87ee02ac-3790-4cdb-80d2-88e86533cb12)"], "stdout": "", "stdout_lines": []}
2.1) Or you detect that you can't login in to the web power panel by using credentials assigned during installation and observe these logs in httpd:
2023-02-03 17:08:16.610 5762 WARNING keystone.server.flask.application [req-2ae16cb5-0a0d-43c1-8847-f53740235c72 93730324db604f69bfb43c1e9b1e301f 13590554992949edb60e283ce8f4c1a5 - default default] Conflict occurred attempting to store application_credential - Duplicate entry found with name local_credential.: Conflict: Conflict occurred attempting to store application_credential - Duplicate entry found with name local_credential.
Additionally, if you can't log in and/or the power panel is not working properly and you detect there is a credential stored in openstack by executing:
[root@tlpowerpanel ~]# openstack --os-cloud local application credential list
+----------------------------------+------------------+----------------------------------+-------------+------------+
| ID | Name | Project ID | Description | Expires At |
+----------------------------------+------------------+----------------------------------+-------------+------------+
| 9577d2d8b99f469491b7dc1bde93289d | local_credential | 13590554992949edb60e283ce8f4c1a5 | None | None |
+----------------------------------+------------------+----------------------------------+-------------+------------+
Related Ticket(s):
#401116