Skip to content

Lack of idempotency, every time an interruption occurs, it needs to start over. #151

@Shackbear

Description

@Shackbear

Lack of idempotency, every time an interruption occurs, it needs to start over.
After manually executing the failed steps, it can pass. However, due to the lack of idempotency, redeployment is still required.
For example:

INFO[0027] Upload meta_main main config NODE=node1 TASK=CreateMetaServiceTask
2025/08/05 15:54:48 create cluster: run task CreateMetaServiceTask: sudo run cmd [cmd: docker run --name 3fs-meta-cfg-55db2W --network host --entrypoint '' --rm --privileged --ulimit nofile=1048576:1048576 --volume /root/m3fs/meta/config.d:/opt/3fs/etc/ --volume /dev:/dev --volume /root/m3fs/bin/ibdev2netdev:/usr/sbin/ibdev2netdev open3fs/3fs:20250410-avx2 /opt/3fs/bin/admin_cli -cfg /opt/3fs/etc/admin_cli.toml --config.mgmtd_client.mgmtd_server_addresses '["RDMA://192.168.32.135:8000"]' 'set-config --type META --file /opt/3fs/etc/meta_main.toml']: exit status 1
root@ubuntu22:/m3fs# netstat -nlutp |grep 8000
tcp 0 0 10.91.214.145:8000 0.0.0.0:* LISTEN 15012/mgmtd_main
tcp 0 0 192.168.32.135:8000 0.0.0.0:* LISTEN 15012/mgmtd_main
root@ubuntu22:
/m3fs# docker run --name 3fs-meta-cfg-55db2W --network host --entrypoint '' --rm --privileged --ulimit nofile=1048576:1048576 --volume /root/m3fs/meta/config.d:/opt/3fs/etc/ --volume /dev:/dev --volume /root/m3fs/bin/ibdev2netdev:/usr/sbin/ibdev2netdev open3fs/3fs:20250410-avx2 /opt/3fs/bin/admin_cli -cfg /opt/3fs/etc/admin_cli.toml --config.mgmtd_client.mgmtd_server_addresses '["RDMA://192.168.32.135:8000"]' 'set-config --type META --file /opt/3fs/etc/meta_main.toml'

Succeed
ConfigVersion 1

===============
root@ubuntu22:~/m3fs# ./m3fs cluster create -c ./cluster.yml
INFO[0000] Running task CreatePgClusterTask
INFO[0000] Generated init_db script /root/m3fs/postgresql/scripts/init_db.sql NODE=node1 TASK=CreatePgClusterTask
2025/08/05 16:09:42 create cluster: run task CreatePgClusterTask: sudo run cmd [cmd: docker run --name 3fs-postgres --detach --network host -e POSTGRESQL_USERNAME=postgres -e POSTGRESQL_PASSWORD=pgpassword -e POSTGRESQL_REPLICATION_USER=open3fs-replica-QedB -e POSTGRESQL_REPLICATION_PASSWORD=fRyEVdrg7dpesZvP -e POSTGRESQL_PORT_NUMBER=5432 --volume /root/m3fs/postgresql/data:/bitnami/postgresql --volume /root/m3fs/postgresql/scripts:/docker-entrypoint-initdb.d --restart unless-stopped open3fs/postgresql:17.5.0]: exit status 125
docker: Error response from daemon: Conflict. The container name "/3fs-postgres" is already in use by container "151a8c95bf295ba4fad38115d82d12bc06be2beeff5f7b1ce6fc8887b16722a3". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions