About the Replication Factor of YugabyteDB running with Docker Compose

I truly appreciate your continued efforts in providing such convenient and helpful software.

After launching the cluster using the following Docker Compose manifest, I have observed that executing docker compose exec yugabyte1 yugabyted status does not always return consistent results; the reported replication factor is sometimes recognized as 1 and at other times as 3.

services:
  yugabyte1:
    image: software.yugabyte.com/yugabytedb/yugabyte:2.25.2.0-b359
    restart: unless-stopped
    command: bin/yugabyted start --advertise_address=yugabyte1 --base_dir=/root/var/ --background=false --cloud_location=cloud1.red.rack1
    ports:
      - "15433:15433"
      - "5433:5433"
      #- "7003:7000"
      #- "9003:9000"
    healthcheck:
      test: ["CMD", "/home/yugabyte/postgres/bin/pg_isready", "-h", "yugabyte1"]
      interval: 30s
      timeout: 30s
      retries: 5
      start_period: 30s
    volumes:
      - yugabyte1-vol:/root/var/
    networks:
      - yugaplus-network

  yugabyte2:
    image: software.yugabyte.com/yugabytedb/yugabyte:2.25.2.0-b359
    depends_on:
      yugabyte1:
        condition: service_healthy
    restart: unless-stopped
    command: bin/yugabyted start --advertise_address=yugabyte2 --join=yugabyte1 --base_dir=/root/var/ --background=false --cloud_location=cloud1.red.rack2
    ports:
      - "5434:5433"
    volumes:
      - yugabyte2-vol:/root/var/
    networks:
      - yugaplus-network

  yugabyte3:
    image: software.yugabyte.com/yugabytedb/yugabyte:2.25.2.0-b359
    depends_on:
      yugabyte1:
        condition: service_healthy
    restart: unless-stopped
    command: bin/yugabyted start --advertise_address=yugabyte3 --join=yugabyte1 --base_dir=/root/var/ --background=false --cloud_location=cloud1.red.rack3
    ports:
      - "5435:5433"
    volumes:
      - yugabyte3-vol:/root/var/
    networks:
      - yugaplus-network

  yugabyte4:
    image: software.yugabyte.com/yugabytedb/yugabyte:2.25.2.0-b359
    depends_on:
      yugabyte1:
        condition: service_healthy
    restart: unless-stopped
    command: bin/yugabyted start --advertise_address=yugabyte4 --join=yugabyte1 --base_dir=/root/var/ --background=false --cloud_location=cloud1.red.rack4
    ports:
      - "5436:5433"
    volumes:
      - yugabyte4-vol:/root/var/
    networks:
      - yugaplus-network

volumes:
  yugabyte1-vol:
  yugabyte2-vol:
  yugabyte3-vol:
  yugabyte4-vol:

networks:
  yugaplus-network:
    external: true

When I enter the shell and change the replication factor, it is usually updated successfully; however, in rare cases, the process crashes. Is there something I might be overlooking? For your reference, I normally run the system with 8 or 12 containers—this is merely a minimal configuration example.

% docker compose exec yugabyte1 yugabyted configure data_placement --rf 3 --base_dir=/root/var
^CTraceback (most recent call last):
  File "/usr/local/bin/yugabyted", line 11054, in <module>
    ControlScript().run()
  File "/usr/local/bin/yugabyted", line 8784, in run
    args.func()
  File "/usr/local/bin/yugabyted", line 2305, in configure_data_placement
    new_masters = self.get_new_valid_masters(current_masters_without_port_list,
  File "/usr/local/bin/yugabyted", line 4838, in get_new_valid_masters
    for location, master_list in ft_locations_to_masters_map.items():
KeyboardInterrupt

Hi @ytooyama

Looks like it stalls and then you stop it, correct?

What version are you using?

Can you do a yugabyted collect_logs --base_dir=/root/var/ on the yb-master leader?

The following versions are used.
yugabyte:2.25.2.0-b359

And…The log has been uploaded.

cc @nmalladi if you’ve seen this type of setup/issue before

@ytooyama I will go over the logs today and get back to you. Thanks