hobo deploy: don't skip secondary services that were declared (#33821)

This commit is contained in:
Frédéric Péters 2019-06-10 13:14:16 +02:00
parent ac35b22162
commit 7ea6b54588
1 changed files with 6 additions and 3 deletions

View File

@ -63,11 +63,14 @@ class Command(hobo_deploy.Command):
raise RuntimeError('unable to find this service')
our_key = this['secret_key']
for service in services:
base_url = service.get('base_url')
if (service.get('this') or not service.get('secret_key')
or service['service-id'] != 'wcs' or not service.get('base_url')
or service.get('secondary')):
or service['service-id'] != 'wcs' or not service.get('base_url')):
continue
elif service.get('secondary') and not config.has_section(base_url):
# skip secondary instances unless they were already added,
# in that case they need to be kept uptodate
continue
base_url = service['base_url']
schema = (urlparse.urlparse(base_url).netloc.split(':')[0]
.replace('.', '_').replace('-', '_'))
orig = urlparse.urlparse(this.get('base_url')).netloc.split(':')[0]