Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
master
-
None
-
None
-
Operating System: All
Platform: All
-
4550
-
High
Description
When a security rules is created after creating a security group, the security rule list in security group object is not updated in the data store
Steps to reproduce.
1.Create a security group
neutron security-group-create SG1 --description "SG1"
2.Add a rule to the security group
neutron security-group-rule-create --direction ingress --protocol udp --port-range-min 3333 --port-range-max 3333 --remote-ip-prefix 0.0.0.0/24 SG1
If the Data store is checked the newly added rule is missing in the Security Group Model.
Neutron DB
--------------
Security Group Table
-----------------------------------------------------------------------------------------------------------------
| id | name | security_group_rules |
-----------------------------------------------------------------------------------------------------------------
| 44f759e7-79ae-46d6-ad59-a3c1446c82f1 | SG1 | egress, IPv4 |
| egress, IPv6 | ||
| ingress, IPv4, 3333/udp, remote_ip_prefix: 0.0.0.0/24 |
-----------------------------------------------------------------------------------------------------------------
Security Rule Table
----------------------------------------------------------------------------------------------------+
| id | security_group | direction | ethertype | protocol/port | remote |
----------------------------------------------------------------------------------------------------+
| 2bf8a6cc-b40a-48d2-95f4-bd4a0953bb73 | SG1 | egress | IPv6 | any | any |
| b2e168eb-c35a-419e-baf0-40eeb89e6b90 | SG1 | ingress | IPv4 | 3333/udp | 0.0.0.0/24 (CIDR) |
| e491346d-a7dd-4c2a-8938-64163a00029e | SG1 | egress | IPv4 | any | any |
----------------------------------------------------------------------------------------------------+
In Data Store
---------------
Security Group Model
{
"security-groups": {
"security-group": [
]
}
}
Security Rule Model
--------------------
{
"security-rules": {
"security-rule": [
,
,
{ "id": "e491346d-a7dd-4c2a-8938-64163a00029e", "security-group-id": "44f759e7-79ae-46d6-ad59-a3c1446c82f1", "tenant-id": "27da8dfc-d61b-46ac-a5be-4533a4b7782c", "ethertype": "neutron-constants:ethertype-v4", "direction": "neutron-constants:direction-egress" } ]
}
}