Comment 7 for bug 1998333

Revision history for this message
Nishant Dash (dash3) wrote :

Hello,

- I'm on revision 42, and I am still hitting this, albeit this time its about not finding the endpoint

root@juju-b55047-3-lxd-10:~# sudo python3 /usr/local/lib/nagios/plugins/check_cinder_services.py
<function check_cinder_services at 0x7f656a8bcb80> raised unknown exception '<class 'keystoneauth1.exceptions.catalog.EndpointNotFound'>'
============================================================
Traceback (most recent call last):
  File "/usr/local/lib/nagios/plugins/nagios_plugin3.py", line 37, in try_check
    function(*args, **kwargs)
  File "/usr/local/lib/nagios/plugins/check_cinder_services.py", line 35, in check_cinder_services
    services = cinder.get("/os-services").json()["services"]
  File "/usr/lib/python3/dist-packages/keystoneauth1/adapter.py", line 395, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python3/dist-packages/openstack/proxy.py", line 97, in request
    response = super(Proxy, self).request(
  File "/usr/lib/python3/dist-packages/keystoneauth1/adapter.py", line 257, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 815, in request
    raise exceptions.EndpointNotFound()
keystoneauth1.exceptions.catalog.EndpointNotFound: Could not find requested endpoint in Service Catalog.
============================================================

- The charm has it,
/var/lib/juju/agents/unit-openstack-service-checks-0/charm/templates/nagios.novarc:10:export OS_VOLUME_API_VERSION={{ volume_api_version }}

- But it does not get rendered in /var/lib/nagios/nagios.novarc
```
export OS_USERNAME=nagios
export OS_PROJECT_NAME=services
export OS_PASSWORD=REDACTED
export OS_REGION_NAME=REDACTED
export OS_AUTH_URL=https://REDACTED/v3
# Allow novaclient libs to save to ~/.novaclient
export HOME=${SNAP_COMMON}
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_VERSION=3
export OS_USER_DOMAIN_NAME=service_domain
export OS_PROJECT_DOMAIN_NAME=service_domain
```

####

Workaround is to manually add `export OS_VOLUME_API_VERSION=3` to /var/lib/nagios/nagios.novarc