promenade/promenade/control
Felipe Monteiro d0b23f3eeb Fix Deckhand render throwing exception on missing sub source
This PS resolves a recent issue with Deckhand in which missing
substitution sources cause Promenade to fail during genesis,
while using Deckhand to render documents. The fix involves
introducing a new flag called fail_on_missing_sub_src which
if False logs a warning rather than raises an exception
in the event that a substitution source document is missing.

Also adds better exception handling and logging around
Deckhand.

Example error:

Traceback (most recent call last):
  File "/usr/local/bin/promenade", line 10, in <module>
    sys.exit(promenade())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/opt/promenade/promenade/cli.py", line 55, in genereate_certs
    debug=debug, streams=config_files, substitute=True, validate=False)
  File "/opt/promenade/promenade/config.py", line 49, in from_streams
    return cls(documents=documents, **kwargs)
  File "/opt/promenade/promenade/config.py", line 29, in __init__
    documents = [dict(d) for d in deckhand_eng.render()]
  File "/usr/local/lib/python3.6/site-packages/deckhand/engine/layering.py", line 485, in render
    self.secrets_substitution.substitute_all(doc))
  File "/usr/local/lib/python3.6/site-packages/deckhand/engine/secrets_manager.py", line 182, in substitute_all
    document_name=document.name)

Depends-On: https://review.gerrithub.io/#/c/400880/
Change-Id: I4486535d4555ece54eb4d47bfb56472250f97ab4
2018-02-22 19:19:34 +00:00
..
__init__.py Inital API Commit 2017-11-03 14:48:47 -04:00
api.py Add API unit tests 2017-12-19 16:45:37 -05:00
base.py Add keystone integration test 2017-12-19 16:00:20 -06:00
health_api.py Inital API Commit 2017-11-03 14:48:47 -04:00
join_scripts.py Fix Deckhand render throwing exception on missing sub source 2018-02-22 19:19:34 +00:00
middleware.py Add keystone integration test 2017-12-19 16:00:20 -06:00
validatedesign.py Add API unit tests 2017-12-19 16:45:37 -05:00