After upgrade, cannot log into DX Netops Virtual Network Assurance (VNA) Swagger (REST) UI

book

Article ID: 211457

calendar_today

Updated On:

Products

CA Virtual Network Assurance

Issue/Introduction

After upgrade, cannot log into DX Netops Virtual Network Assurance (VNA) Swagger (REST) UI


Cause

If MySQL was down before upgrading there is no prompt for the password and the UI user/password are not created.

Check the VNA database to verify if the SWAGGER_UI_USERNAME and SWAGGER_UI_PASSWORD are missing

1) Get the VNA database name:

grep vna_db_name /etc/VNA.cfg

Example:
vna_db_name=vna_myhostname

In that example, the VNA database name is "vna_myhostname".

2) Log into the VNA database:

 /opt/CA/MySql/bin/mysql -uroot -p VNADATABASENAME

Replace VNADATABASENAME with the VNA database from step 2.
Enter the VNA database password when prompted (admin is the default password, but this may have been changed at install time)

3) Run SQL:

select* from vnaconfig;
exit

If there are no SWAGGER_UI_USERNAME or SWAGGER_UI_PASSWORD configKey entries (only UUID and SWAGGER_UI_ROLE) proceed to the resolution:

Example:

mysql> select * from vnaconfig;
+----+---------------------+------------------------------------------------------------------+
| id | configKey           | configValue                                                      |
+----+---------------------+------------------------------------------------------------------+
|  1 | UUID                | d3ee2477-9c46-456c-a030-927430641eaa                             |
|  2 | SWAGGER_UI_ROLE     | Admin                                                            |
+----+---------------------+------------------------------------------------------------------+

Environment

Release : 20.2

Component : Virtual Network Assurance For CA Performance Management

Resolution

A) Back up the VNA database per the documentation:

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/dx-netops/20-2/Modern-Network-Monitoring-with-DX-Virtual-Network-Assurance/administrating/back-up-and-restore.html

B) Add the UI user and password:


1) Generate the cryptographic SHA-256 hash of the password text you wish to use and note the value:

echo -n 'NEWPASSWORD' | sha256sum

Replace NEWPASSWORD with the password you wish to set.

Example:

echo -n 'NEWPASSWORD' | sha256sum
9a7bbe47e69b04f21376672566ee7232191ee35574c1527dc46ce77b57cfd8db  -

In that example the resulting hash is:
9a7bbe47e69b04f21376672566ee7232191ee35574c1527dc46ce77b57cfd8db

2) Get the VNA database name:

grep vna_db_name /etc/VNA.cfg

Example:
vna_db_name=vna_myhostname

In that example, the VNA database name is "vna_myhostname".

3) Log in to the VNA database:

 /opt/CA/MySql/bin/mysql -uroot -p VNADATABASENAME

Replace VNADATABASENAME with the VNA database from step 2.
Enter the VNA database password when prompted (admin is the default password, but this may have been changed at install time)

4) Add the Swagger UI user and password:

replace into vnaconfig values (3,'SWAGGER_UI_USERNAME','admin');
replace into vnaconfig values (4,'SWAGGER_UI_PASSWORD','XXXXXXXXXX');

Replace XXXXXXXXXX with the password hash from step 1;

5) Verify we see the correct values for SWAGGER_UI_USERNAME and SWAGGER_UI_PASSWORD:

select * from vnaconfig;

Example:

mysql> select * from vnaconfig;
+----+---------------------+------------------------------------------------------------------+
| id | configKey           | configValue                                                      |
+----+---------------------+------------------------------------------------------------------+
|  1 | UUID                | d3ee2477-9c46-456c-a030-927430641eaa                             |
|  2 | SWAGGER_UI_ROLE     | Admin                                                            |
|  3 | SWAGGER_UI_USERNAME | admin                                                            |
|  4 | SWAGGER_UI_PASSWORD | 25f43b1486ad95a1398e3eeb3d83bc4010015fcc9bedb35b432e00298d5021f7 |
+----+---------------------+------------------------------------------------------------------+

Note your configValue values for UUID and SWAGGER_UI_PASSWORD will differ, but the rest should match.

6) If so commit and exit:

commit;
exit

If not, just exit without committing and open a support issue for assistance.

exit

7) Verify you can now log into the VNA UI