Template Security Groups do not seem to get applied to instances
I am using single node devstack with heat and quantum enabled. In the template I have created there are three instances, that have two types of security groups applied in the template. The security groups get created, but they do not seem to get applied to the instances, which instead use the default security group. I would like to know if I am doing something wrong in the template.
Template:
{
"AWSTemplateF
"Description" : "AWS CloudFormation template for use with OpenStack. It uses Quantum for networking configuration. It sets up three Ubuntu 12.04 instances, each on its own subnet/network. One instance is set up with bind9 for configuration of DNS server. When stack is created, DNS is not configured, just installed on the instance. The other two instances are used for testing DNS configuration. The three subnets are connected with a router, that is also connected to the external network. Floating IPs are also provided to the spawned instances for external communication.",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "String"
},
"ExtNetUuid" : {
"Description" : "UUID of the external network to be used for external access",
"Type" : "String"
},
"InstanceType" : {
"Description" : "DNSServer EC2 instance type",
"Type" : "String",
"Default" : "m1.micro",
"
"
},
"LinuxDistr
"Default": "U12",
"Description" : "Distribution of choice",
"Type": "String",
"
}
},
"Mappings" : {
"AWSInstanc
"t1.micro" : { "Arch" : "32" },
"m1.small" : { "Arch" : "32" },
"m1.large" : { "Arch" : "64" },
"m1.xlarge" : { "Arch" : "64" },
"m2.xlarge" : { "Arch" : "64" },
"m2.2xlarge" : { "Arch" : "64" },
"m2.4xlarge" : { "Arch" : "64" },
"c1.medium" : { "Arch" : "32" },
"c1.xlarge" : { "Arch" : "64" },
"cc1.4xlarge" : { "Arch" : "64" },
"m1.micro" : { "Arch" : "64" }
},
"DistroArch
"U12" : { "32" : "U12-i386-
"U10" : { "32" : "U10-i386-
}
},
"Resources" : {
"network": {
"Type": "OS::Quantum::Net",
"Properties": {
"name": "local_network"
}
},
"subnet": {
"Type": "OS::Quantum:
"Properties": {
"cidr": "10.0.10.0/24",
}
},
"DNSServerP
"Type": "OS::Quantum:
"Properties": {
}]
}
},
"Client1Port": {
"Type": "OS::Quantum:
"Properties": {
}]
}
},
"Client2Port": {
"Type": "OS::Quantum:
"Properties": {
}]
}
},
"router": {
"Type": "OS::Quantum:
},
"router_
"Type": "OS::Quantum:
"Properties": {
}
},
"router_
"Type": "OS::Quantum:
"Properties": {
}
},
"DNSServerS
"Type" : "AWS::EC2:
"Properties" : {
]
}
},
"MinimalSec
"Type" : "AWS::EC2:
"Properties" : {
]
}
},
"DNSServer": {
"Type": "AWS::EC2:
"Metadata" : {
"config" : {
"apt" : {
}
}
}
}
},
"Properties": {
"ImageId" : { "Fn::FindInMap" : [ "DistroArch2AMI", { "Ref" : "LinuxDistribution" },
"KeyName" : { "Ref" : "KeyName" },
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"echo \"nameserver 8.8.8.8\" >> /etc/resolv.
]]}}
}
},
"Client1": {
"Type": "AWS::EC2:
"Metadata" : {
"config" : {
"apt" : {
}
}
}
}
},
"Properties": {
"ImageId" : { "Fn::FindInMap" : [ "DistroArch2AMI", { "Ref" : "LinuxDistribution" },
"KeyName" : { "Ref" : "KeyName" },
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"echo \"nameserver 8.8.8.8\" >> /etc/resolv.
]]}}
}
},
"Client2": {
"Type": "AWS::EC2:
"Metadata" : {
"config" : {
"apt" : {
}
}
}
}
},
"Properties": {
"ImageId" : { "Fn::FindInMap" : [ "DistroArch2AMI", { "Ref" : "LinuxDistribution" },
"KeyName" : { "Ref" : "KeyName" },
"UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [
"echo \"nameserver 8.8.8.8\" >> /etc/resolv.
]]}}
}
}
},
"Outputs" : {
}
}
Security groups in nova:
saso@devstack-
+------
| Name | Description |
+------
| DNS9.DNSServerS
| DNS9.MinimalSec
| default | default |
+------
saso@devstack-
Security group in quantum:
saso@devstack-
+------
| id | name | description |
+------
| 16e33b54-
| 1edcc064-
| 7c6cb905-
+------
saso@devstack-
Event list for the stack:
saso@devstack-
+------
| logical_resource_id | id | resource_
+------
| network | 843 | state changed | IN_PROGRESS | 2013-05-
| network | 844 | state changed | CREATE_COMPLETE | 2013-05-
| DNSServerPort | 847 | state changed | IN_PROGRESS | 2013-05-
| subnet | 845 | state changed | IN_PROGRESS | 2013-05-
| subnet | 846 | state changed | CREATE_COMPLETE | 2013-05-
| Client2Port | 849 | state changed | IN_PROGRESS | 2013-05-
| DNSServerPort | 848 | state changed | CREATE_COMPLETE | 2013-05-
| Client1Port | 851 | state changed | IN_PROGRESS | 2013-05-
| Client2Port | 850 | state changed | CREATE_COMPLETE | 2013-05-
| Client1Port | 852 | state changed | CREATE_COMPLETE | 2013-05-
| MinimalSecurity
| MinimalSecurity
| Client1 | 855 | state changed | IN_PROGRESS | 2013-05-
| Client1 | 856 | state changed | CREATE_COMPLETE | 2013-05-
| Client2 | 857 | state changed | IN_PROGRESS | 2013-05-
| Client2 | 858 | state changed | CREATE_COMPLETE | 2013-05-
| router | 859 | state changed | IN_PROGRESS | 2013-05-
| router | 860 | state changed | CREATE_COMPLETE | 2013-05-
| router_
| DNSServerSecuri
| router_
| router_
| router_
| DNSServerSecuri
| DNSServer | 867 | state changed | IN_PROGRESS | 2013-05-
| DNSServer | 868 | state changed | CREATE_COMPLETE | 2013-05-
+------
saso@devstack-
DNS server instance data:
saso@devstack-
+------
| Property | Value |
+------
| status | ACTIVE |
| updated | 2013-05-
| OS-EXT-
| key_name | saso-key |
| image | U12-x86_64-cfntools (61099289-
| hostId | 7e91c36a06dfddd
| OS-EXT-STS:vm_state | active |
| flavor | m1.micro (84) |
| id | 9f826369-
| security_groups | [{u'name': u'default'}] |
| user_id | 8711545839b64c4
| name | DNS9.DNSServer |
| created | 2013-05-
| tenant_id | c3bc20838ee4425
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| accessIPv4 | |
| accessIPv6 | |
| local_network network | 10.0.10.30 |
| progress | 0 |
| OS-EXT-
| OS-EXT-
| config_drive | |
+------
Client instance data:
saso@devstack-
+------
| Property | Value |
+------
| status | ACTIVE |
| updated | 2013-05-
| OS-EXT-
| key_name | saso-key |
| image | U12-x86_64-cfntools (61099289-
| hostId | 7e91c36a06dfddd
| OS-EXT-STS:vm_state | active |
| flavor | m1.micro (84) |
| id | 8718c54f-
| security_groups | [{u'name': u'default'}] |
| user_id | 8711545839b64c4
| name | DNS9.Client1 |
| created | 2013-05-
| tenant_id | c3bc20838ee4425
| OS-DCF:diskConfig | MANUAL |
| metadata | {} |
| accessIPv4 | |
| accessIPv6 | |
| local_network network | 10.0.10.31 |
| progress | 0 |
| OS-EXT-
| OS-EXT-
| config_drive | |
+------
saso@devstack-
In the security groups field for both server and client, only default security group is listed, not the ones created in the template.
I would like to know if I am doing something wrong or is that a bug in heat?
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Saso Kavcic for more information if necessary.