admin-openrc.sh error

1,022 views
Skip to first unread message

Massimo Canonico

unread,
May 13, 2016, 5:12:59 AM5/13/16
to cloudlab-users

Hi all,

I would like to use the "nova" commands and I started with these steps:

- from ctl machine, downloading the admin-openrc.sh file

- in ctl machine, run "source admin-openrc.sh"

- try "nova list" command

- It asks me a password, and I put the one indicate in "profile instruction"

- and then I get this error:

mcanonic@ctl:~$ nova list
ERROR (BadRequest): Expecting to find domain in user - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-e0bac595-de0f-47e0-a942-1a508ae1a9a2)

Besides this error, there are something that it is not clear to me in the "basic instructions", such as:

- "If you need to run the OpenStack CLI tools, or your own scripts that use the OpenStack APIs, you'll find authentication credentials in /root/setup/admin-openrc.sh" where is located this file? I did not find it in ctl machine

- admin-openrc.sh uses "admin" as username, but in the instuction I read: "Be aware that the username in this file is adminapi, not admin" . So, maybe, the script provided my horizon is wrong?

Thanks in advance,

    Massimo

David M. Johnson

unread,
May 13, 2016, 10:42:49 AM5/13/16
to cloudla...@googlegroups.com
On 05/13/16 03:12, Massimo Canonico wrote:
> Hi all,
>
> I would like to use the "nova" commands and I started with these steps:
>
> - from ctl machine, downloading the admin-openrc.sh file
>
> - in ctl machine, run "source admin-openrc.sh"
>
> - try "nova list" command
>
> - It asks me a password, and I put the one indicate in "profile instruction"
>
> - and then I get this error:
>
> mcanonic@ctl:~$ nova list
> ERROR (BadRequest): Expecting to find domain in user - the server could
> not comply with the request since it is either malformed or otherwise
> incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID:
> req-e0bac595-de0f-47e0-a942-1a508ae1a9a2)
>
> Besides this error, there are something that it is not clear to me in
> the "basic instructions", such as:
>
> - "If you need to run the OpenStack CLI tools, or your own scripts that
> use the OpenStack APIs, you'll find authentication credentials in
> /root/setup/admin-openrc.sh" where is located this file? I did not find
> it in ctl machine

If you could not find this file, then I'm not sure what admin-openrc.sh
you are using, but it is not the one this profile's setup scripts
created. So you won't be able to use the CLI tools.

I just created a test experiment using the latest version of the
OpenStack profile, using the default openstack version Liberty, and
/root/setup/admin-openrc.sh does exist. Of course you will have to use
'sudo' to become root and either source it as root, or copy it somewhere
into your user homedir.

Are you using the latest version? Which OpenStack version parameter did
you select, Liberty/Kilo/Juno? If so, point me to your experiment, and
I'll look at it.

> Massimo

David

David M. Johnson

unread,
May 13, 2016, 10:46:21 AM5/13/16
to cloudla...@googlegroups.com
Ok, I found your Test1 experiment, and /root/setup/admin-openrc.sh does
exist. I ran 'sudo su -' to become root, 'source
/root/setup/admin-openrc.sh' to get the credential info as environment
variables, and then 'nova list' works fine.

David

Massimo Canonico

unread,
May 13, 2016, 11:36:46 AM5/13/16
to cloudla...@googlegroups.com

Thanks David,

it works.

So, the eucarc that a user can download from Horizon is not useful, right? I am also a little confused with the sentence: "Be aware that the username in this file is adminapi, not admin".

Maybe you could consider to rewrite the paragraph concerning with something like this:


If you need to run the OpenStack CLI tools, or your own scripts that use the OpenStack APIs, you'll find authentication credentials in /root/setup/admin-openrc.sh on control node. You just need to login into control node and run 'sudo source /root/setup/admin-openrc.sh' to start using OpenStack CLI tools.

Just this, the adminapi (IMHO) confuses a little since the eucarc uses "admin":

export OS_PROJECT_NAME=admin
export OS_TENANT_NAME=admin

Best and thanks,

Massimo

Reply all
Reply to author
Forward
0 new messages