cloudtools / stacker

An AWS CloudFormation Stack orchestrator/manager.
http://stacker.readthedocs.io/en/stable/
BSD 2-Clause "Simplified" License
711 stars 167 forks source link

--tail doesn't work with --recreate-failed #736

Closed marcelmindemann closed 1 year ago

marcelmindemann commented 5 years ago

I am running stacker 1.7.0. When I deploy a stack that is in the ROLLBACK_COMPLETE state, I have to use the --recreate-failed flag in order to deploy. This breaks tailing the CloudFormation logs though:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Users/0x72/.pyenv/versions/3.7.2/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/Users/0x72/.pyenv/versions/3.7.2/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/0x72/Library/Caches/pypoetry/virtualenvs/parquet-conversion-FVInPVEJ-py3.7/lib/python3.7/site-packages/stacker/actions/base.py", line 235, in _tail_stack
    return provider.tail_stack(stack, cancel, retries, **kwargs)
  File "/Users/0x72/Library/Caches/pypoetry/virtualenvs/parquet-conversion-FVInPVEJ-py3.7/lib/python3.7/site-packages/stacker/providers/aws/default.py", line 609, in tail_stack
    include_initial=False)
  File "/Users/0x72/Library/Caches/pypoetry/virtualenvs/parquet-conversion-FVInPVEJ-py3.7/lib/python3.7/site-packages/stacker/providers/aws/default.py", line 671, in tail
    initial_events = self.get_events(stack_name)
  File "/Users/0x72/Library/Caches/pypoetry/virtualenvs/parquet-conversion-FVInPVEJ-py3.7/lib/python3.7/site-packages/stacker/providers/aws/default.py", line 638, in get_events
    StackName=stack_name
  File "/Users/0x72/Library/Caches/pypoetry/virtualenvs/parquet-conversion-FVInPVEJ-py3.7/lib/python3.7/site-packages/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/Users/0x72/Library/Caches/pypoetry/virtualenvs/parquet-conversion-FVInPVEJ-py3.7/lib/python3.7/site-packages/botocore/client.py", line 661, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the DescribeStackEvents operation: Stack [test-stack] does not exist

I understand why this happens, I just wanted to report it so maybe someone finds a fix for the problem.