Environment
- YugabyteDB Anywhere - Versions prior to 2024.2.4.
Issue
When attempting to restore a backup on a universe where the nodes were provisioned using the Yugabyte Node Provisioner(YNP) script, the restore task fails with the error message:
Caused by: com.yugabyte.yw.common.PlatformServiceException: KeyCode not found: null.Resolution
Overview
The root cause of this issue is a bug in YugabyteDB Anywhere (YBA) where the restore process incorrectly checks for an SSH key, even when one is not required for clusters provisioned with the YNP script. The YNP method of provisioning does not require SSH access from the YBA instance to the database nodes after the initial setup.
This bug is fixed in YBA version 2024.2.4 and greater.
The workaround involves adding a dummy SSH key to the provider configuration. The steps differ slightly depending on whether the universe has already been created.
Steps
Workaround
There are two scenarios to consider when applying this workaround:
Scenario 1: Universe is already created
If the universe already exists, you will need to add the dummy SSH key and then update the universe configuration in the YBA database.
IMPORTANT: Please contact Yugabyte support to perform the following changes. Modifying the YBA database should only be performed under the presence of a Yugabyte support personnel.
1. In the YugabyteDB Anywhere UI, navigate to Integrations -> On-Premises.
2. Select the provider associated with the existing universe.
3. Under Config Details, add a dummy SSH key. Make a note of the key name you assign.
4. Now, you need to modify the universe configuration in the YBA database. This is done using the edit_universe_details.py script, which is located in the YBA installation directory.
# The path to the script may vary depending on your YBA installation path.
/opt/yugabyte/software/active/yba_installer/packages/yugabyte-2024.2.2.2-b2/devops/bin/edit_universe_details.py
# You can use the following find command to search for the script location.
# Use the one corresponding to your current YBA version
sudo find / -type f -name 'edit_universe_details.py' 2>/dev/null5. In the userIntent section, set the accessKeyCode with the name of the dummy SSH key you created in step 3.
"userIntent": {
"accessKeyCode": "dummy",6. After completing these steps, the restore task should now proceed without errors.
Scenario 2: Universe is not yet created
If you are creating a new universe, the fix is straightforward.
1. In the YugabyteDB Anywhere UI, navigate to Integrations -> On-Premises.
2. Select the provider that will be used for the new universe.
3. Under Config Details, add a dummy SSH key. This can be any valid SSH key, as it will not be used for any actual connections.
NOTE: Adding the dummy key before universe creation ensures that the accessKeyCode is correctly populated in the universe details.
Comments
0 comments
Please sign in to leave a comment.