Check what is being sent by using the -v option. Perhaps the JSON you are trying to send isn't going through properly?<br><br>Cheers,<br>-jay<br><br><div class="gmail_quote">On Tue, Jan 10, 2012 at 10:51 AM, Alejandro Comisario <span dir="ltr"><<a href="mailto:alejandro.comisario@mercadolibre.com">alejandro.comisario@mercadolibre.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<tt>Hi guys, we have a diablo cluster with keystone.<br>
We can successfully create servers, but when we try to add a rule
to the default security group, or create a new one, we get a 400
"badRequest" error.<br>
<br>
Here we left the two requests, can anyone point where the solution
might be ?<br>
<br>
LISTING THE DEFAULT SECURITY GROUP:<br>
# curl -X GET <a href="http://172.16.159.5:8774/v1.1/5/os-security-groups" target="_blank">"http://172.16.159.5:8774/v1.1/5/os-security-groups"</a>
-H "X-Auth-Token: 3dd60c26-5f1d-438a-9e26-a2ff86570196" | python
-mjson.tool<br>
RESP:<br>
{<br>
"security_groups": [<br>
{<br>
"description": "default", <br>
"id": 67, <br>
"name": "default", <br>
"rules": [], <br>
"tenant_id": "5"<br>
}<br>
]<br>
}<br>
<br>
TRYING TO CREATE A SECURITY GROUP:<br>
# curl -X POST -d "{"security_group": {"name": "testSG",
"description": "testSG"}}"
<a href="http://172.16.x.y:8774/v1.1/5/os-security-groups" target="_blank">"http://172.16.x.y:8774/v1.1/5/os-security-groups"</a> -H
"X-Auth-Token: 3dd60c26-5f1d-438a-9e26-a2ff86570196"<br>
RESP : <br>
{"badRequest": {"message": "The server could not comply with the
request since it is either malformed or otherwise incorrect.",
"code": 400}}<br>
<br>
TRYING TO ADD A RULE TO THE DEFAULT SECURITY GROUP:<br>
# curl -X POST -d "{"security_group_rule": {"ip_protocol": "tcp",
"from_port": "22", "to_port": "22", "group_id": 67,
"parent_group_id": 16, "cidr": "<a href="http://0.0.0.0/0" target="_blank">0.0.0.0/0</a>"}}"
<a href="http://172.16.159.5:8774/v1.1/5/os-security-group-rules" target="_blank">"http://172.16.159.5:8774/v1.1/5/os-security-group-rules"</a> -H
"X-Auth-Token: 3dd60c26-5f1d-438a-9e26-a2ff86570196"<br>
RESP:<br>
{"badRequest": {"message": "The server could not comply with the
request since it is either malformed or otherwise incorrect.",
"code": 400}}<br>
<br>
PS: the token is the one obtained from keystone for tenant 5,
listing of SG is working ok, but creation of new SG nor adding a
new rule for that SG, is not.<br>
PS1: Is the parent_group_id value, the same as group_id on the
"security_groups" database table ?<br>
<br>
Best regards.</tt><span class="HOEnZb"><font color="#888888"><br>
<div>-- <br>
<a href="http://www.mercadolibre.com" target="_blank"><img src="" alt="meli" border="0"></a><br>
<div> <font style="font-size:8pt" color="#333333"><b>Alejandro Comisario </b><br>
<b> Infrastructure IT - #melicloud Cloud Builder</b></font><br>
<font color="#666666"><span style="font-size:6pt;color:gray" lang="ES">Arias 3751, Piso 7 (C1430CRG) <br>
Ciudad de Buenos Aires - Argentina<br>
Cel: +549(11) 15-3770-1857<br>
Tel : <a href="tel:%2B54%2811%29%204640-8443" value="+541146408443" target="_blank">+54(11) 4640-8443</a></span><br>
</font> </div>
</div>
</font></span></div>
<br>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/%7Eopenstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to : <a href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/%7Eopenstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div><br>