-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[crmsh-4.5] Fix: Raise an exception as a rapid return of ssh-related …
…operations to prevent hang (bsc#1228899) (#1508) ## Problem In some environments with a network firewall dropping ssh packets, any ssh operation could hang. ## Solution - Add the 'core.no_ssh' option in crm.conf. "no" is the default. "yes" means all ssh-related operations are disabled and will directly return on purpose. - Define a 'utils.NoSSHError' exception and an ssh wrapper function. Raise the exception when `no_ssh` is `yes`. - Catch `utils.NoSSHError` in `main` so that SSH-related commands will log a general error message: `ERROR: ssh-related operations are disabled. crm report works in local mode.` - Catch 'utils.NoSSHError' when running certain commands that call ssh, and provide a more user-friendly message. - `upgradeutil`, which is called regardless of the command being called, will return without calling ssh, when `no_ssh` is `yes`. - Other commands that are not related to SSH will continue to function normally. ## SSH related commands - crm cluster stop --all - crm cluster start --all - crm report
- Loading branch information
Showing
10 changed files
with
63 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters