Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-3011

Protocol Services and Routes are not removed when broker is scale down

XMLWordPrintable

    • Hide

      Apply the ActiveMQArtemis CRD:

      apiVersion: broker.amq.io/v2alpha1
      kind: ActiveMQArtemis
      metadata:
        name: amqp-broker
        application: amqp-broker-app
        labels:
          ActiveMQArtemis: amqp-broker
          application: amqp-broker-app  
      spec:
        adminUser: admin
        adminPassword: admin
        deploymentPlan:
          size: 1
          image: registry.redhat.io/amq7/amq-broker:7.5
          persistenceEnabled: true
          messageMigration: true
          journalType: aio
          requireLogin: false
        acceptors:
        - name: all
          port: 61616
          protocols: all
          expose: true
        - name: amqp
          port: 5672
          protocols: amqp
          expose: true
        - name: mqtt
          port: 1883
          protocols: mqtt
          expose: true
        console:
          expose: true
      

      Services created:

      $ oc get svc | grep -i amqp
      amqp-broker-all-0-svc      ClusterIP   172.30.5.107     <none>        61616/TCP                    20h
      amqp-broker-amqp-0-svc     ClusterIP   172.30.86.77     <none>        5672/TCP                     20h
      amqp-broker-hdls-svc       ClusterIP   None             <none>        8161/TCP,61616/TCP           1d
      amqp-broker-mqtt-0-svc     ClusterIP   172.30.18.133    <none>        1883/TCP                     20h
      amqp-broker-ping-svc       ClusterIP   None             <none>        8888/TCP                     1d
      amqp-broker-wconsj-0-svc   ClusterIP   172.30.159.117   <none>        8161/TCP                     1d
      

      Apply a change to increase the size to 6. New services are created.
      Apply a change to decrease the size to 1. Services are still created.

      $ oc get svc | grep -i amqp
      amqp-broker-all-0-svc      ClusterIP   172.30.5.107     <none>        61616/TCP                    20h
      amqp-broker-all-1-svc      ClusterIP   172.30.160.139   <none>        61616/TCP                    19h
      amqp-broker-all-2-svc      ClusterIP   172.30.230.0     <none>        61616/TCP                    1h
      amqp-broker-all-3-svc      ClusterIP   172.30.39.23     <none>        61616/TCP                    1h
      amqp-broker-all-4-svc      ClusterIP   172.30.24.206    <none>        61616/TCP                    1h
      amqp-broker-all-5-svc      ClusterIP   172.30.97.217    <none>        61616/TCP                    1h
      amqp-broker-amqp-0-svc     ClusterIP   172.30.86.77     <none>        5672/TCP                     20h
      amqp-broker-amqp-1-svc     ClusterIP   172.30.188.225   <none>        5672/TCP                     19h
      amqp-broker-amqp-2-svc     ClusterIP   172.30.154.103   <none>        5672/TCP                     1h
      amqp-broker-amqp-3-svc     ClusterIP   172.30.49.217    <none>        5672/TCP                     1h
      amqp-broker-amqp-4-svc     ClusterIP   172.30.47.193    <none>        5672/TCP                     1h
      amqp-broker-amqp-5-svc     ClusterIP   172.30.81.164    <none>        5672/TCP                     1h
      amqp-broker-hdls-svc       ClusterIP   None             <none>        8161/TCP,61616/TCP           1d
      amqp-broker-mqtt-0-svc     ClusterIP   172.30.18.133    <none>        1883/TCP                     20h
      amqp-broker-mqtt-1-svc     ClusterIP   172.30.162.7     <none>        1883/TCP                     19h
      amqp-broker-mqtt-2-svc     ClusterIP   172.30.251.41    <none>        1883/TCP                     1h
      amqp-broker-mqtt-3-svc     ClusterIP   172.30.208.63    <none>        1883/TCP                     1h
      amqp-broker-mqtt-4-svc     ClusterIP   172.30.184.8     <none>        1883/TCP                     1h
      amqp-broker-mqtt-5-svc     ClusterIP   172.30.78.182    <none>        1883/TCP                     1h
      amqp-broker-ping-svc       ClusterIP   None             <none>        8888/TCP                     1d
      amqp-broker-wconsj-0-svc   ClusterIP   172.30.159.117   <none>        8161/TCP                     1d
      amqp-broker-wconsj-1-svc   ClusterIP   172.30.70.105    <none>        8161/TCP                     22h
      amqp-broker-wconsj-2-svc   ClusterIP   172.30.114.46    <none>        8161/TCP                     22h
      amqp-broker-wconsj-3-svc   ClusterIP   172.30.11.224    <none>        8161/TCP                     22h
      amqp-broker-wconsj-4-svc   ClusterIP   172.30.105.85    <none>        8161/TCP                     1h
      amqp-broker-wconsj-5-svc   ClusterIP   172.30.27.51     <none>        8161/TCP                     1h
      $ oc get pods | grep -i amqp
      amqp-broker-ss-0                       1/1       Running     0          22h
      
      Show
      Apply the ActiveMQArtemis CRD: apiVersion: broker.amq.io/v2alpha1 kind: ActiveMQArtemis metadata: name: amqp-broker application: amqp-broker-app labels: ActiveMQArtemis: amqp-broker application: amqp-broker-app spec: adminUser: admin adminPassword: admin deploymentPlan: size: 1 image: registry.redhat.io/amq7/amq-broker:7.5 persistenceEnabled: true messageMigration: true journalType: aio requireLogin: false acceptors: - name: all port: 61616 protocols: all expose: true - name: amqp port: 5672 protocols: amqp expose: true - name: mqtt port: 1883 protocols: mqtt expose: true console: expose: true Services created: $ oc get svc | grep -i amqp amqp-broker-all-0-svc ClusterIP 172.30.5.107 <none> 61616/TCP 20h amqp-broker-amqp-0-svc ClusterIP 172.30.86.77 <none> 5672/TCP 20h amqp-broker-hdls-svc ClusterIP None <none> 8161/TCP,61616/TCP 1d amqp-broker-mqtt-0-svc ClusterIP 172.30.18.133 <none> 1883/TCP 20h amqp-broker-ping-svc ClusterIP None <none> 8888/TCP 1d amqp-broker-wconsj-0-svc ClusterIP 172.30.159.117 <none> 8161/TCP 1d Apply a change to increase the size to 6. New services are created. Apply a change to decrease the size to 1. Services are still created. $ oc get svc | grep -i amqp amqp-broker-all-0-svc ClusterIP 172.30.5.107 <none> 61616/TCP 20h amqp-broker-all-1-svc ClusterIP 172.30.160.139 <none> 61616/TCP 19h amqp-broker-all-2-svc ClusterIP 172.30.230.0 <none> 61616/TCP 1h amqp-broker-all-3-svc ClusterIP 172.30.39.23 <none> 61616/TCP 1h amqp-broker-all-4-svc ClusterIP 172.30.24.206 <none> 61616/TCP 1h amqp-broker-all-5-svc ClusterIP 172.30.97.217 <none> 61616/TCP 1h amqp-broker-amqp-0-svc ClusterIP 172.30.86.77 <none> 5672/TCP 20h amqp-broker-amqp-1-svc ClusterIP 172.30.188.225 <none> 5672/TCP 19h amqp-broker-amqp-2-svc ClusterIP 172.30.154.103 <none> 5672/TCP 1h amqp-broker-amqp-3-svc ClusterIP 172.30.49.217 <none> 5672/TCP 1h amqp-broker-amqp-4-svc ClusterIP 172.30.47.193 <none> 5672/TCP 1h amqp-broker-amqp-5-svc ClusterIP 172.30.81.164 <none> 5672/TCP 1h amqp-broker-hdls-svc ClusterIP None <none> 8161/TCP,61616/TCP 1d amqp-broker-mqtt-0-svc ClusterIP 172.30.18.133 <none> 1883/TCP 20h amqp-broker-mqtt-1-svc ClusterIP 172.30.162.7 <none> 1883/TCP 19h amqp-broker-mqtt-2-svc ClusterIP 172.30.251.41 <none> 1883/TCP 1h amqp-broker-mqtt-3-svc ClusterIP 172.30.208.63 <none> 1883/TCP 1h amqp-broker-mqtt-4-svc ClusterIP 172.30.184.8 <none> 1883/TCP 1h amqp-broker-mqtt-5-svc ClusterIP 172.30.78.182 <none> 1883/TCP 1h amqp-broker-ping-svc ClusterIP None <none> 8888/TCP 1d amqp-broker-wconsj-0-svc ClusterIP 172.30.159.117 <none> 8161/TCP 1d amqp-broker-wconsj-1-svc ClusterIP 172.30.70.105 <none> 8161/TCP 22h amqp-broker-wconsj-2-svc ClusterIP 172.30.114.46 <none> 8161/TCP 22h amqp-broker-wconsj-3-svc ClusterIP 172.30.11.224 <none> 8161/TCP 22h amqp-broker-wconsj-4-svc ClusterIP 172.30.105.85 <none> 8161/TCP 1h amqp-broker-wconsj-5-svc ClusterIP 172.30.27.51 <none> 8161/TCP 1h $ oc get pods | grep -i amqp amqp-broker-ss-0 1/1 Running 0 22h

      Operator creates the new services and routes for each pod defined in size attribute, however when you decrease that size then the previous services and routes are not removed from OpenShift namespace.

              gaohoward Howard Gao
              rmarting@redhat.com Roman Martin Gil
              Mikhail Krutov Mikhail Krutov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: