-
-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Describe the bug
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, which uses musl, only returns one host or IP per call which is unexpected, as you would only find one replica. PTR lookups would never match the container ID in podmans case as it has multiple entries - see below:
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.
Affected Component(s)
- Back-End (configuration, autostarter)
To Reproduce
Steps to reproduce the behavior:
- centos/rocky/redhat/alma OS 8+
- yum install podman
- enable epel repo
- yum install podman compose
- ** pull repo, cd artimis ; podman-compose up -d
- ui starts but admin/system page errors
- podman logs configuration or podman logs autostarter show error
Expected behavior
i would expect a DNS lookup to respond with all entries not just the last one. i believe this would impact the replica set if wishh to run > 1 container of the same kind. It also caused the solution to be incompatible with podman.
Screenshots
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'
System (please complete the following information):
- OS: rocky 9
- Browser chrome/ edge
Additional context
alpine uses musl which acts differently to glibc and appears to only return one dns entry per lookup.