alpinelinux / docker-alpine

Official Alpine Linux Docker image. Win at minimalism!
MIT License
1.04k stars 261 forks source link

podman-compose - config and autostarter container error #320

Closed coredump17 closed 1 year ago

coredump17 commented 1 year ago

Podman 4 has DNS and 'should' be compatible withh docker. podman-compose up -d shows below error for containers configuration and autostarter.

File "core/autostarter.py", line 269, in core.autostarter.AutostarterWorker.check_and_control_services File "/usr/local/lib/pyenv/versions/3.6.8/lib/python3.6/site-packages/artemis_utils/service.py", line 37, in service_to_ips_and_replicas_in_compose replica_name = "{}-{}".format(base_service_name, replica_name_match.group(1)) AttributeError: 'NoneType' object has no attribute 'group'

upon investigation it would appear that this issue is caused by podman having multiple PTR records for an IP- container id, container name. alpine, whic uses musl only returns one host or IP per call which is unexpected as you would not find any replica, and the PTR lookup would never match the container ID.

bash-4.4# dig +short configuration 10.89.0.97

bash-4.4# dig +short -x 10.89.0.97 artemis_configuration_1. configuration. 5cf0e12b159a. <---- this will always be returned

The above PTR lookup will not match the below regex in 'service_to_ips_and_replicas_in_compose' call.

        r"^"
        + re.escape(COMPOSE_PROJECT_NAME)
        + r"[_|-]"
        + re.escape(base_service_name)
        + r"[_|-](\d+)",
        replica_host_by_addr,
      )

If dns calls using the socket module only return one value every time, i believe this would limit the platform to one replica.

coredump17 commented 1 year ago

this is not an alpine issue