Browse Source

Remove RabbitMQ support from Bifrost

During the Train cycle, Bifrost switched to using JSON-RPC by default
for Ironic's internal communication [1], avoiding the need to install
RabbitMQ. This simplifies things, so we may as well remove our custom
configuration of RabbitMQ.

[1] https://review.openstack.org/645093

Change-Id: I3107349530aa753d68fd59baaf13eb7dd5485ae6
master
Mark Goddard 1 month ago
parent
commit
33564a0097

+ 1
- 3
ansible/roles/bifrost/tasks/bootstrap.yml View File

@@ -15,9 +15,7 @@
15 15
 - name: Bootstrap bifrost (this may take several minutes)
16 16
   command: >
17 17
      docker exec bifrost_deploy
18
-     bash -c 'source /bifrost/env-vars
19
-     && cp /etc/bifrost/rabbitmq-env.conf /etc/rabbitmq/rabbitmq-env.conf &&
20
-     chown rabbitmq:rabbitmq /etc/rabbitmq/rabbitmq-env.conf &&
18
+     bash -c 'source /bifrost/env-vars &&
21 19
      ansible-playbook -vvvv -i /bifrost/playbooks/inventory/target
22 20
      /bifrost/playbooks/install.yaml -e @/etc/bifrost/bifrost.yml
23 21
      -e @/etc/bifrost/dib.yml -e  skip_package_install=true'

+ 0
- 23
ansible/roles/bifrost/tasks/config.yml View File

@@ -24,15 +24,6 @@
24 24
     - "dib"
25 25
     - "servers"
26 26
 
27
-- name: Copying over rabbitmq config
28
-  template:
29
-    src: "{{ item }}"
30
-    dest: "{{ node_config_directory }}/bifrost/{{ item }}"
31
-    mode: "0660"
32
-  become: true
33
-  with_items:
34
-    - "rabbitmq-env.conf"
35
-
36 27
 - name: Template ssh keys
37 28
   template:
38 29
     src: "{{ item.src }}"
@@ -43,17 +34,3 @@
43 34
     - { src: "id_rsa", dest: "id_rsa" }
44 35
     - { src: "id_rsa.pub", dest: "id_rsa.pub" }
45 36
     - { src: "ssh_config", dest: "ssh_config" }
46
-
47
-# NOTE(mgoddard): The following task was lifted from a Bifrost play
48
-# (playbooks/roles/bifrost-ironic-install/tasks/bootstrap.yml).  Because
49
-# Bifrost cannot modify /etc/hosts from within the container we must do it
50
-# here.
51
-- name: "Ensure /etc/hosts has good defaults"
52
-  lineinfile:
53
-    dest: "/etc/hosts"
54
-    regexp: "{{ item.regexp }}.*({{ ansible_hostname }}|localhost).*"
55
-    line: "{{ item.contents }}"
56
-  with_items:
57
-    - { regexp: '^127\.0\.0\.1', contents: '127.0.0.1 {{ ansible_hostname }} {{ ansible_fqdn }} localhost' }
58
-    - { regexp: '^::1', contents: '::1 {{ ansible_hostname }} {{ ansible_fqdn }} localhost ipv6-localhost ipv6-loopback' }
59
-  become: true

+ 0
- 1
ansible/roles/bifrost/tasks/start.yml View File

@@ -15,5 +15,4 @@
15 15
       - "bifrost_httpboot:/httpboot/"
16 16
       - "bifrost_ironic:/var/lib/ironic/"
17 17
       - "bifrost_mariadb:/var/lib/mysql/"
18
-      - "bifrost_rabbitmq:/var/lib/rabbitmq/"
19 18
       - "bifrost_tftpboot:/tftpboot/"

+ 0
- 15
ansible/roles/bifrost/templates/rabbitmq-env.conf View File

@@ -1,15 +0,0 @@
1
-# Defaults to rabbit. This can be useful if you want to run more than one node
2
-# per machine - RABBITMQ_NODENAME should be unique per erlang-node-and-machine
3
-# combination. See the clustering on a single machine guide for details:
4
-# http://www.rabbitmq.com/clustering.html#single-machine
5
-#NODENAME=rabbit
6
-
7
-# By default RabbitMQ will bind to all interfaces, on IPv4 and IPv6 if
8
-# available. Set this if you only want to bind to one network interface or#
9
-# address family.
10
-#NODE_IP_ADDRESS=127.0.0.1
11
-
12
-HOME=/var/lib/rabbitmq
13
-
14
-# Defaults to 5672.
15
-#NODE_PORT=5672

+ 7
- 0
releasenotes/notes/bifrost-no-rabbit-cea7af663f4b814f.yaml View File

@@ -0,0 +1,7 @@
1
+---
2
+upgrade:
3
+  - |
4
+    Removes support for RabbitMQ from the Bifrost container. During the Train
5
+    cycle, Bifrost switched its default to use JSON-RPC rather than RabbitMQ
6
+    for internal Ironic communication. This simplifies the deployment and
7
+    should improve reliability.

+ 4
- 4
tests/test-bifrost.sh View File

@@ -12,7 +12,7 @@ function test_bifrost {
12 12
     # TODO(mgoddard): Use openstackclient when clouds.yaml works. See
13 13
     # https://bugs.launchpad.net/bifrost/+bug/1754070.
14 14
     attempts=0
15
-    while [[ $(sudo docker exec bifrost_deploy bash -c "source env-vars && ironic driver-list" | wc -l) -le 4 ]]; do
15
+    while [[ $(sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal driver list -f value" | wc -l) -eq 0 ]]; do
16 16
         attempts=$((attempts + 1))
17 17
         if [[ $attempts -gt 6 ]]; then
18 18
             echo "Timed out waiting for ironic conductor to become active"
@@ -20,9 +20,9 @@ function test_bifrost {
20 20
         fi
21 21
         sleep 10
22 22
     done
23
-    sudo docker exec bifrost_deploy bash -c "source env-vars && ironic node-list"
24
-    sudo docker exec bifrost_deploy bash -c "source env-vars && ironic node-create --driver ipmi --name test-node"
25
-    sudo docker exec bifrost_deploy bash -c "source env-vars && ironic node-delete test-node"
23
+    sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal node list"
24
+    sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal node create --driver ipmi --name test-node"
25
+    sudo docker exec bifrost_deploy bash -c "OS_CLOUD=bifrost openstack baremetal node delete test-node"
26 26
 }
27 27
 
28 28
 

Loading…
Cancel
Save