Check what is being sent by using the -v option. Perhaps the JSON you are trying to send isn't going through properly?
Cheers, -jay On Tue, Jan 10, 2012 at 10:51 AM, Alejandro Comisario < [email protected]> wrote: > Hi guys, we have a diablo cluster with keystone. > 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. > > Here we left the two requests, can anyone point where the solution might > be ? > > LISTING THE DEFAULT SECURITY GROUP: > # curl -X GET > "http://172.16.159.5:8774/v1.1/5/os-security-groups"<http://172.16.159.5:8774/v1.1/5/os-security-groups>-H > "X-Auth-Token: 3dd60c26-5f1d-438a-9e26-a2ff86570196" | python -mjson.tool > RESP: > { > "security_groups": [ > { > "description": "default", > "id": 67, > "name": "default", > "rules": [], > "tenant_id": "5" > } > ] > } > > TRYING TO CREATE A SECURITY GROUP: > # curl -X POST -d "{"security_group": {"name": "testSG", "description": > "testSG"}}" > "http://172.16.x.y:8774/v1.1/5/os-security-groups"<http://172.16.x.y:8774/v1.1/5/os-security-groups>-H > "X-Auth-Token: 3dd60c26-5f1d-438a-9e26-a2ff86570196" > RESP : > {"badRequest": {"message": "The server could not comply with the request > since it is either malformed or otherwise incorrect.", "code": 400}} > > TRYING TO ADD A RULE TO THE DEFAULT SECURITY GROUP: > # curl -X POST -d "{"security_group_rule": {"ip_protocol": "tcp", > "from_port": "22", "to_port": "22", "group_id": 67, "parent_group_id": 16, > "cidr": "0.0.0.0/0"}}" > "http://172.16.159.5:8774/v1.1/5/os-security-group-rules"<http://172.16.159.5:8774/v1.1/5/os-security-group-rules>-H > "X-Auth-Token: 3dd60c26-5f1d-438a-9e26-a2ff86570196" > RESP: > {"badRequest": {"message": "The server could not comply with the request > since it is either malformed or otherwise incorrect.", "code": 400}} > > 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. > PS1: Is the parent_group_id value, the same as group_id on the > "security_groups" database table ? > > Best regards. > -- > [image: meli] <http://www.mercadolibre.com> > *Alejandro Comisario * > * Infrastructure IT - #melicloud Cloud Builder* > Arias 3751, Piso 7 (C1430CRG) > Ciudad de Buenos Aires - Argentina > Cel: +549(11) 15-3770-1857 > Tel : +54(11) 4640-8443 > > _______________________________________________ > Mailing list: https://launchpad.net/~openstack > Post to : [email protected] > Unsubscribe : https://launchpad.net/~openstack > More help : https://help.launchpad.net/ListHelp > >
_______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : [email protected] Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp

