Docker containers information missing with Docker 20.10.x #1878

This commit is contained in:
nicolargo
2021-06-14 19:34:12 +02:00
parent d4339de57e
commit 153ce376bd
5 changed files with 6 additions and 8 deletions

View File

@@ -361,8 +361,6 @@ port_default_gateway=True
[docker]
disable=False
# Timeout for API calls (in seconds, default is 1)
timeout=1
# Only show specific containers (comma separeted list of container name or regular expression)
# Comment this line to display all containers (default configuration)
#show=telegraf

View File

@@ -21,8 +21,6 @@ under the ``[docker]`` section:
[docker]
disable=False
# Timeout for API calls (in seconds, default is 1)
timeout=1
# Only show specific containers (comma separeted list of container name or regular expression)
show=thiscontainer,andthisone,andthoseones.*
# Hide some containers (comma separeted list of container name or regular expression)

View File

@@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "GLANCES" "1" "Jun 12, 2021" "3.2.0b2" "Glances"
.TH "GLANCES" "1" "Jun 14, 2021" "3.2.0b3" "Glances"
.SH NAME
glances \- An eye on your system
.

View File

@@ -29,7 +29,7 @@ import sys
# Global name
# Version should start and end with a numerical char
# See https://packaging.python.org/specifications/core-metadata/#version
__version__ = '3.2.0b2'
__version__ = '3.2.0b3'
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
__license__ = 'LGPLv3'

View File

@@ -137,8 +137,10 @@ class Plugin(GlancesPlugin):
def connect(self):
"""Connect to the Docker server."""
try:
ret = docker.from_env(timeout=int(self.get_conf_value('timeout',
default='1')))
# If the following line replace the next one, the issue #1878
# is reproduced (Docker containers information missing with Docker 20.10.x)
# So, for the moment disable the timeout option
ret = docker.from_env()
except Exception as e:
logger.error("docker plugin - Can not connect to Docker ({})".format(e))
ret = None