Skip to content

Commit

Permalink
[BACKPORT-2.14][PLAT-4936] Restore Failing with ssh2_enabled
Browse files Browse the repository at this point in the history
Summary:
[PLATFORM]Restore task is failing on a platform with techia enabled
It was failing because of the trailing space in the db name. Strip the output to remove such spaces.

Original Revision: https://phabricator.dev.yugabyte.com/D18769
Commit: 0b0f030

Test Plan:
Tested
1. Backup/Restore with ssh2_enabled
As the testing was done using tectia trial version, we get bunch of warnings when trying to ssh.
Tectia SSH o/p:
['ssh: ', 'Tectia Client: Evaluation period will end in 33 days.', ' yugabyte']

OpenSSH o/p:
' yugabyte'

Tectia SSH is the splitline o/p. The server returns the above as a complete string.
'ssh:\nTectia Client: Evaluation period will end in 33 days.\n yugabyte'

Reviewers: vpatibandla

Reviewed By: vpatibandla

Subscribers: jenkins-bot, yugaware

Differential Revision: https://phabricator.dev.yugabyte.com/D18794
  • Loading branch information
Vars-07 committed Aug 8, 2022
1 parent 269730f commit aa9d62a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion managed/devops/bin/yb_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3053,7 +3053,7 @@ def import_ysql_dump(self, dump_file_path):
if self.args.ssh2_enabled:
# Todo: Fix the condition. Will be fixed, as part of migration of common
# ssh_librabry(yugabyte-db/managed/devops/opscli/ybops/utils/ssh.py).
old_db_name = old_db_name.splitlines()[-1]
old_db_name = old_db_name.splitlines()[-1].strip()

if old_db_name:
new_db_name = keyspace_name(self.args.keyspace[0])
Expand Down

0 comments on commit aa9d62a

Please sign in to comment.