Add rabbit.cookie attribute
authorJan Provaznik <jprovazn@redhat.com>
Thu, 30 Jan 2014 22:16:18 +0000 (17:16 -0500)
committerJan Provaznik <jprovazn@redhat.com>
Wed, 26 Feb 2014 08:07:59 +0000 (09:07 +0100)
All nodes in rabbitmq cluster should have same cookie. This patch adds
default random cookie to existing templates.

Change-Id: I6579089bd95b0169db20635479e077f3ecade8e2

notcompute.yaml
overcloud-source.yaml
undercloud-source.yaml

index b097dd0..2d3301f 100644 (file)
@@ -191,6 +191,10 @@ Resources:
             Ref: RabbitUserName
           password:
             Ref: RabbitPassword
+        cookie:
+          Fn::GetAtt:
+          - RabbitCookie
+          - value
       service-password:
         Ref: ServicePassword
     Properties:
index 6d21a4d..fa626aa 100644 (file)
@@ -124,7 +124,17 @@ Parameters:
     Description: The password for RabbitMQ
     Type: String
     NoEcho: true
+  RabbitCookieSalt:
+    Type: String
+    Default: unset
+    Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
 Resources:
+  RabbitCookie:
+    Type: OS::Heat::RandomString
+    Properties:
+      length: 20
+      salt:
+        Ref: RabbitCookieSalt
   AccessPolicy:
     Properties:
       AllowedResources:
@@ -435,6 +445,10 @@ Resources:
           Ref: RabbitUserName
         password:
           Ref: RabbitPassword
+        cookie:
+          Fn::GetAtt:
+          - RabbitCookie
+          - value
       ntp:
         servers:
             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
index efce1e8..97a05ed 100644 (file)
@@ -55,7 +55,17 @@ Parameters:
     Description: The password for RabbitMQ
     Type: String
     NoEcho: true
+  RabbitCookieSalt:
+    Type: String
+    Default: unset
+    Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
 Resources:
+  RabbitCookie:
+    Type: OS::Heat::RandomString
+    Properties:
+      length: 20
+      salt:
+        Ref: RabbitCookieSalt
   AccessPolicy:
     Properties:
       AllowedResources:
@@ -191,6 +201,10 @@ Resources:
           Ref: RabbitUserName
         password:
           Ref: RabbitPassword
+        cookie:
+          Fn::GetAtt:
+          - RabbitCookie
+          - value
   undercloud:
     Type: OS::Nova::Server
     Properties: