Disable UserQuota if url is not provided
[2019-11-19 10:25:50,241][WARNING][10.255.3.1][none][CP Server Thread-7][rdiffweb.core.user] IuserQuota [MinarcaUserSetup = minarca_plugins:MinarcaUserSetup] fail to run
Traceback (most recent call last):
File "/opt/minarca/lib/python3.5/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/opt/minarca/lib/python3.5/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/opt/minarca/lib/python3.5/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/minarca/lib/python3.5/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/opt/minarca/lib/python3.5/site-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1107, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1152, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1103, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/opt/minarca/lib/python3.5/site-packages/urllib3/connection.py", line 184, in connect
conn = self._new_conn()
File "/opt/minarca/lib/python3.5/site-packages/urllib3/connection.py", line 169, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f8ed24d4ba8>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/minarca/lib/python3.5/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/opt/minarca/lib/python3.5/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/opt/minarca/lib/python3.5/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8081): Max retries exceeded with url: /quota/admin (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8ed24d4ba8>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/minarca/lib/python3.5/site-packages/rdiffweb/core/user.py", line 203, in disk_usage
return cls(self._userdb.app).get_disk_usage(self)
File "/opt/minarca/lib/python3.5/site-packages/minarca_plugins/__init__.py", line 111, in get_disk_usage
r = self.session.get(url, timeout=1)
File "/opt/minarca/lib/python3.5/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/opt/minarca/lib/python3.5/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/opt/minarca/lib/python3.5/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/opt/minarca/lib/python3.5/site-packages/minarca_plugins/__init__.py", line 49, in send
return super(TimeoutHTTPAdapter, self).send(*args, **kwargs)
File "/opt/minarca/lib/python3.5/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8081): Max retries exceeded with url: /quota/admin (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8ed24d4ba8>: Failed to establish a new connection: [Errno 111] Connection refused',))
Edited by Patrik Dufresne