Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set redpanda.remote.write and redpanda.remote.read together in a single rpk command #4499

Closed
patrickangeles opened this issue Apr 29, 2022 · 4 comments · Fixed by #23545
Assignees
Labels
area/cloud-storage Shadow indexing subsystem kind/bug Something isn't working kind/tech-debt sev/low Bugs which are non-functional paper cuts, e.g. typos, issues in log messages

Comments

@patrickangeles
Copy link

patrickangeles commented Apr 29, 2022

Version & Environment

v21.11.15

For some reason, this command:

rpk topic alter-config thelog -s redpanda.remote.read=true -s redpanda.remote.write=true

only sets remote write to true:

rpk topic describe thelog      
SUMMARY
=======
NAME        thelog
PARTITIONS  1
REPLICAS    1

CONFIGS
=======
KEY                     VALUE                          SOURCE
cleanup.policy          delete                         DYNAMIC_TOPIC_CONFIG
compression.type        producer                       DEFAULT_CONFIG
message.timestamp.type  CreateTime                     DEFAULT_CONFIG
partition_count         1                              DYNAMIC_TOPIC_CONFIG
redpanda.datapolicy     function_name:  script_name:   DEFAULT_CONFIG
redpanda.remote.read    false                          DYNAMIC_TOPIC_CONFIG
redpanda.remote.write   true                           DYNAMIC_TOPIC_CONFIG
replication_factor      1                              DYNAMIC_TOPIC_CONFIG
retention.bytes         100000                         DYNAMIC_TOPIC_CONFIG
retention.ms            604800000                      DEFAULT_CONFIG
segment.bytes           10000                          DYNAMIC_TOPIC_CONFIG

Setting each parameter in separate rpk commands works.
Note this does not happen for other topic configuration parameters. For example the following works as expected.

rpk topic alter-config thelog  -s retention.ms=12345 -s segment.bytes=123

JIRA Link: CORE-899

@patrickangeles patrickangeles added kind/bug Something isn't working area/cloud-storage Shadow indexing subsystem labels Apr 29, 2022
@twmb twmb added area/rpk and removed area/rpk labels May 16, 2022
@twmb
Copy link
Contributor

twmb commented May 16, 2022

This sounds like some config parsing bug within redpanda itself, cc @piyushredpanda

@LenaAn
Copy link
Contributor

LenaAn commented May 17, 2022

Can confirm that it looks like redpanda issue, cause setting via kcl claims the same result

> kcl admin configs alter Lenka --inc --kv set:redpanda.remote.read=true set:redpanda.remote.write=true

> kcl admin configs describe Lenka                                                                      
cleanup.policy          delete                         DEFAULT_CONFIG
compression.type        producer                       DEFAULT_CONFIG
message.timestamp.type  CreateTime                     DEFAULT_CONFIG
partition_count         1                              DYNAMIC_TOPIC_CONFIG
redpanda.datapolicy     function_name:  script_name:   DEFAULT_CONFIG
redpanda.remote.read    true                           DYNAMIC_TOPIC_CONFIG
redpanda.remote.write   false                          DYNAMIC_TOPIC_CONFIG
replication_factor      1                              DYNAMIC_TOPIC_CONFIG
retention.bytes         -1                             DEFAULT_CONFIG
retention.ms            604800000                      DEFAULT_CONFIG
segment.bytes           1073741824                     DEFAULT_CONFIG
[16:28:52] [cost 0.036s] kcl admin configs describe Lenka

Although it doesn't reproduce in alter_config_test.cc

@LenaAn
Copy link
Contributor

LenaAn commented May 17, 2022

Also setting them both to false doesn't work:

[23:48:45] [~/work/lenaan/redpanda] git(dev) 🔥 ❱❱❱ rpk topic describe Lenka          
...
redpanda.remote.read    true                           DYNAMIC_TOPIC_CONFIG
redpanda.remote.write   true                           DYNAMIC_TOPIC_CONFIG
...

[23:48:48] [~/work/lenaan/redpanda] git(dev) 🔥 ❱❱❱ rpk topic alter-config Lenka -s redpanda.remote.read=false  redpanda.remote.write=false
TOPIC                        STATUS
Lenka                        OK
redpanda.remote.write=false  UNKNOWN_TOPIC_OR_PARTITION
[23:48:56] [~/work/lenaan/redpanda] git(dev) 🔥 ❱❱❱ rpk topic describe Lenka                                                               
SUMMARY
=======
NAME        Lenka
PARTITIONS  1
REPLICAS    1

CONFIGS
=======
KEY                     VALUE                          SOURCE
...
redpanda.remote.read    false                          DYNAMIC_TOPIC_CONFIG
redpanda.remote.write   true                           DYNAMIC_TOPIC_CONFIG
...

@LenaAn
Copy link
Contributor

LenaAn commented May 18, 2022

The root cause is that we represent shadow_indexing_mode as one flag in incremental_topic_updates, and we can't represent changes to remote.read and remote.write at the same time. For example, add_shadow_indexing_flag(drop_fetch, archival) = drop_fetch and we loose the information that we should also set archival to true

r-vasquez added a commit to r-vasquez/redpanda that referenced this issue Jun 21, 2023
Redpanda does not handle setting both properties
at the same time (see redpanda-data#4499) so as a temporary
workaround we error here.

Fixes redpanda-data#9191
r-vasquez added a commit to r-vasquez/redpanda that referenced this issue Jun 22, 2023
Redpanda does not handle setting both properties
at the same time (see redpanda-data#4499) so as a temporary
workaround we error here.

Fixes redpanda-data#9191
r-vasquez added a commit to r-vasquez/redpanda that referenced this issue Jun 26, 2023
Redpanda does not handle setting both properties
at the same time (see redpanda-data#4499) so as a temporary
workaround we error here.

Fixes redpanda-data#9191
r-vasquez added a commit to r-vasquez/redpanda that referenced this issue Jun 26, 2023
Redpanda does not handle setting both properties
at the same time (see redpanda-data#4499) so as a temporary
workaround we error here.

Fixes redpanda-data#9191
@dotnwat dotnwat added the sev/low Bugs which are non-functional paper cuts, e.g. typos, issues in log messages label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cloud-storage Shadow indexing subsystem kind/bug Something isn't working kind/tech-debt sev/low Bugs which are non-functional paper cuts, e.g. typos, issues in log messages
Projects
None yet
5 participants