Ask Your Question
0

openstack volume list The resource could not be found

asked 2019-05-15 13:19:12 -0500

stef97 gravatar image

Hi, If I run below command openstack volume list I am getting this response The resource could not be found

However, "cinder list" and listing the volumes from GUI(Horizon), works fine

Any suggestions / ideas will be appreciated I am using CEPH for volumes and imgaes

Here is cinder.conf [root@ops-ctrl-dev ~]# cat /etc/cinder/cinder.conf

[DEFAULT]
enabled_backends = ceph
default_volume_type = ceph
backup_swift_url=http://10.10.30.158:8080/v1/AUTH_
backup_swift_container=volumebackups
backup_driver=cinder.backup.drivers.swift
enable_v3_api=True
enable_v2_api=false
storage_availability_zone=nova
default_availability_zone=nova
auth_strategy=keystone
osapi_volume_listen=0.0.0.0
osapi_volume_workers=2
enable_force_upload = true
debug=True
log_dir=/var/log/cinder
transport_url=rabbit://guest:guest@10.10.30.158:5672/
control_exchange=openstack
api_paste_config=/etc/cinder/api-paste.ini
glance_host=10.10.30.158
#image_conversion_dir = /mnt/nfs/img/conversion
#image_conversion_dir = $state_path/conversion
[database]
connection=mysql+pymysql://cinder:92fcdb6ddf42473e@10.10.30.158/cinder
[key_manager]
backend=cinder.keymgr.conf_key_mgr.ConfKeyManager

[keystone_authtoken] www_authenticate_uri=http://10.10.30.158:5000/v3 auth_uri=http://10.10.30.158:5000/v3 auth_type=password auth_url=http://10.10.30.158:35357/v3 username=cinder password=8a68c661ca6e4de6 user_domain_name=Default project_name=services project_domain_name=Default [ceph]

volume_driver = cinder.volume.drivers.rbd.RBDDriver volume_backend_name = ceph rbd_pool = volumes rbd_ceph_conf = /etc/ceph/ceph.conf rbd_flatten_volume_from_snapshot = false rbd_max_clone_depth = 5 rbd_store_chunk_size = 4 rados_connect_timeout = -1 rbd_user = cinder rbd_secret_uuid = 78720044-69a4-4256-a2a1-22f55ca1de11 rbd_keyring_config = /etc/ceph/ceph.client.cinder.keyring

edit retag flag offensive close merge delete

Comments

If the cinder client works and the openstack client doesn’t, I would look for problems in the openstack client. You could start by finding out which API fails, for example by inspecting the debug output of the client, or comparing debug outputs of both clients.

Bernd Bausch gravatar imageBernd Bausch ( 2019-05-15 17:01:02 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2019-05-16 08:10:38 -0500

stef97 gravatar image

updated 2019-05-16 11:33:53 -0500

Thanks for taking the trouble to provide guidance adding --debug yield the following results ( excerpts) Any ( further) help will be appreciated

authentications seems to work

Making authentication request to http://10.10.30.158:5000/v3/auth/tokens
http://10.10.30.158:5000 "POST /v3/auth/tokens HTTP/1.1" 201 8715

 Instantiating volume client: <class 'cinderclient.v2.client.Client'>
Instantiating compute client for API Version Major: 2, Minor: 0
Instantiating compute api: <class 'openstackclient.api.compute_v2.APIv2'>
Instantiating identity client: <class 'keystoneclient.v3.client.Client'>
Making authentication request to http://10.10.30.158:5000/v3/auth/tokens
http://10.10.30.158:5000 "POST /v3/auth/tokens HTTP/1.1" 201 8715

but getting data from endpoint is not despite the endpoint being up and running

 Starting new HTTP connection (1): 10.10.30.158
http://10.10.30.158:8776 "GET /v2/b7d003aea29e4ebab92315a3f15e9987/volumes/detail HTTP/1.1" 404 112
RESP: [404] Connection: keep-alive Content-Length: 112 Content-Type: application/json Date: Thu, 16 May 2019 12:57:30 GMT
RESP BODY: {"message": "The resource could not be found.<br /><br />\n\n\n", "code": "404 Not Found", "title": "Not Found"}
The resource could not be found.<br /><br />


openstack endpoint list | grep 8776 | grep v2
| 473244d56b144b11aa6c4a69593175ca | RegionOne | cinderv2     | volumev2        | True    | public    | http://10.10.30.158:8776/v2/%(tenant_id)s      |
| 8d75c76384414574a6293c82ac5e9938 | RegionOne | cinderv2     | volumev2        | True    | internal  | http://10.10.30.158:8776/v2/%(tenant_id)s      |
| deb8d6e18525449a9fa12a9ed14663ec | RegionOne | cinderv2     | volumev2        | True    | admin     | http://10.10.30.158:8776/v2/%(tenant_id)s      |

api.log does not have anything useful ( only 404 error) excerpts from cinder --debug list ( which works fine) - it seems the difference is that it uses version 3 instead of 2

DEBUG:keystoneauth.session:REQ: curl -g -i -X GET http://10.10.30.158:5000/v3 -H "Accept: application/json" -H "User-Agent: cinder keystoneauth1/3.10.0 python-requests/2.19.1 CPython/2.7.5"
DEBUG:keystoneauth.session:RESP: [200] Connection: Keep-Alive Content-Encoding: gzip Content-Length: 193 Content-Type: application/json Date: Thu, 16 May 2019 15:23:43 GMT Keep-Alive: timeout=15, max=100 Server: Apache/2.4.6 (CentOS) Vary: X-Auth-Token,Accept-Encoding x-openstack-request-id: req-af5efd23-4154-4af5-a7be-de53907e80bb
DEBUG:keystoneauth.session:RESP BODY: {"version": {"status": "stable", "updated": "2018-10-15T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.11", "links": [{"href": "http://10.10.30.158:5000/v3/", "rel": "self"}]}}
DEBUG:keystoneauth.session:GET call to http://10.10.30.158:5000/v3 used request id req-af5efd23-4154-4af5-a7be-de53907e80bb
DEBUG:keystoneauth.identity.v3.base:Making authentication request to http://10.10.30.158:5000/v3/auth/tokens
enter code here

DEBUG:keystoneauth:GET call to volumev3 for http://10.10.30.158:8776/v3/b7d003aea29e4ebab92315a3f15e9987/volumes/detail used request id req-3d19e750-8aea-4697-b2ba-c36609b03b57

I am running both openstack and cinder commands using same shell sourced environment Why the different results ?

cat keystonerc_admin
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD='CCCCCC'
    export OS_AUTH_URL=http://10.10.30.158:5000/v3
    export PS1='[\u@\h \W(keystone_admin)]\$ '

export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME ...
(more)
edit flag offensive delete link more

Comments

There should be an entry in the Cinder API log relevant to this error, roundabout 12:57:30 GMT.

What are the corresponding cinder client debug messages?

Bernd Bausch gravatar imageBernd Bausch ( 2019-05-16 09:19:26 -0500 )edit

The difference between the two: The openstack client uses Cinder API v2, the cinder client uses v3. This means that the shell environments of the two commands must be different, and I guess v2 is not installed correctly. It is outdated anyway; just use v3.

Bernd Bausch gravatar imageBernd Bausch ( 2019-05-16 10:42:52 -0500 )edit

if I add "--os-volume-api-version 3 " it is working fine. It seems openstack client is using version 2 by default as per the 'openstack --help " Many thanks for your help

stef97 gravatar imagestef97 ( 2019-05-16 13:04:44 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-05-15 13:19:12 -0500

Seen: 37 times

Last updated: May 16