Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

ERROR (BadRequest): Expecting apiKey (HTTP 400) #94

Open
pozgo opened this issue Sep 2, 2015 · 8 comments
Open

ERROR (BadRequest): Expecting apiKey (HTTP 400) #94

pozgo opened this issue Sep 2, 2015 · 8 comments
Assignees
Labels

Comments

@pozgo
Copy link

pozgo commented Sep 2, 2015

After running git pull

 [SUPERNOVA] Running nova against prod...

__ Error Output ______________________________________________________________
ERROR (BadRequest): Expecting apiKey (HTTP 400)

MacOS 10.10.5

@sjafferali
Copy link

This actually looks like an issue with python-novaclient 2.27.0. I tried providing all the variables to nova and received the same error. Rolling back to 2.26.0 fixed it for me.

samir@macbook [~]$ pip install python-novaclient==2.26.0

@major
Copy link
Owner

major commented Sep 4, 2015

Hey @pozgo -- thanks for the bug report. That error output is coming from python-novaclient, as @sjafferali noted above. You might want to double-check your supernova configuration to make sure your credentials are entered correctly.

@major major self-assigned this Sep 4, 2015
@major major added the question label Sep 4, 2015
@sjafferali
Copy link

To expand on my previous reply, there appears to be an issue with the python-novaclient 2.27.0 update that causing the error "ERROR (BadRequest): Expecting apiKey (HTTP 400)."

samir@macbook [~]$ nova --version
2.26.0
samir@macbook [~]$ nova list
/Library/Python/2.7/site-packages/novaclient/v1_1/__init__.py:30: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module.
  warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
/Library/Python/2.7/site-packages/requests/packages/urllib3/connection.py:251: SecurityWarning: Certificate has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SecurityWarning
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+
samir@macbook [~]$ sudo pip install -U python-novaclient
[Truncated for brevity]
samir@macbook [~]$ nova --version
2.27.0
samir@macbook [~]$ nova list
/Library/Python/2.7/site-packages/requests/packages/urllib3/connection.py:251: SecurityWarning: Certificate has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SecurityWarning
ERROR (BadRequest): Expecting apiKey (HTTP 400)
samir@macbook [~]$

Since supernova calls nova with arguments, it is affected as well.

samir@macbook [~]$ supernova self show
[SUPERNOVA] Running nova against self...

__ Error Output ______________________________________________________________
/Library/Python/2.7/site-packages/requests/packages/urllib3/connection.py:251: SecurityWarning: Certificate has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SecurityWarning
ERROR (BadRequest): Expecting apiKey (HTTP 400)

samir@macbook [~]$

@pozgo
Copy link
Author

pozgo commented Sep 4, 2015

HI, Thanks for such a quick reply. After downgrading the nova client to 2.26.0 seems to work again.
Thanks @sjafferali !!! :)

BTW. Still after having supernova run and getting output there is small error.

| c91ae969-40a5-421a-8cb1-c32cb6998dd4 | Windows Server 2012 R2 + SQL Server 2014 Standard            | ACTIVE |        |
| beb3dfe6-ebb0-4943-bcea-65a3e11bb7bd | Windows Server 2012 R2 + SQL Server 2014 Web                 | ACTIVE |        |
| 9aa0d346-c06f-4652-bbb1-4342a7d2d017 | iPXE Boot (boot.rackspace.com)                               | ACTIVE |        |
+--------------------------------------+--------------------------------------------------------------+--------+--------+

__ Error Output ______________________________________________________________
/Library/Python/2.7/site-packages/novaclient/v1_1/__init__.py:30: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module.
  warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "

But this is not big issue as far as I can use supernova. Thanks again

@DanielSmedegaardBuus
Copy link

This issue is also present in 2.28.0. I downgraded to 2.26.0 as suggested here, and I can now access Rackspace.

@halfshellhero
Copy link

+1, same as @DanielSmedegaardBuus

I updated to 2.28.0 this morning and suddenly started receiving the 400 bad request errors as well.

ERROR (BadRequest): Expecting apiKey (HTTP 400)

I made no changes to my .supernova credentials file; downgraded back to 2.26.0 and functionality was restored.

@gtmanfred
Copy link
Contributor

https://review.openstack.org/#/c/221570/

Once that goes through, or someone comments on it, that should fix the problem

The problem is that every nova client call checks for the api_version, but the rackspace api endpoint has that disabled.

@alanquillin
Copy link

Just a heads up. I pulled down the most recent 2.31.0 (after https://review.openstack.org/#/c/221570/ @gtmanfred mentioned above has been merged) and this issue seems to have been resolve.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants