From fc9bd71eb36eb58c5b692cb8f871942cc7e30729 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 6 Apr 2021 13:36:41 -0400 Subject: [PATCH] Makefile: workaround for running dual containers with podman When running the new test-multi-container make rule, I found that podman generated "random" hex based hostnames for the containers. These names work internally and do resolve but I found that putting these in the ceph config files does not work as ceph sees them as addresses, not hostnames, presumably due to the hex. This change simply specifies the hostnames manually on the cli so that both podman and docker should match docker's default behavior. Signed-off-by: John Mulligan --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 36ca090..1d91eb3 100644 --- a/Makefile +++ b/Makefile @@ -51,9 +51,9 @@ test-multi-container: $(BUILDFILE) $(RESULTS_DIR) $(CONTAINER_CMD) kill test_ceph_a test_ceph_b 2>/dev/null || true $(CONTAINER_CMD) volume remove test_ceph_a_data test_ceph_b_data 2>/dev/null || true $(CONTAINER_CMD) network create test_ceph_net 2>/dev/null || true - $(CONTAINER_CMD) run $(CONTAINER_OPTS) --rm -d --name test_ceph_a --net test_ceph_net \ + $(CONTAINER_CMD) run $(CONTAINER_OPTS) --rm -d --name test_ceph_a --hostname test_ceph_a --net test_ceph_net \ -v test_ceph_a_data:/tmp/ceph $(CI_IMAGE_TAG) --test-run=NONE --pause - $(CONTAINER_CMD) run $(CONTAINER_OPTS) --rm -d --name test_ceph_b --net test_ceph_net \ + $(CONTAINER_CMD) run $(CONTAINER_OPTS) --rm -d --name test_ceph_b --hostname test_ceph_b --net test_ceph_net \ -v test_ceph_b_data:/tmp/ceph $(CI_IMAGE_TAG) --test-run=NONE --pause $(CONTAINER_CMD) run --device /dev/fuse --cap-add SYS_ADMIN $(CONTAINER_OPTS) --rm \ --net test_ceph_net -v test_ceph_a_data:/ceph_a -v test_ceph_b_data:/ceph_b \