4670: Node Manager handles more libcloud exceptions.
authorBrett Smith <brett@curoverse.com>
Fri, 12 Dec 2014 18:18:51 +0000 (13:18 -0500)
committerBrett Smith <brett@curoverse.com>
Thu, 18 Dec 2014 21:19:50 +0000 (16:19 -0500)
commit6ab7cf882cd9a268374b880b5e55b4c8946406b4
tree2d2d4e65173c90a643ecc7658f2756d50d17b87b
parente86ad4d8172c24aae92ccd482ffb122ea01b55ab
4670: Node Manager handles more libcloud exceptions.

libcloud compute drivers (at least EC2 and GCE) raise bare Exceptions
when there's some problem talking to the cloud service.  The previous
code was expecting to see a LibcloudError, so it wouldn't handle these
errors as intended.

I didn't want to just catch errors with "except Exception" everywhere,
so I added an is_cloud_exception class method to our driver classes to
more accurately identify exceptions that represent trouble talking to
the cloud service.  It recognizes exact Exceptions, plus the other
classes we were catching before.

While I was at this, I gave more specific names to the wrapper methods
in compute node actor decorators, as a debugging aid.
services/nodemanager/arvnodeman/clientactor.py
services/nodemanager/arvnodeman/computenode/dispatch/__init__.py
services/nodemanager/arvnodeman/computenode/driver/__init__.py
services/nodemanager/arvnodeman/config.py
services/nodemanager/arvnodeman/nodelist.py
services/nodemanager/tests/test_computenode_driver_ec2.py