mirror of https://github.com/nicolargo/glances.git
Cloud plugin always generate communication with 169.254.169.254, even if the plugin is disabled #3316
This commit is contained in:
parent
8c70a55488
commit
6fc887839e
|
|
@ -51,18 +51,21 @@ class CloudPlugin(GlancesPluginModel):
|
|||
# Init the stats
|
||||
self.reset()
|
||||
|
||||
# Init thread to grab OpenStack stats asynchronously
|
||||
self.OPENSTACK = ThreadOpenStack()
|
||||
self.OPENSTACKEC2 = ThreadOpenStackEC2()
|
||||
# Enable threads only if the plugin is enabled
|
||||
if self.is_enabled():
|
||||
# Init thread to grab OpenStack stats asynchronously
|
||||
self.OPENSTACK = ThreadOpenStack()
|
||||
self.OPENSTACKEC2 = ThreadOpenStackEC2()
|
||||
|
||||
# Run the thread
|
||||
self.OPENSTACK.start()
|
||||
self.OPENSTACKEC2.start()
|
||||
# Run the thread
|
||||
self.OPENSTACK.start()
|
||||
self.OPENSTACKEC2.start()
|
||||
|
||||
def exit(self):
|
||||
"""Overwrite the exit method to close threads."""
|
||||
self.OPENSTACK.stop()
|
||||
self.OPENSTACKEC2.stop()
|
||||
if self.is_enabled():
|
||||
self.OPENSTACK.stop()
|
||||
self.OPENSTACKEC2.stop()
|
||||
# Call the father class
|
||||
super().exit()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue