artemiscloud / activemq-artemis-operator

Apache License 2.0
66 stars 62 forks source link

Can't update existing addresses (changing routingType) #936

Closed AlexW00 closed 4 months ago

AlexW00 commented 4 months ago

Describe the bug

When updating the routingType of an address and applying the changes using kubectl, the operator doesn't update the broker and instead logs errors, stating that the new type is not allowed.

Updating addresses using kubectl apply should be supported as of #20?

for example, when updating my address from

apiVersion: broker.amq.io/v1beta1
kind: ActiveMQArtemisAddress
metadata:
  name: xxxx
spec:
  addressName: xxxx
  queueName: xxxx
  routingType: multicast
  queueConfiguration:
    durable: true

to

apiVersion: broker.amq.io/v1beta1
kind: ActiveMQArtemisAddress
metadata:
  name: xxxx
spec:
  addressName: xxxx
  queueName: xxxx
  routingType: anycast
  queueConfiguration:
    durable: true

the operator doesn't update the broker and instead logs errors:

{"level":"error","ts":"2024-05-29T11:36:28.597Z","logger":"setup","msg":"Reconciler error","controller":"activemqartemisaddress","controllerGroup":"broker.amq.io","controllerKind":"ActiveMQArtemisAddress","ActiveMQArtemisAddress":{"name":"xxxx","namespace":"xxx"},"namespace":"xxxx","name":"xxxx","reconcileID":"3b5ebd3e-b972-4cdf-b1e0-43200d86d380","error":"Error response code 500, type java.lang.IllegalStateException, message java.lang.IllegalStateException : AMQ229211: Can't update queue xxxx with routing type: ANYCAST, Supported routing types for address: xxxx are [MULTICAST] and data ","stacktrace":"github.com/go-logr/logr.Logger.Error\n\t/opt/app-root/src/go/pkg/mod/github.com/go-logr/logr@v1.2.4/logr.go:299\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:329\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:266\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.16.3/pkg/internal/controller/controller.go:227"}

If this is indeed intended behaviour, how would you go about updating an address type?

[!TIP] Vote this issue reacting with :+1: or :-1:

brusdev commented 4 months ago

@AlexW00 that behaviour is intended, you can send an email to users@activemq.apache.org for further details.

jbertram commented 4 months ago

@AlexW00, to be clear, you should subscribe to the mailing list in order to send messages to the list without moderation and to receive replies from the list. See the Apache ActiveMQ website for details on how to subscribe. Thanks!

brusdev commented 3 months ago

For further details see the thread at https://lists.apache.org/thread/xyf5rx7yg6bfp5tk0ql13mqj97p7o540