OpenStack client fails with "Cannot use v2 authentication with domain scope"

dreamcompute

#1

While doing terraform apply, I got this error:

openstack_compute_instance_v2.instance: Found 2 images matching Debian-8

So I tried fetching the image list so I can provide the image ID instead of the name…

openstack image list returned “Cannot use v2 authentication with domain scope”

AFAIK, all openstack commands return the same thing.

Here’s my openrc.sh (sanitized): https://pastebin.com/raw/N7nuiDjH


As a workaround, I’ll do glance image-list to get the image ID.


#2

I cannot replicate this on my machine, running version 3.12. What version of openstack client are you using?


#3

I’m using v3.12 too :confounded:


#4

I just downloaded it again from DreamCompute web UI, sourced it and issued openstack image list. I have no issue with API authentication version.

After looking at your openrc.sh I realized that the last line is different between yours and mine. Your says:

export OS_IDENTITY_API_VERSION=3

While mine has:

export OS_IDENTITY_API_VERSION=2

Where did you get your OpenStack RC file?


#5

https://iad2.dreamcompute.com/project/access_and_security/api_access/openrc/


#6

Looks like a bug: it’s possible that the rc file you get is wrong :frowning: Sorry for it, I’m filing an internal issue to investigate.
Meanwhile, try changing the OS_IDENTITY_API_VERSION to 2 and see if your Terraform scripts work.


#7

It’s working! Thank you very much, @smaffulli.


#8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.