zalando-zmon/zmon-aws-agent

get_running_elbs occasionally fails with IndexError

Closed this issue · 3 comments

IndexError: list index out of range

Found the problem, it happens if an ALB has no listener (this is allowed!):

Dec  8 21:21:53 ip-172-31-144-77 docker/b4f045186b1b[813]: Traceback (most recent call last):
Dec  8 21:21:53 ip-172-31-144-77 docker/b4f045186b1b[813]:   File "/usr/local/bin/zmon-aws-agent", line 9, in <module>
Dec  8 21:21:53 ip-172-31-144-77 docker/b4f045186b1b[813]:     load_entry_point('zmon-aws-agent==0.2', 'console_scripts', 'zmon-aws-agent')()
Dec  8 21:21:53 ip-172-31-144-77 docker/b4f045186b1b[813]:   File "/usr/local/lib/python3.5/dist-packages/zmon_aws_agent-0.2-py3.5.egg/zmon_aws_agent/main.py", line 132, in main
Dec  8 21:21:53 ip-172-31-144-77 docker/b4f045186b1b[813]:   File "/usr/local/lib/python3.5/dist-packages/zmon_aws_agent-0.2-py3.5.egg/zmon_aws_agent/aws.py", line 270, in get_running_elbs
Dec  8 21:21:53 ip-172-31-144-77 docker/b4f045186b1b[813]:   File "/usr/local/lib/python3.5/dist-packages/zmon_aws_agent-0.2-py3.5.egg/zmon_aws_agent/aws.py", line 372, in get_running_elbs_application
Dec  8 21:21:53 ip-172-31-144-77 docker/b4f045186b1b[813]: IndexError: list index out of range

@mohabusama this was the issue with the hackweek account we saw today. Deleting the ALB with no listner "fixed it".