Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ElastiCache CacheCluster CacheNodes can be None #65

Closed
jantman opened this issue Aug 27, 2015 · 2 comments
Closed

ElastiCache CacheCluster CacheNodes can be None #65

jantman opened this issue Aug 27, 2015 · 2 comments
Labels
Milestone

Comments

@jantman
Copy link
Owner

jantman commented Aug 27, 2015

Check for this and catch it (using 0.1.2 from pypi):

18:00:45 Checking AWS resource usage; WARNING threshold 80% of limit, CRITICAL threshold 99% of limit
18:00:45 Traceback (most recent call last):
18:00:45   File "/var/lib/jenkins/workspace/AWS_Limit_Check/cmVE/bin/cm", line 5, in <module>
18:00:45     run()
18:00:45   File "/var/lib/jenkins/workspace/AWS_Limit_Check/cmVE/lib/python2.6/site-packages/cm/__init__.py", line 80, in run
18:00:45     cmd.run()
18:00:45   File "/var/lib/jenkins/workspace/AWS_Limit_Check/cmVE/lib/python2.6/site-packages/cm/commands/check_aws_limits.py", line 53, in run
18:00:45     result = checker.check_thresholds()
18:00:45   File "/var/lib/jenkins/workspace/AWS_Limit_Check/cmVE/lib/python2.6/site-packages/awslimitchecker/checker.py", line 368, in check_thresholds
18:00:45     tmp = cls.check_thresholds()
18:00:45   File "/var/lib/jenkins/workspace/AWS_Limit_Check/cmVE/lib/python2.6/site-packages/awslimitchecker/services/base.py", line 240, in check_thresholds
18:00:45     self.find_usage()
18:00:45   File "/var/lib/jenkins/workspace/AWS_Limit_Check/cmVE/lib/python2.6/site-packages/awslimitchecker/services/elasticache.py", line 71, in find_usage
18:00:45     self._find_usage_nodes()
18:00:45   File "/var/lib/jenkins/workspace/AWS_Limit_Check/cmVE/lib/python2.6/site-packages/awslimitchecker/services/elasticache.py", line 85, in _find_usage_nodes
18:00:45     nodes += len(cluster['CacheNodes'])
18:00:45 TypeError: object of type 'NoneType' has no len()

Bug is here:

nodes += len(cluster['CacheNodes'])

@jantman jantman added the bug label Aug 27, 2015
@jantman jantman added this to the 0.2.0 milestone Aug 27, 2015
@jantman jantman modified the milestones: 0.2.0, 0.1.3 Sep 29, 2015
@jantman jantman closed this as completed Oct 2, 2015
@sstarcher
Copy link
Contributor

Using off master I got the same issue

  File "/usr/local/lib/python2.7/site-packages/awslimitchecker/checker.py", line 329, in find_usage
    cls.find_usage()
  File "/usr/local/lib/python2.7/site-packages/awslimitchecker/services/elasticache.py", line 65, in find_usage
    self._find_usage_nodes()
  File "/usr/local/lib/python2.7/site-packages/awslimitchecker/services/elasticache.py", line 81, in _find_usage_nodes
    num_nodes = len(cluster['CacheNodes'])
KeyError: 'CacheNodes'

@jantman
Copy link
Owner Author

jantman commented Feb 15, 2017

@sstarcher that's a subtly different bug, but the same end result. I've opened #257 for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants