Plot01Server

MedaReda worker Monitoring

  • pyrax servers
  • medareda workers
  • work to do

In [ ]:
import worker.plot_servers
worker.plot_servers.plot()


Drawing plot
/Library/Python/2.7/site-packages/novaclient/v1_1/__init__.py:30: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module.
  warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
---------------------------------------------------------------------------
ConnectionError                           Traceback (most recent call last)
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/backend_bases.pyc in _on_timer(self)
   1201         '''
   1202         for func, args, kwargs in self.callbacks:
-> 1203             ret = func(*args, **kwargs)
   1204             # docstring above explains why we use `if ret == False` here,
   1205             # instead of `if not ret`.

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _step(self, *args)
    888         # delay and set the callback to one which will then set the interval
    889         # back.
--> 890         still_going = Animation._step(self, *args)
    891         if not still_going and self.repeat:
    892             self.frame_seq = self.new_frame_seq()

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _step(self, *args)
    747         try:
    748             framedata = next(self.frame_seq)
--> 749             self._draw_next_frame(framedata, self._blit)
    750             return True
    751         except StopIteration:

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _draw_next_frame(self, framedata, blit)
    766         # post- draw, as well as the drawing of the frame itself.
    767         self._pre_draw(framedata, blit)
--> 768         self._draw_frame(framedata)
    769         self._post_draw(framedata, blit)
    770 

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _draw_frame(self, framedata)
   1061         # Call the func with framedata and args. If blitting is desired,
   1062         # func needs to return a sequence of any artists that were modified.
-> 1063         self._drawn_artists = self._func(framedata, *self._args)

/Users/markhallett/github/MeDaReDa/demos/demo1/worker/plot_servers.pyc in animate1(i)
     90 
     91 
---> 92         states = get_server_states()
     93         #print states
     94 

/Users/markhallett/github/MeDaReDa/demos/demo1/worker/plot_servers.pyc in get_server_states()
     39     default_region, user, password = medareda_lib.get_pyrax_details()
     40     pyrax.set_default_region(default_region)
---> 41     pyrax.set_credentials(user, password)
     42 
     43     #cs = pyrax.cloudservers

/Library/Python/2.7/site-packages/pyrax/__init__.pyc in _wrapped(*args, **kwargs)
    436         if identity is None:
    437             _create_identity()
--> 438         return fnc(*args, **kwargs)
    439     return _wrapped
    440 

/Library/Python/2.7/site-packages/pyrax/__init__.pyc in set_credentials(username, api_key, password, region, tenant_id, authenticate)
    499     tenant_id = tenant_id or settings.get("tenant_id")
    500     identity.set_credentials(username=username, password=pw_key,
--> 501             tenant_id=tenant_id, region=region, authenticate=authenticate)
    502     regions = tuple(identity.regions)
    503     services = tuple(identity.services.keys())

/Library/Python/2.7/site-packages/pyrax/identity/rax_identity.pyc in set_credentials(self, username, password, region, tenant_id, authenticate)
     66         self.api_key = None
     67         super(RaxIdentity, self).set_credentials(username, password=password,
---> 68                 region=region, tenant_id=tenant_id, authenticate=authenticate)
     69 
     70 

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in set_credentials(self, username, password, region, tenant_id, authenticate)
    418             self.region = region
    419         if authenticate:
--> 420             self.authenticate()
    421 
    422 

/Library/Python/2.7/site-packages/pyrax/identity/rax_identity.pyc in authenticate(self, username, password, api_key, tenant_id, connect)
     81         try:
     82             super(RaxIdentity, self).authenticate(username=username,
---> 83                     password=password, api_key=api_key, tenant_id=tenant_id)
     84         except exc.AuthenticationFailed:
     85             self._creds_style = "password"

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in authenticate(self, username, password, api_key, tenant_id, connect)
    597                 }
    598         resp, resp_body = self.method_post("tokens", data=creds,
--> 599                 headers=headers, std_headers=False)
    600 
    601         if resp.status_code == 401:

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in method_post(self, uri, admin, data, headers, std_headers)
    529     def method_post(self, uri, admin=False, data=None, headers=None,
    530             std_headers=True):
--> 531         return self._call("POST", uri, admin, data, headers, std_headers)
    532 
    533     def method_put(self, uri, admin=False, data=None, headers=None,

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in _call(self, mthd, uri, admin, data, headers, std_headers)
    568             # We'll handle the exception here
    569             kwargs["raise_exception"] = False
--> 570         return pyrax.http.request(mthd, uri, verify=self.verify_ssl, **kwargs)
    571 
    572 

/Library/Python/2.7/site-packages/pyrax/http.pyc in request(method, uri, *args, **kwargs)
     61         data = json.dumps(kwargs.pop("body"))
     62     if data:
---> 63         resp = req_method(uri, data=data, **kwargs)
     64     else:
     65         resp = req_method(uri, **kwargs)

/Library/Python/2.7/site-packages/requests/api.pyc in post(url, data, json, **kwargs)
    107     """
    108 
--> 109     return request('post', url, data=data, json=json, **kwargs)
    110 
    111 

/Library/Python/2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
     48 
     49     session = sessions.Session()
---> 50     response = session.request(method=method, url=url, **kwargs)
     51     # By explicitly closing the session, we avoid leaving sockets open which
     52     # can trigger a ResourceWarning in some cases, and look like a memory leak

/Library/Python/2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    463         }
    464         send_kwargs.update(settings)
--> 465         resp = self.send(prep, **send_kwargs)
    466 
    467         return resp

/Library/Python/2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
    571 
    572         # Send the request
--> 573         r = adapter.send(request, **kwargs)
    574 
    575         # Total elapsed time of the request (approximately)

/Library/Python/2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
    413 
    414         except (ProtocolError, socket.error) as err:
--> 415             raise ConnectionError(err, request=request)
    416 
    417         except MaxRetryError as e:

ConnectionError: ('Connection aborted.', error(50, 'Network is down'))
---------------------------------------------------------------------------
ConnectionError                           Traceback (most recent call last)
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/backend_bases.pyc in _on_timer(self)
   1201         '''
   1202         for func, args, kwargs in self.callbacks:
-> 1203             ret = func(*args, **kwargs)
   1204             # docstring above explains why we use `if ret == False` here,
   1205             # instead of `if not ret`.

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _step(self, *args)
    888         # delay and set the callback to one which will then set the interval
    889         # back.
--> 890         still_going = Animation._step(self, *args)
    891         if not still_going and self.repeat:
    892             self.frame_seq = self.new_frame_seq()

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _step(self, *args)
    747         try:
    748             framedata = next(self.frame_seq)
--> 749             self._draw_next_frame(framedata, self._blit)
    750             return True
    751         except StopIteration:

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _draw_next_frame(self, framedata, blit)
    766         # post- draw, as well as the drawing of the frame itself.
    767         self._pre_draw(framedata, blit)
--> 768         self._draw_frame(framedata)
    769         self._post_draw(framedata, blit)
    770 

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _draw_frame(self, framedata)
   1061         # Call the func with framedata and args. If blitting is desired,
   1062         # func needs to return a sequence of any artists that were modified.
-> 1063         self._drawn_artists = self._func(framedata, *self._args)

/Users/markhallett/github/MeDaReDa/demos/demo1/worker/plot_servers.pyc in animate1(i)
     90 
     91 
---> 92         states = get_server_states()
     93         #print states
     94 

/Users/markhallett/github/MeDaReDa/demos/demo1/worker/plot_servers.pyc in get_server_states()
     39     default_region, user, password = medareda_lib.get_pyrax_details()
     40     pyrax.set_default_region(default_region)
---> 41     pyrax.set_credentials(user, password)
     42 
     43     #cs = pyrax.cloudservers

/Library/Python/2.7/site-packages/pyrax/__init__.pyc in _wrapped(*args, **kwargs)
    436         if identity is None:
    437             _create_identity()
--> 438         return fnc(*args, **kwargs)
    439     return _wrapped
    440 

/Library/Python/2.7/site-packages/pyrax/__init__.pyc in set_credentials(username, api_key, password, region, tenant_id, authenticate)
    499     tenant_id = tenant_id or settings.get("tenant_id")
    500     identity.set_credentials(username=username, password=pw_key,
--> 501             tenant_id=tenant_id, region=region, authenticate=authenticate)
    502     regions = tuple(identity.regions)
    503     services = tuple(identity.services.keys())

/Library/Python/2.7/site-packages/pyrax/identity/rax_identity.pyc in set_credentials(self, username, password, region, tenant_id, authenticate)
     66         self.api_key = None
     67         super(RaxIdentity, self).set_credentials(username, password=password,
---> 68                 region=region, tenant_id=tenant_id, authenticate=authenticate)
     69 
     70 

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in set_credentials(self, username, password, region, tenant_id, authenticate)
    418             self.region = region
    419         if authenticate:
--> 420             self.authenticate()
    421 
    422 

/Library/Python/2.7/site-packages/pyrax/identity/rax_identity.pyc in authenticate(self, username, password, api_key, tenant_id, connect)
     81         try:
     82             super(RaxIdentity, self).authenticate(username=username,
---> 83                     password=password, api_key=api_key, tenant_id=tenant_id)
     84         except exc.AuthenticationFailed:
     85             self._creds_style = "password"

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in authenticate(self, username, password, api_key, tenant_id, connect)
    597                 }
    598         resp, resp_body = self.method_post("tokens", data=creds,
--> 599                 headers=headers, std_headers=False)
    600 
    601         if resp.status_code == 401:

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in method_post(self, uri, admin, data, headers, std_headers)
    529     def method_post(self, uri, admin=False, data=None, headers=None,
    530             std_headers=True):
--> 531         return self._call("POST", uri, admin, data, headers, std_headers)
    532 
    533     def method_put(self, uri, admin=False, data=None, headers=None,

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in _call(self, mthd, uri, admin, data, headers, std_headers)
    568             # We'll handle the exception here
    569             kwargs["raise_exception"] = False
--> 570         return pyrax.http.request(mthd, uri, verify=self.verify_ssl, **kwargs)
    571 
    572 

/Library/Python/2.7/site-packages/pyrax/http.pyc in request(method, uri, *args, **kwargs)
     61         data = json.dumps(kwargs.pop("body"))
     62     if data:
---> 63         resp = req_method(uri, data=data, **kwargs)
     64     else:
     65         resp = req_method(uri, **kwargs)

/Library/Python/2.7/site-packages/requests/api.pyc in post(url, data, json, **kwargs)
    107     """
    108 
--> 109     return request('post', url, data=data, json=json, **kwargs)
    110 
    111 

/Library/Python/2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
     48 
     49     session = sessions.Session()
---> 50     response = session.request(method=method, url=url, **kwargs)
     51     # By explicitly closing the session, we avoid leaving sockets open which
     52     # can trigger a ResourceWarning in some cases, and look like a memory leak

/Library/Python/2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    463         }
    464         send_kwargs.update(settings)
--> 465         resp = self.send(prep, **send_kwargs)
    466 
    467         return resp

/Library/Python/2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
    571 
    572         # Send the request
--> 573         r = adapter.send(request, **kwargs)
    574 
    575         # Total elapsed time of the request (approximately)

/Library/Python/2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
    413 
    414         except (ProtocolError, socket.error) as err:
--> 415             raise ConnectionError(err, request=request)
    416 
    417         except MaxRetryError as e:

ConnectionError: ('Connection aborted.', gaierror(8, 'nodename nor servname provided, or not known'))
---------------------------------------------------------------------------
ConnectionError                           Traceback (most recent call last)
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/backend_bases.pyc in _on_timer(self)
   1201         '''
   1202         for func, args, kwargs in self.callbacks:
-> 1203             ret = func(*args, **kwargs)
   1204             # docstring above explains why we use `if ret == False` here,
   1205             # instead of `if not ret`.

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _step(self, *args)
    888         # delay and set the callback to one which will then set the interval
    889         # back.
--> 890         still_going = Animation._step(self, *args)
    891         if not still_going and self.repeat:
    892             self.frame_seq = self.new_frame_seq()

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _step(self, *args)
    747         try:
    748             framedata = next(self.frame_seq)
--> 749             self._draw_next_frame(framedata, self._blit)
    750             return True
    751         except StopIteration:

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _draw_next_frame(self, framedata, blit)
    766         # post- draw, as well as the drawing of the frame itself.
    767         self._pre_draw(framedata, blit)
--> 768         self._draw_frame(framedata)
    769         self._post_draw(framedata, blit)
    770 

/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/animation.pyc in _draw_frame(self, framedata)
   1061         # Call the func with framedata and args. If blitting is desired,
   1062         # func needs to return a sequence of any artists that were modified.
-> 1063         self._drawn_artists = self._func(framedata, *self._args)

/Users/markhallett/github/MeDaReDa/demos/demo1/worker/plot_servers.pyc in animate1(i)
     90 
     91 
---> 92         states = get_server_states()
     93         #print states
     94 

/Users/markhallett/github/MeDaReDa/demos/demo1/worker/plot_servers.pyc in get_server_states()
     39     default_region, user, password = medareda_lib.get_pyrax_details()
     40     pyrax.set_default_region(default_region)
---> 41     pyrax.set_credentials(user, password)
     42 
     43     #cs = pyrax.cloudservers

/Library/Python/2.7/site-packages/pyrax/__init__.pyc in _wrapped(*args, **kwargs)
    436         if identity is None:
    437             _create_identity()
--> 438         return fnc(*args, **kwargs)
    439     return _wrapped
    440 

/Library/Python/2.7/site-packages/pyrax/__init__.pyc in set_credentials(username, api_key, password, region, tenant_id, authenticate)
    499     tenant_id = tenant_id or settings.get("tenant_id")
    500     identity.set_credentials(username=username, password=pw_key,
--> 501             tenant_id=tenant_id, region=region, authenticate=authenticate)
    502     regions = tuple(identity.regions)
    503     services = tuple(identity.services.keys())

/Library/Python/2.7/site-packages/pyrax/identity/rax_identity.pyc in set_credentials(self, username, password, region, tenant_id, authenticate)
     66         self.api_key = None
     67         super(RaxIdentity, self).set_credentials(username, password=password,
---> 68                 region=region, tenant_id=tenant_id, authenticate=authenticate)
     69 
     70 

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in set_credentials(self, username, password, region, tenant_id, authenticate)
    418             self.region = region
    419         if authenticate:
--> 420             self.authenticate()
    421 
    422 

/Library/Python/2.7/site-packages/pyrax/identity/rax_identity.pyc in authenticate(self, username, password, api_key, tenant_id, connect)
     81         try:
     82             super(RaxIdentity, self).authenticate(username=username,
---> 83                     password=password, api_key=api_key, tenant_id=tenant_id)
     84         except exc.AuthenticationFailed:
     85             self._creds_style = "password"

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in authenticate(self, username, password, api_key, tenant_id, connect)
    597                 }
    598         resp, resp_body = self.method_post("tokens", data=creds,
--> 599                 headers=headers, std_headers=False)
    600 
    601         if resp.status_code == 401:

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in method_post(self, uri, admin, data, headers, std_headers)
    529     def method_post(self, uri, admin=False, data=None, headers=None,
    530             std_headers=True):
--> 531         return self._call("POST", uri, admin, data, headers, std_headers)
    532 
    533     def method_put(self, uri, admin=False, data=None, headers=None,

/Library/Python/2.7/site-packages/pyrax/base_identity.pyc in _call(self, mthd, uri, admin, data, headers, std_headers)
    568             # We'll handle the exception here
    569             kwargs["raise_exception"] = False
--> 570         return pyrax.http.request(mthd, uri, verify=self.verify_ssl, **kwargs)
    571 
    572 

/Library/Python/2.7/site-packages/pyrax/http.pyc in request(method, uri, *args, **kwargs)
     61         data = json.dumps(kwargs.pop("body"))
     62     if data:
---> 63         resp = req_method(uri, data=data, **kwargs)
     64     else:
     65         resp = req_method(uri, **kwargs)

/Library/Python/2.7/site-packages/requests/api.pyc in post(url, data, json, **kwargs)
    107     """
    108 
--> 109     return request('post', url, data=data, json=json, **kwargs)
    110 
    111 

/Library/Python/2.7/site-packages/requests/api.pyc in request(method, url, **kwargs)
     48 
     49     session = sessions.Session()
---> 50     response = session.request(method=method, url=url, **kwargs)
     51     # By explicitly closing the session, we avoid leaving sockets open which
     52     # can trigger a ResourceWarning in some cases, and look like a memory leak

/Library/Python/2.7/site-packages/requests/sessions.pyc in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    463         }
    464         send_kwargs.update(settings)
--> 465         resp = self.send(prep, **send_kwargs)
    466 
    467         return resp

/Library/Python/2.7/site-packages/requests/sessions.pyc in send(self, request, **kwargs)
    571 
    572         # Send the request
--> 573         r = adapter.send(request, **kwargs)
    574 
    575         # Total elapsed time of the request (approximately)

/Library/Python/2.7/site-packages/requests/adapters.pyc in send(self, request, stream, timeout, verify, cert, proxies)
    413 
    414         except (ProtocolError, socket.error) as err:
--> 415             raise ConnectionError(err, request=request)
    416 
    417         except MaxRetryError as e:

ConnectionError: ('Connection aborted.', gaierror(8, 'nodename nor servname provided, or not known'))

In [ ]:


In [ ]: