[UPDATE]
I have solved the problem I was having (see details below). For me, the new settings that I followed in [keystone_authtoken] in both nova.conf and glance-api.conf from the Kilo installation guide were the problem. I checked out the Kilo configuration guide, and I'm not even seeing project_domain_id, user_domain_id, project_name, username, and password as valid entries. I had to make a few changes:
- The auth_uri should be the full URL, including version number
- user admin_tenant_name, admin_user, and admin_password.
So my new [keystone_authtoken] section looks like this:
[keystone_authtoken]
auth_uri = http://kilocontroller:5000/v2.0
identity_uri = http://kilocontroller:35357
admin_tenant_name = service
admin_user = nova
admin_password = XXXXXXXXXXXX
I made the same changes in my glance-api.conf file and now I can do an image-list and image create, so I'm happy.
adendukuri, can you see if this is the source of your error messages as well?
[ORIGINAL POST BELOW:]
I'm working on a Kilo installation, and it looks like I'm having the same trouble with the nova and glance APIs.
I followed the Kilo installation guide for the config files and set up the keystone_authtoken section as follows:
[keystone_authtoken]
auth_uri = http://kilocontroller:5000
identity_uri = http://kilocontroller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = XXXXXXXXXXX
And before I run these commands, I source the admin credentials. That also uses the suggested environment variables from the Kilo installation guide:
[root@kilocontroller ~]# cat admin-openrc.sh
export OS_PROJECT_DOMAIN_ID=default
export OS_USER_DOMAIN_ID=default
export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=XXXXXXXXXXXXXXX
export OS_AUTH_URL=http://kilocontroller:35357/v3
export OS_IMAGE_API_VERSION=2
I get the same error in my logs:
[root@kilocontroller ~]# tail -4 /var/log/nova/nova-api.log
2015-05-07 09:04:06.276 3302 ERROR keystonemiddleware.auth_token [-] Bad response code while validating token: 400
2015-05-07 09:04:06.277 3302 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "Expecting to find username or userId in passwordCredentials - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error.", "code": 400, "title": "Bad Request"}}
2015-05-07 09:04:06.277 3302 WARNING keystonemiddleware.auth_token [-] Authorization failed for token
2015-05-07 09:04:06.278 3302 INFO nova.osapi_compute.wsgi.server [-] 192.168.10.110 "GET /v2/3a5e3f78fcbf43c9b36930a8943bc735/os-services HTTP/1.1" status: 401 len: 284 time: 0.0119960
I also ran the above curl command, and it looks like it is successful:
[root@kilocontroller ~]# curl -s -X POST http://kilocontroller:5000/v2.0/tokens \
-H "Content-Type: application/json" \
-d '{"auth": {"tenantName": "'"$OS_TENANT_NAME"'", "passwordCredentials":
{"username": "'"$OS_USERNAME"'", "password": "'"$OS_PASSWORD"'"}}}'
{"access": {"token": {"issued_at": "2015-05-07T14:39:04.401974", "expires": "2015-05-07T15:39:04Z", "id": "e5807245d39c46ed84ac2bfe5b72ea8e", "tenant": {"description": "Admin Project", "enabled": true, "id": "3a5e3f78fcbf43c9b36930a8943bc735", "name": "admin"}, "audit_ids": ["MCDVi8YATQOrDDf2xFX7Pg"]}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://kilocontroller:9292", "region": "RegionOne", "internalURL": "http://kilocontroller:9292", "id": "7c23f97f2bdc45268f898f98d1f5609e", "publicURL": "http://kilocontroller:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://kilocontroller:8774/v2/3a5e3f78fcbf43c9b36930a8943bc735", "region": "RegionOne", "internalURL": "http://kilocontroller:8774/v2/3a5e3f78fcbf43c9b36930a8943bc735", "id": "2258953915fb4a4ca352f0914ad29136", "publicURL": "http://kilocontroller:8774/v2/3a5e3f78fcbf43c9b36930a8943bc735 ...
(more)
did you
source
the credentials?