Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:GA
salt.3514
0080-Fix-open-ssh-bsc-1004723-upstream-issue-36...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0080-Fix-open-ssh-bsc-1004723-upstream-issue-36966.patch of Package salt.3514
From 2ccf3cc746da210e9f775b6e7ea1c164ab09b0ff Mon Sep 17 00:00:00 2001 From: Bo Maryniuk <bo@suse.de> Date: Mon, 24 Oct 2016 15:23:48 +0200 Subject: [PATCH 80/80] Fix open-ssh bsc#1004723 (upstream issue 36966) * Do not restart the whole thing if roster is not around * Do not prematurily raise an exception, let the main loop take care of it instead * Fix PEP8 --- salt/client/ssh/__init__.py | 7 ++++--- salt/roster/__init__.py | 7 ------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py index caff178..9522d7b 100644 --- a/salt/client/ssh/__init__.py +++ b/salt/client/ssh/__init__.py @@ -171,7 +171,7 @@ class SSH(object): self.opts = opts self.opts['_ssh_version'] = ssh_version() self.tgt_type = self.opts['selected_target_option'] \ - if self.opts['selected_target_option'] else 'glob' + if self.opts['selected_target_option'] else 'glob' self.roster = salt.roster.Roster(opts, opts.get('roster', 'flat')) self.targets = self.roster.targets( self.opts['tgt'], @@ -373,9 +373,10 @@ class SSH(object): returned = set() rets = set() init = False - if not self.targets: - raise salt.exceptions.SaltClientError('No matching targets found in roster.') while True: + if not self.targets: + log.error('No matching targets found in roster.') + break if len(running) < self.opts.get('ssh_max_procs', 25) and not init: try: host = next(target_iter) diff --git a/salt/roster/__init__.py b/salt/roster/__init__.py index 37dc18d..77ef61b 100644 --- a/salt/roster/__init__.py +++ b/salt/roster/__init__.py @@ -82,12 +82,5 @@ class Roster(object): except IOError as exc: pass - if not targets: - raise salt.exceptions.SaltSystemExit( - 'No hosts found with target {0} of type {1}'.format( - tgt, - tgt_type) - ) - log.debug('Matched minions: {0}'.format(targets)) return targets -- 2.10.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor