Add constraint to prohibit balance-tcp from BondInterfaceOvsOptions
authorBrent Eagles <beagles@redhat.com>
Fri, 12 Aug 2016 20:37:24 +0000 (18:07 -0230)
committerBrent Eagles <beagles@redhat.com>
Fri, 26 Aug 2016 00:27:28 +0000 (21:57 -0230)
This patch adds an allowed_pattern contraint that uses a negative
lookahead assertion to only allow options strings that do not contain
the 'balance-tcp' option.

Change-Id: Icf8874e4e585f9a42d38091f8b38c3685f403cf1
Partial-Bug: #1612786

net-config-bond.yaml
network/config/bond-with-vlans/ceph-storage.yaml
network/config/bond-with-vlans/cinder-storage.yaml
network/config/bond-with-vlans/compute.yaml
network/config/bond-with-vlans/controller-no-external.yaml
network/config/bond-with-vlans/controller-v6.yaml
network/config/bond-with-vlans/controller.yaml
network/config/bond-with-vlans/swift-storage.yaml

index 0a162e7..ec881bd 100644 (file)
@@ -1,4 +1,4 @@
-heat_template_version: 2015-04-30
+heat_template_version: 2016-10-14
 
 description: >
   Software Config to drive os-net-config with 2 bonded nics on a bridge.
@@ -6,9 +6,15 @@ description: >
 parameters:
   BondInterfaceOvsOptions:
     default: ''
-    description: The ovs_options string for the bond interface. Set things like
-                 lacp=active and/or bond_mode=balance-slb using this option.
+    description: |
+      The ovs_options string for the bond interface. Set things like
+      lacp=active and/or bond_mode=balance-slb using this option.
     type: string
+    constraints:
+      - allowed_pattern: "^((?!balance.tcp).)*$"
+        description: |
+          The balance-tcp bond mode is known to cause packet loss and
+          should not be used in BondInterfaceOvsOptions.
   ControlPlaneIp:
     default: ''
     description: IP address/subnet on the ctlplane network
index b414747..9f537c0 100644 (file)
@@ -38,6 +38,11 @@ parameters:
     description: The ovs_options string for the bond interface. Set things like
                  lacp=active and/or bond_mode=balance-slb using this option.
     type: string
+    constraints:
+      - allowed_pattern: "^((?!balance.tcp).)*$"
+        description: |
+          The balance-tcp bond mode is known to cause packet loss and
+          should not be used in BondInterfaceOvsOptions.
   ExternalNetworkVlanID:
     default: 10
     description: Vlan ID for the external network traffic.
index 5ee9ff0..b4d71fa 100644 (file)
@@ -38,6 +38,11 @@ parameters:
     description: The ovs_options string for the bond interface. Set things like
                  lacp=active and/or bond_mode=balance-slb using this option.
     type: string
+    constraints:
+      - allowed_pattern: "^((?!balance.tcp).)*$"
+        description: |
+          The balance-tcp bond mode is known to cause packet loss and
+          should not be used in BondInterfaceOvsOptions.
   ExternalNetworkVlanID:
     default: 10
     description: Vlan ID for the external network traffic.
index 19c011e..b2cfb0a 100644 (file)
@@ -38,6 +38,11 @@ parameters:
     description: The ovs_options string for the bond interface. Set things like
                  lacp=active and/or bond_mode=balance-slb using this option.
     type: string
+    constraints:
+      - allowed_pattern: "^((?!balance.tcp).)*$"
+        description: |
+          The balance-tcp bond mode is known to cause packet loss and
+          should not be used in BondInterfaceOvsOptions.
   ExternalNetworkVlanID:
     default: 10
     description: Vlan ID for the external network traffic.
index 6242e2f..4c3e59f 100644 (file)
@@ -38,6 +38,11 @@ parameters:
     description: The ovs_options string for the bond interface. Set things like
                  lacp=active and/or bond_mode=balance-slb using this option.
     type: string
+    constraints:
+      - allowed_pattern: "^((?!balance.tcp).)*$"
+        description: |
+          The balance-tcp bond mode is known to cause packet loss and
+          should not be used in BondInterfaceOvsOptions.
   ExternalNetworkVlanID:
     default: 10
     description: Vlan ID for the external network traffic.
index 71b7e1b..1361d96 100644 (file)
@@ -40,6 +40,11 @@ parameters:
     description: The ovs_options string for the bond interface. Set things like
                  lacp=active and/or bond_mode=balance-slb using this option.
     type: string
+    constraints:
+      - allowed_pattern: "^((?!balance.tcp).)*$"
+        description: |
+          The balance-tcp bond mode is known to cause packet loss and
+          should not be used in BondInterfaceOvsOptions.
   ExternalNetworkVlanID:
     default: 10
     description: Vlan ID for the external network traffic.
index 9917f07..677c90c 100644 (file)
@@ -38,6 +38,11 @@ parameters:
     description: The ovs_options string for the bond interface. Set things like
                  lacp=active and/or bond_mode=balance-slb using this option.
     type: string
+    constraints:
+      - allowed_pattern: "^((?!balance.tcp).)*$"
+        description: |
+          The balance-tcp bond mode is known to cause packet loss and
+          should not be used in BondInterfaceOvsOptions.
   ExternalNetworkVlanID:
     default: 10
     description: Vlan ID for the external network traffic.
index 4dd6628..e16d6b6 100644 (file)
@@ -38,6 +38,11 @@ parameters:
     description: The ovs_options string for the bond interface. Set things like
                  lacp=active and/or bond_mode=balance-slb using this option.
     type: string
+    constraints:
+      - allowed_pattern: "^((?!balance.tcp).)*$"
+        description: |
+          The balance-tcp bond mode is known to cause packet loss and
+          should not be used in BondInterfaceOvsOptions.
   ExternalNetworkVlanID:
     default: 10
     description: Vlan ID for the external network traffic.