Skip to content

Reconcile Error after change the Config Map #304

@Gsantomaggio

Description

@Gsantomaggio

Describe the bug

When the definition-rabbitmq-server-conf config map is changed the Operator raises an exception:

2020-09-01T21:32:07.332+0200    ERROR   rabbitmqcluster-controller      Failed to enable plugins on pod definition-rabbitmq-server-0 in namespace default, running command rabbitmq-plugins set rabbitmq_peer_discovery_k8s rabbitmq_prometheus rabbitmq_management with output:   {"error": "unable to upgrade connection: container not found (\"rabbitmq\")"}
github.com/go-logr/zapr.(*zapLogger).Error
        /home/gas/go/pkg/mod/github.com/go-logr/zapr@v0.1.1/zapr.go:128
github.com/rabbitmq/cluster-operator/controllers.(*RabbitmqClusterReconciler).enablePlugins
        /home/gas/go/src/github.com/rabbitmq/cluster-operator/controllers/rabbitmqcluster_controller.go:367
github.com/rabbitmq/cluster-operator/controllers.(*RabbitmqClusterReconciler).Reconcile

And the config map won't be changed.

To Reproduce

Steps to reproduce the behavior:

  1. Install the operator
  2. Deploy the definition:
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: definition
spec:
  replicas: 3
  1. Try to change the config map:

Screenshot from 2020-09-01 21-22-58

I was trying to change the log.file.level = debug
4. See error:

2020-09-01T21:32:07.332+0200    ERROR   rabbitmqcluster-controller      Failed to enable plugins on pod definition-rabbitmq-server-0 in namespace default, running command rabbitmq-plugins set rabbitmq_peer_discovery_k8s rabbitmq_prometheus 

Expected behavior
Change the config map without errors.

Version information

  • RabbitMQ: 3.8.5
  • RabbitMQ Cluster Operator: building from source 3e52b74
  • Kubernetes: Kind 1.17.5

Additional context

When the config map is changed, the reconcile restarts the pod, and when it tries to enable the plugins gets the error since the POD isn't ready yet.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions