openstack auth with nova driver
Description of Issue/Question
I'm unable to connect to my openstack setup, there might be a config line missing.
Setup
geeko-land:
identity_url: http://$IPofKeystone:5000/v3/auth/tokens
auth_version: 3
tenant: admin
user: admin
compute_region: RegionOne
compute_name: nova
password: MyPassWord
ssh_key_name: abonilla
ssh_key_file: /etc/salt/abonilla.pem
driver: nova
I tried following https://docs.saltstack.com/en/2015.8/ref/clouds/all/salt.cloud.clouds.nova.html but using the keystone.user config fails
[WARNING ] The required 'user' configuration setting is missing from the 'openstack-key:nova' driver, which is configured under the 'openstack-key' alias.
because it wants the older settings as documented on the openstack driver
https://docs.saltstack.com/en/latest/topics/cloud/config.html#openstack
(I know nova and openstack are separate drivers)
Steps to Reproduce Issue
bash-4.2# salt-cloud --list-images=geeko-land
[INFO ] salt-cloud starting
[ERROR ] Failed to get the output of 'nova.avail_images()': The request you have made requires authentication. (HTTP 401)
geeko-land:
----------
Versions Report
Salt Version:
Salt: 2015.8.7
Dependency Versions:
Jinja2: 2.7.3
M2Crypto: Not Installed
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 14.7.0
Python: 2.7.12 (default, Jul 01 2016, 15:34:22) [GCC]
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.2
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
libgit2: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: Not Installed
smmap: Not Installed
timelib: Not Installed
System Versions:
dist: SuSE 42.1 x86_64
machine: x86_64
release: 4.4.19-moby
system: openSUSE 42.1 x86_64
Hi @abonillasuse - Thanks for filing this issue. I am a little bit unsure of how you're setting up your configuration. I do see that you do have user: admin set in the file you added above under geeko-land. However, right after that you say the keystone.user config fails. Are you using both the cloud provider file as well as the keystone.user setting in a config file?
The failure you listed comes from this line which calls out to this cloud function and produces the error. Though since you have user set in your file above, I am not sure why you're hitting that line. Unless I am misunderstanding how you're setting up your configuration.
I am not as familiar with the nova driver and module, but I bet @gtmanfred can help out on this one. What are we missing here?
@gtmanfred do you have any idea why this could be failing? I've used the nova driver settings that are required but I still can't authenticate. Is there a guide or correct document I should be looking at?
Update: Using identity_url: http://ServerIP:5000/v2.0/ auth_version: 2
worked for me. Perhaps Keystone/API v 3 is not supported yet?
I am going to look at this on monday, tagging myself with it so I don't forget.
@gtmanfred Any news from this?
@abonillasuse can you remove the /auth/tokens from the identity_url.
That is one difference between nova and openstack drivers, for the openstack driver you need to add the auth/tokens or /tokens for v2, but for nova, it should use the auth version and add the correct thing to the end (the novaclient and libcloud drivers require different identity urls)
Hi. I have the same problem
Setup
my-os:
minion:
master: 192.168.1.108
identity_url: http://controller:5000/v3
auth_version: 3
compute_name : nova
protocol: ipv4
compute_region: RegionOne
service_type : compute
tenant: admin
domain: default
user: admin
password: 87654321
driver: nova
ssh_key_file: /home/user/Загрузки/salt.pem
ssh_key_name: salt
insecure: false
Log are [ here ] https://gist.github.com/akhmetgali/a1ebd8dbcb3b0976f74056badb688164
I have been able to replicate this issue, and it definitely appears to be caused by mitaka moving to defaulting on keystone 3.
There appears to be a problem that we can't set the project_domain_name and user_domain_name yet.
So, this would have worked if novaclient was sanely written, instead it is not, and they dropped really using client.Client() as the authentication portion. So it does not support keystonev3.
Now, the shell command from novaclient does support keystonev3, because the shell builds it's own session and passes it to the client.Client() class. so we are going to have to do that, and that should make this work for yall :) I will try and finish it by the end of the week
I can use v2 with Liberty. But the driver still is not happy. I was able to set things up with the openstack driver with v2. @gtmanfred can you share the config you used with the nova driver? (since I guess nova is the latest driver...)
it is worth noting that if you are using mitaka, you can set
[identity]
default_domain_id = <domain_id>
in /etc/keystone/keystone.conf and use the v2 identity to authenticate. I am still working on getting the catalog to render correctly though.
Can someone try out these two commits and see if they work for you?
you should only have to add use_keystoneauth: True to your provider config if you are using your domainname is default.
If it is not default, also add
project_domain_name: <project domain name>
user_domain_name: <user domain name>
under the profile, like you do in your environment scripts from setting up openstack.
Sorry, here is the commits https://github.com/saltstack/salt/compare/2016.3...gtmanfred:nova
Hi! I'm trying to do with new commits but it's fail
root@user:/etc/salt# salt-cloud -p stack_micro from_sal
[WARNING ] Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL.
[WARNING ] Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL.
[ERROR ] There was a profile error: The resource could not be found. (HTTP 404) (Request-ID: req-b5797f67-5f7e-4880-ace0-501ab9738112)
Please include your provider config On Thu, Nov 17, 2016 at 4:16 AM akhmetgali [email protected] wrote:
Hi! I'm trying to do with new commits but it's fail
root@user:/etc/salt# salt-cloud -p stack_micro from_sal [WARNING ] Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL. [WARNING ] Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL. [ERROR ] There was a profile error: The resource could not be found. (HTTP 404) (Request-ID: req-b5797f67-5f7e-4880-ace0-501ab9738112)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saltstack/salt/issues/36548#issuecomment-261208388, or mute the thread https://github.com/notifications/unsubscribe-auth/AAssoZuzhcKp1Opc91mLQlLbF3LeUaTqks5q_CmEgaJpZM4KFfz- .
my provider config
my-os: minion: master: 192.168.1.108 use_keystoneauth: True identity_url: http://10.35.24.184:5000/v3/auth/tokens auth_version: 3 domain: default tenant: admin user: admin password: '123456' compute_region: RegionOne service_type : compute driver: nova ssh_key_file: /home/user/qa.pem ssh_key_name: qa insecure: false
Use 'project_domain_id' and 'user_domain_id' like openstack client and novacloent on the command line requires
Also, novaclient adds the /auth/tokens, so remove that from your auth_url On Sat, Nov 19, 2016 at 2:47 AM akhmetgali [email protected] wrote:
my provider config
my-os: minion: master: 192.168.1.108 use_keystoneauth: True identity_url: http://10.35.24.184:5000/v3/auth/tokens auth_version: 3 domain: default tenant: admin user: admin password: '123456' compute_region: RegionOne service_type : compute driver: nova ssh_key_file: /home/user/qa.pem ssh_key_name: qa insecure: false
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saltstack/salt/issues/36548#issuecomment-261701883, or mute the thread https://github.com/notifications/unsubscribe-auth/AAssocDPG73hC7HT8_yoxipFwoH8Cwejks5q_reQgaJpZM4KFfz- .
Sorry, it should be project_domain_name and user_domain_name On Sat, Nov 19, 2016 at 7:05 AM Daniel Wallace [email protected] wrote:
Use 'project_domain_id' and 'user_domain_id' like openstack client and novacloent on the command line requires
Also, novaclient adds the /auth/tokens, so remove that from your auth_url On Sat, Nov 19, 2016 at 2:47 AM akhmetgali [email protected] wrote:
my provider config
my-os: minion: master: 192.168.1.108 use_keystoneauth: True identity_url: http://10.35.24.184:5000/v3/auth/tokens auth_version: 3 domain: default tenant: admin user: admin password: '123456' compute_region: RegionOne service_type : compute driver: nova ssh_key_file: /home/user/qa.pem ssh_key_name: qa insecure: false
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/saltstack/salt/issues/36548#issuecomment-261701883, or mute the thread https://github.com/notifications/unsubscribe-auth/AAssocDPG73hC7HT8_yoxipFwoH8Cwejks5q_reQgaJpZM4KFfz- .