Skip to content

Topic's config can no longer be updated after being recreated #656

Open
@Masqueey

Description

@Masqueey

Issue submitter TODO list

  • I've looked up my issue in FAQ
  • I've searched for an already existing issues here
  • I've tried running main-labeled docker image and the issue still persists there
  • I'm running a supported version of the application which is listed here

Describe the bug (actual behavior)

  • After recreating a topic, its configuration settings get frozen. The error that is shown when trying to update the settings is not relevant in this case and other topics with the same config can still be updated.

  • Related FE issue: when settings are not frozen, they are grayed out and not clickable, but work when manually typed. When they can no longer be updated, they are black and clickable.

Expected behavior

  • After recreating a topic, its settings remain as configurable as before recreating it.

  • The FE part should be inverted, gray and not clickable when frozen, black and clickable when configurable.

Your installation details

  1. b4ffd96
  2. Custom company internal chart
  3. Doubt it's relevant but some config:
kafka-ui:
  # kubernetes resources
  image:
    repository: kafbat/kafka-ui
    tag: "b4ffd96b95536ebe5891c5be99b9ce6ba7cab241"

  yamlApplicationConfig:
    rbac:
      roles:
        - name: "admins"
        - name: "readonly"
          permissions:
            - resource: topic
              value: ".*"
              actions: [view, messages_read]
            - resource: consumer
              value: ".*"
              actions: view

  envs:
    config:
      # KAFKA CLUSTER
      KAFKA_CLUSTERS_0_NAME: kafka-cluster
      KAFKA_CLUSTERS_0_PROPERTIES_SECURITY_PROTOCOL: SSL
      KAFKA_CLUSTERS_0_PROPERTIES_SSL_KEYSTORE_LOCATION: /keystore/keystore.jks
      KAFKA_CLUSTERS_0_PROPERTIES_SSL_KEYSTORE_PASSWORD: REPLACE ME!
      KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS:

      # TRUSTSTORE
      KAFKA_CLUSTERS_0_SSL_TRUSTSTORE_LOCATION: /truststore/truststore.jks
      KAFKA_CLUSTERS_0_SSL_TRUSTSTORE_PASSWORD: REPLACE ME!

Steps to reproduce

  1. Create a topic with the following config:
"config": {
    "compression.type": "producer",
    "leader.replication.throttled.replicas": "",
    "remote.storage.enable": "false",
    "message.downconversion.enable": "true",
    "min.insync.replicas": "2",
    "segment.jitter.ms": "0",
    "local.retention.ms": "-2",
    "cleanup.policy": "compact",
    "flush.ms": "9223372036854775807",
    "follower.replication.throttled.replicas": "",
    "segment.bytes": "1073741824",
    "retention.ms": "864000000",
    "flush.messages": "9223372036854775807",
    "remote.log.msk.disable.policy": "None",
    "message.format.version": "3.0-IV1",
    "max.compaction.lag.ms": "9223372036854775807",
    "file.delete.delay.ms": "60000",
    "max.message.bytes": "1048588",
    "min.compaction.lag.ms": "0",
    "message.timestamp.type": "CreateTime",
    "local.retention.bytes": "-2",
    "preallocate": "false",
    "min.cleanable.dirty.ratio": "0.5",
    "index.interval.bytes": "4096",
    "unclean.leader.election.enable": "true",
    "retention.bytes": "300000000000",
    "delete.retention.ms": "86400000",
    "message.timestamp.after.max.ms": "9223372036854775807",
    "message.timestamp.before.max.ms": "9223372036854775807",
    "segment.ms": "86400000",
    "message.timestamp.difference.max.ms": "9223372036854775807",
    "segment.index.bytes": "10485760"
  },
  1. Go to the topic.
  2. (FE issue: go to "edit settings" > "add custom parameter" > delete.retention.ms > Notice it is grayed out and not clickable.)
  3. Three dots in the top right > Recreate Topic > Yes.
  4. Three dots in the top right > "edit settings" > "add custom parameter" > delete.retention.ms > add a '0' to the end.
  5. Update topic
  6. Get the 500 error

Screenshots

No response

Logs

[90091539-322]  500 Server Error for HTTP PATCH "/api/clusters/kafka-cluster/topics/<topic-name>"
│ org.apache.kafka.common.errors.InvalidConfigurationException: Invalid config value for resource ConfigResource(type=TOPIC, name='<topic-name>'): Deletion of configuration: `remote.storage.enable` is not supported for the topic <topic-name>. To disable remote storage, please set the value to `false` along with `remote.log.msk.disable.policy` configuration as `Delete`.` 
│     Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:                                                                                                                                                               │
│ Error has been observed at the following site(s):                                                                                                                                                                                        │
│     *__checkpoint ⇢ Handler io.kafbat.ui.controller.TopicsController#updateTopic(String, String, Mono, ServerWebExchange) [DispatcherHandler]                                                                                            │
│     *__checkpoint ⇢ io.kafbat.ui.config.CorsGlobalConfiguration$$Lambda$1239/0x00007ff8cc71d9e8 [DefaultWebFilterChain]                                                                                                                  │
│     *__checkpoint ⇢ io.kafbat.ui.config.ReadOnlyModeFilter [DefaultWebFilterChain]                                                                                                                                                       │
│     *__checkpoint ⇢ io.kafbat.ui.config.CustomWebFilter [DefaultWebFilterChain]                                                                                                                                                          │
│     *__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]                                                                                                                                                                       │
│     *__checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]                                                                                                                                                                │
│     *__checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]                                                                                                                                                                              │
│     *__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]                                                                                                                                                                  │
│     *__checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]                                                                                                                                                    │
│     *__checkpoint ⇢ LogoutPageGeneratingWebFilter [DefaultWebFilterChain]                                                                                                                                                                │
│     *__checkpoint ⇢ LoginPageGeneratingWebFilter [DefaultWebFilterChain]                                                                                                                                                                 │
│     *__checkpoint ⇢ OAuth2LoginAuthenticationWebFilter [DefaultWebFilterChain]                                                                                                                                                           │
│     *__checkpoint ⇢ OAuth2AuthorizationRequestRedirectWebFilter [DefaultWebFilterChain]                                                                                                                                                  │
│     *__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]                                                                                                                                                                      │
│     *__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]                                                                                                                                                                    │
│     *__checkpoint ⇢ ServerWebExchangeReactorContextWebFilter [DefaultWebFilterChain]                                                                                                                                                     │
│     *__checkpoint ⇢ org.springframework.security.web.server.WebFilterChainProxy [DefaultWebFilterChain]                                                                                                                                  │
│     *__checkpoint ⇢ HTTP PATCH "/api/clusters/kafka-cluster/topics/<topic-name>" [ExceptionHandlingWebHandler]

Additional context

  • Restarting the pod did not fix the issue, neither did retrying from another admin user account.
  • Only deleting and recreating the topic manually (deleting, then creating again) (with the exact same settings) resolved the issue. (As in, we could update the settings again.)
  • Might be relevant: the error says remote.log.msk.disable.policy configuration as Delete whereas the setting on the topic is set to None
    • This is not a blocking setting normally, only when the topic gets recreated (at least, according to the error).

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Active

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions