Failed to run up inastance with a new user account

Asked by Hugo Kou

#nova-manage create user test2
#nova-manage project add hugopro test2
#nova-manage project zipfile hugopro test2 ~/novarc.zip
#unzip novarc.zip
#source novarc

# euca-describe-images
IMAGE aki-0000000f nova/tty-kernel (aki-tty) available public x86_64 kernel
IMAGE ari-00000010 nova/tty-ramdisk (ari-tty) available public x86_64 ramdisk
IMAGE ami-00000011 demo/tty (ami-tty) available public x86_64 machine aki-0000000f ari-00000010

# euca-run-instances ami-00000011 -t m1.tiny -k test2
Warning: failed to parse error message from AWS: <unknown>:1:0: syntax error
EC2ResponseError: 401 Unauthorized
401 Unauthorized

This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Vish Ishaya
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Hugo Kou (tonytkdk) said :
#1

Well , I check nova-api.log . Found something as below
========================================
2011-04-26 14:33:40,282 DEBUG nova.auth.manager [-] user: User('test2', 'test2', '921c52b2-f37b-4564-b8bc-8cefc31036a3', 'fca9c77c-fdd5-4c50-b48c-d8a9ea8055ad', False) from (pid=28622) authenticate /usr/lib/pymodules/python2.7/nova/auth/manager.py:270
2011-04-26 14:33:40,418 DEBUG nova.auth.manager [-] user: User('test2', 'test2', '921c52b2-f37b-4564-b8bc-8cefc31036a3', 'fca9c77c-fdd5-4c50-b48c-d8a9ea8055ad', False) from (pid=28622) authenticate /usr/lib/pymodules/python2.7/nova/auth/manager.py:270
========================================

"False" , I think it should be "True" . am I right?

thanks

Revision history for this message
Best Vish Ishaya (vishvananda) said :
#2

I'm sure this isn't the clearest from the documentation but you need to do:

nova-manage role add test2 sysadmin
nova-manage role add test2 sysadmin hugopro

non-project-managers need the sysadmin role to launch instances in the project. Users also need netadmin role to deal with all network related commands. You haven't needed it until now because your main user is a superuser (you created with nova-manage user admin instead of nova-manage user create)

Vish

On Apr 25, 2011, at 11:14 PM, Hugo Kou wrote:

> New question #154272 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/154272
>
> #nova-manage create user test2
> #nova-manage project add hugopro test2
> #nova-manage project zipfile hugopro test2 ~/novarc.zip
> #unzip novarc.zip
> #source novarc
>
> # euca-describe-images
> IMAGE aki-0000000f nova/tty-kernel (aki-tty) available public x86_64 kernel
> IMAGE ari-00000010 nova/tty-ramdisk (ari-tty) available public x86_64 ramdisk
> IMAGE ami-00000011 demo/tty (ami-tty) available public x86_64 machine aki-0000000f ari-00000010
>
>
> # euca-run-instances ami-00000011 -t m1.tiny -k test2
> Warning: failed to parse error message from AWS: <unknown>:1:0: syntax error
> EC2ResponseError: 401 Unauthorized
> 401 Unauthorized
>
> This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
>
>
>
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Hugo Kou (tonytkdk) said :
#3

Thanks Vish

I'm so surprise about role "sysadmin" it did not write in document.

Actually I check this description in document, but only "netadmin" is correct .

Cloud Administrator. (admin) Users of this class enjoy complete system access.
IT Security. (itsec) This role is limited to IT security personnel. It permits role holders to quarantine instances.
Project Manager. (projectmanager)The default for project owners, this role affords users the ability to add other users to a project, interact with project images, and launch and terminate instances.
Network Administrator. (netadmin) Users with this role are permitted to allocate and assign publicly accessible IP addresses as well as create and modify firewall rules.
Developer. This is a general purpose role that is assigned to users by default.

thanks......

Revision history for this message
Hugo Kou (tonytkdk) said :
#4

Additional question ...
is there any document talk about add user and role in Dashboard?

bcz I always failed to register a user in dashboard , even the account is already exist in nova.

============================
error at /accounts/register/
[Errno 111] Connection refused
Request Method: POST
Request URL: http://172.16.4.75:8000/accounts/register/
Django Version: 1.2.4
Exception Type: error
Exception Value:
[Errno 111] Connection refused
Exception Location: /usr/lib/python2.7/socket.py in create_connection, line 571
Python Executable: /home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/bin/python
Python Version: 2.7.1
Python Path: ['/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/dashboard', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/pip-1.0-py2.7.egg', '/home/hugo/src/openstack-dashboard/trunk/django-nova/src', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/mox-0.5.3-py2.7.egg', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/plat-linux2', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/lib-tk', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/lib-old', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib64/python2.7/lib-tk', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/dashboard', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/dashboard']
Server time: Tue, 26 Apr 2011 00:31:51 -0700error at /accounts/register/
[Errno 111] Connection refused
Request Method: POST
Request URL: http://172.16.4.75:8000/accounts/register/
Django Version: 1.2.4
Exception Type: error
Exception Value:
[Errno 111] Connection refused
Exception Location: /usr/lib/python2.7/socket.py in create_connection, line 571
Python Executable: /home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/bin/python
Python Version: 2.7.1
Python Path: ['/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/dashboard', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/pip-1.0-py2.7.egg', '/home/hugo/src/openstack-dashboard/trunk/django-nova/src', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/mox-0.5.3-py2.7.egg', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/plat-linux2', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/lib-tk', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/lib-old', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib64/python2.7/lib-tk', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/dashboard', '/home/hugo/src/openstack-dashboard/trunk/openstack-dashboard/dashboard']
Server time: Tue, 26 Apr 2011 00:31:51 -0700
===================================

Revision history for this message
Hugo Kou (tonytkdk) said :
#5

Thanks Vish Ishaya, that solved my question.