Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-799

GCE: list_nodes occasionally failing with ResourceNotFoundError when instances being deleted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Core
    • None

    Description

      I'm using libcloud version 0.18.0 (version not available in the dropdown list above)

      When listing instances on GCE while I (or another user) concurrently delete instances on the same project, I occasionally get the following exception:

      File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/gce.py", line 1601, in list_nodes
      v.get('instances', [])]
      File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/gce.py", line 5283, in _to_node
      extra['boot_disk'] = self.ex_get_volume(bd['name'], bd['zone'])
      File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/gce.py", line 4165, in ex_get_volume
      response = self.connection.request(request, method='GET').object
      File "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/gce.py", line 120, in request
      response = super(GCEConnection, self).request(*args, **kwargs)
      File "/usr/lib/python2.7/site-packages/libcloud/common/google.py", line 692, in request
      *args, **kwargs)
      File "/usr/lib/python2.7/site-packages/libcloud/common/base.py", line 799, in request
      response = responseCls(**kwargs)
      File "/usr/lib/python2.7/site-packages/libcloud/common/base.py", line 145, in _init_
      self.object = self.parse_body()
      File "/usr/lib/python2.7/site-packages/libcloud/common/google.py", line 263, in parse_body
      raise ResourceNotFoundError(message, self.status, code)
      libcloud.common.google.ResourceNotFoundError:

      {u'domain': u'global', u'message': u"The resource 'projects/xxxx/zones/xxxx/disks/xxxx-5802f' was not found", u'reason': u'notFound'}

      I think the exception should be catched in "/usr/lib/python2.7/site-packages/libcloud/compute/drivers/gce.py", line 5283 when the volume corresponding to the instance being deleted is not found.

      Regards,
      Colin

      Attachments

        Activity

          People

            Unassigned Unassigned
            lifo2 Colin Pitrat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: