CERTIFICATE_VERIFY_FAILED will occur when using 'maas configauth' with snap env
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Expired
|
Medium
|
Unassigned |
Bug Description
When you use snap instead of debian to install maas, CERTIFICATE_
1, debian way will use /usr/lib/
# grep -r '__main__' /usr/lib/
if __name__ == '__main__':
print(where())
# grep -r 'def where' /usr/lib/
def where():
return "/etc/ssl/
2, snap way will use /snap/maas/
# grep -r '__main__' /snap/maas/
if __name__ == '__main__':
print(where())
vim /snap/maas/
try:
def where():
...
if _CACERT_PATH is None:
...
return _CACERT_PATH
except ImportError:
# This fallback will work for Python versions prior to 3.7 that lack the
# importlib.resources module but relies on the existing `where` function
# so won't address issues with environments like PyOxidizer that don't set
# __file__ on modules.
def read_text(_module, _path, encoding="ascii"):
with open(where(), "r", encoding=encoding) as data:
return data.read()
So the variable REQUESTS_
tags: | added: sts |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Is this issue still reproducible? There was an underlying issue in snapd that has since been fixed. It would be useful to know if the issue still occurs with e.g. MAAS 3.1 or later.