Environment
YugabyteDB Anywhere - All Versions
Purpose
The purpose of this article is to fix the software version mismatch error in the health check, in case of a manual downgrade, platform restore, etc.
Error Snippet:
Version from platform metadata 2.13.1.0-b20-arm, version reported by instance process 2.13.0.0-b21
Method
The instructions below can be used to update the version number for a Yugabyte Universe in the Yugabyte Anywhere database to correct version mismatch warnings produced by cluster health checks.
IMPORTANT: These instructions should only be used when requested by the Yugabyte support team.
- Log into the Yugabyte Anywhere node, then connect to the Yugabyte Anywhere Postgres database:
sudo docker exec -it postgres psql -U postgres -d yugaware
NOTE: If you are running YBA based on YBA-Installer, please use below command to get access of the yugaware DB.
/opt/yugabyte/software/active/pgsql/bin/psql -U postgres -d yugaware -h localhost
- Confirm the current (incorrect) version number in the `universe_details_json` for the affected Universe:
SELECT universe_details_json::jsonb->'clusters'->0->'userIntent'->'ybSoftwareVersion' AS ybSoftwareVersion
FROM universe
WHERE name = '<universe_name>';
- Begin a transaction and update the version number:
BEGIN;
UPDATE universe
SET universe_details_json = jsonb_set(universe_details_json::jsonb, '{clusters, 0, userIntent, ybSoftwareVersion }', '"2.6.10.0-b3"')
WHERE name = '<universe_name>';
- Repeat the SELECT and confirm the new version number has been applied:
SELECT universe_details_json::jsonb->'clusters'->0->'userIntent'->'ybSoftwareVersion' AS ybSoftwareVersion
FROM universe
WHERE name = '<universe_name>';
- If the version looks correct, then commit the transaction:
COMMIT;
- Otherwise, revert the changes with the rollback command.
ROLLBACK;
Sample Output:
- Running the SELECT query will give the YB software version
yugaware=# SELECT universe_details_json::jsonb->'clusters'->0->'userIntent'->'ybSoftwareVersion' AS ybSoftwareVersion FROM universe WHERE name = 'yugabyte-test';
ybsoftwareversion
-------------------
"2.8.3.0-b19"
(1 row)
- To update the YB software version use the below UPDATE command
yugaware=# BEGIN;
BEGIN
yugaware=# UPDATE universe SET universe_details_json = jsonb_set(universe_details_json::jsonb, '{clusters, 0, userIntent, ybSoftwareVersion }', '"2.6.10.0-b3"') WHERE name = 'yugabyte-test';
UPDATE 1
yugaware=# SELECT universe_details_json::jsonb->'clusters'->0->'userIntent'->'ybSoftwareVersion' AS ybSoftwareVersion FROM universe WHERE name = 'yugabyte-test';
ybsoftwareversion
-------------------
"2.6.10.0-b3"
(1 row)
yugaware=# COMMIT;
COMMIT
Comments
0 comments
Please sign in to leave a comment.