Quantum net-list 400 Bad Request
Hi all,
I've made a script for launch several instaces.This execute Quantum net-list command once per instance. After some time the command reply with 400 Bad Request. I've read that is an error that appear when you try to do bulk operation. After that I've edited quantum.conf "adding allow_bulk=yes" but the problem persists.
Can someone help me?
Thanks a lot.
Matteo
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- neutron Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Matteo Dacrema
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Could you post the script that you were using?
On Jul 1, 2013, at 8:56 AM, Matteo Dacrema <email address hidden> wrote:
> New question #231692 on neutron:
> https:/
>
> Hi all,
> I've made a script for launch several instaces.This execute Quantum net-list command once per instance. After some time the command reply with 400 Bad Request. I've read that is an error that appear when you try to do bulk operation. After that I've edited quantum.conf "adding allow_bulk=yes" but the problem persists.
> Can someone help me?
> Thanks a lot.
> Matteo
>
>
> --
> You received this question notification because you are an answer
> contact for neutron.
Revision history for this message
|
#3 |
This is the script:
#!/bin/bash
count=0
for id in $(cat tenid) #file that contains number to assing to tenant ,user,etc.
do
`keystone tenant-create --name net$id --enabled true`
`keystone user-create --name net$id --tenant-id $(keystone tenant-list |grep net$id | awk '{print $2}') --pass grizzly --enabled true`
`quantum net-create --tenant-id $(keystone tenant-list |grep net$id |awk '{print $2}') net$id`
`quantum subnet-create --name net$id --tenant-id $(keystone tenant-list |grep net$id |awk '{print $2}') net$id 192.168.$id.0/24 --dns-nameserver 8.8.8.8`
`quantum router-create --tenant-id $(keystone tenant-list |grep net$id |awk '{print $2}') router$id`
`quantum router-
`quantum router-gateway-set $(quantum router-list |grep router$id | awk '{print $2}') PublicNetwork`
`quantum net-list | grep net$id |awk '{print $2}'`
while [ $count -lt 3 ];
do
`nova --os-tenant-name net$id --os-username net$id --os-password password --os-auth-url url boot --image 5b719d72-
let count=count+1
done
count=0
done
Thanks
Revision history for this message
|
#4 |
after how many iterations are you seeing this issue?
also, can you add the -v argument to the net-list command and show that output before and after the "400 bad request" starts happening?
Revision history for this message
|
#5 |
I don't know exactly after how many iterations but i'm secure that this issue happens after 70/80 execution of quantum net-list command. This remain the only quantum command that respond 400.
Now i'm not able to run the command with the -v argument because now it is working.
But I've already executed it with the -v argument when it respond 400 and I haven't see nothing of helpful.
Thanks
Revision history for this message
|
#6 |
Edgar,
I tried running your script and have it working in my setup for the most part, although most of
my instances ended up in ERROR state (some are ACTIVE). I ended up with 92 networks and never
saw the 400 error response. I have "quantum net-list" running in a loop now and it's not seeing the
issue either.
any clues in your /var/log/
Revision history for this message
|
#7 |
James,
There is a timing issue between Neutron client and Neutron DB and this is why you end up having so many instances in ERROR state. This problem has been handled in:
https:/
You may want to see if you have this patch in your code.
Edgar
Revision history for this message
|
#8 |
Hi all here the error:
root@grizzly:# quantum -v net-list
DEBUG: quantumclient.
DEBUG: quantumclient.
REQ: curl -i http://
DEBUG: quantumclient.
DEBUG: quantumclient.
REQ: curl -i http://
DEBUG: quantumclient.
DEBUG: quantumclient.
REQ: curl -i http://
DEBUG: quantumclient.
Your browser sent an invalid request.
</body></html>
DEBUG: quantumclient.
Your browser sent an invalid request.
</body></html>
ERROR: quantumclient.shell <html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>
DEBUG: quantumclient.shell clean_up ListNetwork
DEBUG: quantumclient.shell got an error: <html><body><h1>400 Bad request</h1>
Your browser sent an invalid request.
</body></html>
Revision history for this message
|
#9 |
This is a guess here, but I'm noticing your client request is using a really large x-auth token. it's 4484 characters.
There was another bug I hit where my request was ending up too large when I had too many subnets. It was
different error response than this.
Point is, I wonder if your request is becoming too large for the server to handle after so many subnet ids are given in addition to the 4k character token.
I don't know enough about how to tweak anything with the tokens, so maybe someone else can chime in on that, if that is
indeed the issue.
Revision history for this message
|
#10 |
Hi all,
thanks for your answer it solved my problem.
The problem it's the request too long.
Thanks again.
Regards.
Matteo