swauth-add-user issuse, 400 bad request in log

Asked by Lawrnecy Meng

Hi ,
    I meet one issues about swauth + swift, when i swauth-add-user
    ----------Issue---------
    swift@ubuntu:/var/log/swift$ swauth-add-user -K swauthkey -A http://127.0.0.1:8080/auth -a test tester testing
    Account creation failed: 500 Server Error
    User creation failed: 500 Server Error
    ---------proxy.log-------
    Here is the detail.
    http://paste.openstack.org/raw/18955/
    ---------proxy-server.conf-----
    Here is the detail.
    http://paste.openstack.org/raw/18957/
    --------swauth --help ------
   swift@ubuntu:/var/log/swift$ swauth-add-user --help
Usage: swauth-add-user [options] <account> <user> <password>

Options:
  -h, --help show this help message and exit
  -a, --admin Give the user administrator access; otherwise the user
                        will only have access to containers specifically
                        allowed with ACLs.
  -r, --reseller-admin Give the user full reseller administrator access,
                        giving them full access to all accounts within the
                        reseller, including the ability to create new
                        accounts. Creating a new reseller admin requires
                        super_admin rights.
  -s SUFFIX, --suffix=SUFFIX
                        The suffix to use with the reseller prefix as the
                        storage account name (default: <randomly-generated-
                        uuid4>) Note: If the account already exists, this will
                        have no effect on existing service URLs. Those will
                        need to be updated with swauth-set-account-service
  -A ADMIN_URL, --admin-url=ADMIN_URL
                        The URL to the auth subsystem (default:
                        http://127.0.0.1:8080/auth/
  -U ADMIN_USER, --admin-user=ADMIN_USER
                        The user with admin rights to add users (default:
                        .super_admin).
  -K ADMIN_KEY, --admin-key=ADMIN_KEY
                        The key for the user with admin rights to add users.

  Tks for you help..

  Regards,

  Lawnrece Meng

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Object Storage (swift) Edit question
Assignee:
No assignee Edit question
Solved by:
Lawrnecy Meng
Solved:
Last query:
Last reply:
Revision history for this message
JihwanKim (jih1103) said :
#1

Hello.

Swauth tools use just /auth/ and Swift tools use /auth/v1.0.
(http://gholt.github.com/swauth/stable/index.html)

If you possible, try it again with "http://127.0.0.1:8080/auth/"
not " http://127.0.0.1:8080/auth"

regards.

Revision history for this message
JihwanKim (jih1103) said :
#2

Hello.

I tested both of them... and those result was same.

Before... I use the tempauth. and for testing, I changed the swauth.

Install and setting with swauth.

then

First, 'swift-init proxy start' (OK)
Second, 'swauth-prep -K swauthkey' (NOK) --> 500 Server Error...

So, I tryied some ways...
and I just, 'swift-init all stop' and 'swift-init all start'
then 'swauth-prep -K swauthkey' (OK), surely I set the proxy-server.conf before this.

Pls, try it and if it is not a correct one then say that again...

Regards.

Revision history for this message
Lawrnecy Meng (longeek) said :
#3

Hi, JihwanKim
      I try this:
     root@ubuntu:/etc/swift# swauth-add-user -K swauthkey -A http://127.0.0.1:8080/auth/ -a test tester testing
     Account creation failed: 500 Server Error
     User creation failed: 500 Server Error

     The issue is again.

     Thanks for you help again.

--------------------
China OpenStack User Group (COSUG) - http://www.openstack.org.cn

To join the mailing list - visit this group at: http://groups.google.com/group/china-openstack-user-group

General user online chat group: QQ ID: 11315737
Developer user online chat group: QQ ID: 202265873
--------------------

From: JihwanKim
Date: 2012-06-29 11:35
To: mengql112233
Subject: Re: [Question #201704]: swauth-add-user issuse, 400 bad request in log
Your question #201704 on OpenStack Object Storage (swift) changed:
https://answers.launchpad.net/swift/+question/201704

JihwanKim posted a new comment:
Hello.

Swauth tools use just /auth/ and Swift tools use /auth/v1.0.
(http://gholt.github.com/swauth/stable/index.html)

If you possible, try it again with "http://127.0.0.1:8080/auth/"
not " http://127.0.0.1:8080/auth"

regards.

--
You received this question notification because you asked the question.

Revision history for this message
Lawrnecy Meng (longeek) said :
#4

Hi,
    Here 'swauth-prep -K swauthkey' is OK,
    But swauth-add-user -K swauthkey -A http://127.0.0.1:8080/auth/ -a test tester testing without luck..

    tks for you help.

Lawrence

--------------------
China OpenStack User Group (COSUG) - http://www.openstack.org.cn

To join the mailing list - visit this group at: http://groups.google.com/group/china-openstack-user-group

General user online chat group: QQ ID: 11315737
Developer user online chat group: QQ ID: 202265873
--------------------

From: JihwanKim
Date: 2012-06-29 12:06
To: mengql112233
Subject: Re: [Question #201704]: swauth-add-user issuse, 400 bad request in log
Your question #201704 on OpenStack Object Storage (swift) changed:
https://answers.launchpad.net/swift/+question/201704

JihwanKim posted a new comment:
Hello.

I tested both of them... and those result was same.

Before... I use the tempauth. and for testing, I changed the swauth.

Install and setting with swauth.

then

First, 'swift-init proxy start' (OK)
Second, 'swauth-prep -K swauthkey' (NOK) --> 500 Server Error...

So, I tryied some ways...
and I just, 'swift-init all stop' and 'swift-init all start'
then 'swauth-prep -K swauthkey' (OK), surely I set the proxy-server.conf before this.

Pls, try it and if it is not a correct one then say that again...

Regards.

--
You received this question notification because you asked the question.

Revision history for this message
Lawrnecy Meng (longeek) said :
#5

Hi,
     Before this issue,
     # swauth-prep -k swauthkey (OK)
     Tks for you help.

Revision history for this message
Lawrnecy Meng (longeek) said :
#6

Hi,
     Before this issue,
     # swauth-prep -k swauthkey (OK)
     Tks for you help.

Revision history for this message
Lawrnecy Meng (longeek) said :
#7

Hi All,
     The issue is OK,
     Thanks for JihwanKim.
     I change this in proxy-server.conf
     Old one:
     default_swift_cluster= local#http://127.0.0.1:8080/auth/v1.0
     New one:
     default_swift_cluster= local#http://127.0.0.1:8080/v1
     restart swift-init all stop; swift-init all start
     OK.
Lawrency