Monday morning testing
Tim Penhey
tim.penhey at canonical.com
Mon Apr 22 00:12:52 UTC 2013
After more digging and debugging:
The response that we get from ec2 is that the security group exists and
the existing security group info is like this:
Groups:[]ec2.SecurityGroupInfo{
ec2.SecurityGroupInfo{
SecurityGroup:ec2.SecurityGroup{
Id:"sg-ab4857c7",
Name:"juju-amazon-ap"},
OwnerId:"422746332666",
Description:"juju group",
IPPerms:[]ec2.IPPerm{
ec2.IPPerm{
Protocol:"tcp", FromPort:22, ToPort:22,
SourceIPs:[]string{"0.0.0.0/0"},
SourceGroups:[]ec2.UserSecurityGroup(nil)},
ec2.IPPerm{
Protocol:"tcp", FromPort:17070, ToPort:17070,
SourceIPs:[]string{"0.0.0.0/0"},
SourceGroups:[]ec2.UserSecurityGroup(nil)},
ec2.IPPerm{
Protocol:"tcp", FromPort:37017, ToPort:37017,
SourceIPs:[]string{"0.0.0.0/0"},
SourceGroups:[]ec2.UserSecurityGroup(nil)},
ec2.IPPerm{
Protocol:"icmp", FromPort:-1, ToPort:-1, SourceIPs:[]string(nil),
SourceGroups:[]ec2.UserSecurityGroup{
ec2.UserSecurityGroup{Id:"sg-ab4857c7", Name:"",
OwnerId:"422746332666"}}},
ec2.IPPerm{
Protocol:"tcp", FromPort:0, ToPort:65535, SourceIPs:[]string(nil),
SourceGroups:[]ec2.UserSecurityGroup{
ec2.UserSecurityGroup{Id:"sg-ab4857c7", Name:"",
OwnerId:"422746332666"}}},
ec2.IPPerm{
Protocol:"udp", FromPort:0, ToPort:65535, SourceIPs:[]string(nil),
SourceGroups:[]ec2.UserSecurityGroup{
ec2.UserSecurityGroup{Id:"sg-ab4857c7", Name:"",
OwnerId:"422746332666"}}}}}}}
Now, when this is passed through
func newPermSet(ps []ec2.IPPerm) permSet {
it is looking to get the Name out of the SourceGroups. As you can see
there is no name specified. There is however a group id.
Now, I'm assuming that the API needs either the id or the name, but here
we discard the id when passing through the perm set, so when we recreate
the array later, we've lost the information.
I'll hack around in here to see if we can keep the group id, and see how
that goes.
Tim
More information about the Juju-dev
mailing list