Environment:
Yugabyte Platform
Issue:
It is required to provide the SSH keys while configuring the provider for creating the universe. Below screenshot shows the UI :
Once the provider is configured and saved:
Below screenshot shows that the task for universe creation failed after all the desired inputs are provided in the universe creation page:
Resolution :
In order to find out regarding the details of the failure, please check the yugaware logs.
Below error is logged for the incorrect SSH Key format.
__import__('pkg_resources').run_script('ybops==0.4', 'ybcloud.py')
File "/opt/yugabyte/yugabyte-2.2.3.0-b28/devops/python_virtual_env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/opt/yugabyte/yugabyte-2.2.3.0-b28/devops/python_virtual_env/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1462, in run_script
exec(code, namespace, namespace)
File "/opt/yugabyte/yugabyte-2.2.3.0-b28/devops/python_virtual_env/lib/python2.7/site-packages/ybops-0.4-py2.7.egg/EGG-INFO/scripts/ybcloud.py", line 15, in <module>
YbCloud().run()
File "/opt/yugabyte/yugabyte-2.2.3.0-b28/devops/python_virtual_env/lib/python2.7/site-packages/ybops-0.4-py2.7.egg/ybops/cloud/ybcloud.py", line 54, in run
self.options.func(self.options)
File "/opt/yugabyte/yugabyte-2.2.3.0-b28/devops/python_virtual_env/lib/python2.7/site-packages/ybops-0.4-py2.7.egg/ybops/cloud/common/method.py", line 76, in callback_wrapper
self.callback(args)
File "/opt/yugabyte/yugabyte-2.2.3.0-b28/devops/python_virtual_env/lib/python2.7/site-packages/ybops-0.4-py2.7.egg/ybops/cloud/common/method.py", line 686, in callback
rsa_key = validated_key_file(args.private_key_file)
File "/opt/yugabyte/yugabyte-2.2.3.0-b28/devops/python_virtual_env/lib/python2.7/site-packages/ybops-0.4-py2.7.egg/ybops/utils/__init__.py", line 467, in validated_key_file
return RSA.importKey(f.read())
File "/opt/yugabyte/yugabyte-2.2.3.0-b28/devops/python_virtual_env/lib/python2.7/site-packages/Crypto/PublicKey/RSA.py", line 665, in importKey
return self._importKeyDER(der)
File "/opt/yugabyte/yugabyte-2.2.3.0-b28/devops/python_virtual_env/lib/python2.7/site-packages/Crypto/PublicKey/RSA.py", line 588, in _importKeyDER
raise ValueError("RSA key format is not supported")
ValueError: RSA key format is not supported
The SSH private key provided while creating the provider needs to be in the RSA format.
Please use the following command to convert the ssh private key into RSA format from OPENSSH format:
ssh-keygen -p -N "" -m pem -f /path/to/key
Here;
ssh-keygen -- is the command to convert the format of key
-f <input format> --- shown in above command
-m 'PEM indicates a PEM filetype
Note: It will change the file in place, so make a backup of your current key just in case. -N ""
will set the passphrase as none.
The public key should be fine as is.
Comments
0 comments
Please sign in to leave a comment.