Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-26770

RabbitMq default user out of sync after cluster deleted and recreated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • rhos-18.0.18
    • rhos-18.0.17 FR 5
    • infra-operator
    • None
    • Critical

      To Reproduce Steps to reproduce the behavior:

      1. deploy controlplane
      2. delete rabbitmqcluster (not rabbitmq)
      3. verify that "oc get secret rabbitmq-default-user -n openstack -o jsonpath='{.data.default_user\.conf}' |     base64 -d " output is different from "rabbitmqctl list_users"
      [zuul@localhost ~]$ oc delete rabbitmqcluster.rabbitmq.com/rabbitmq
      rabbitmqcluster.rabbitmq.com "rabbitmq" deleted
      [zuul@localhost ~]$  oc get secret rabbitmq-default-user -n openstack -o jsonpath='{.data.default_user\.conf}' |     base64 -d
      default_user = default_user_1pXRuVQQEEcDnCUXW1j
      default_pass = Kq3bwP01lbXFpZNFyhqO2QyfPdzyjRCN
      
      
      [zuul@localhost ~]$ oc rsh rabbitmq-server-0 rabbitmqctl list_users
      Defaulted container "rabbitmq" out of: rabbitmq, setup-container (init)
      Listing users ...
      user    tags
      default_user__bf82SFFfuJw1bqPSKO        [administrator]

       

      Expected behavior

      • default user should be in sync

       

      There are a number of issues:

      1. we don't block the deletion of rabbitmqcluster (rabbitmq cr should set a finalizer on the rabbitmqcluster cr)

      2. mnesia storage is not wiped automatically when cluster is recreated, so potentially can have stale data

      3. deleting rabbitmqcluster directly triggers creation of a new user ignoring the existing rabbitmq-default-user secret that was created by infra-operator when rabbitmq cr is created.

      4. one more issue is that this breaks the rabbitmquser and vhosts, as they access to the rabbitmq management api will be broken b/c of the wrong user/pwd.

              rhn-support-lmiccini Luca Miccini
              rhn-support-lmiccini Luca Miccini
              rhos-dfg-pidone
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: