podman

87 views
Skip to first unread message

t.c....@gmail.com

unread,
Apr 1, 2022, 6:35:31 AM4/1/22
to OpenREM
Many hospitals prefer or only allow Red Hat Enterprise (RHEL). Ever since RHEL v8 docker is not supported anymore. Instead they offer podman, which was forked from the docker project. Podman has some advantages (e.g. it allows running systemd in unprivileged containers) and seems to gain in popularity, also in the non-Redhat community.
Our hospital is one of those that only offer RHEL8 virtual machines and as such I recently tried running openrem inside podman. For 99% of the commands it's as simple as replacing "docker" with "podman". Therfore, it didn't take much effort to get it running with podman, well.... almost running. Everything seems to work but I'm having issues with the communication between celery and rabbitmq (see dumps below). Any ideas anyone?

regards, Tim

Celery logfile:
[2022-04-01 12:26:12,572: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@broker:5672/
/: [Errno 111] Connection refused.
Trying again in 14.00 seconds... (7/100)

[2022-04-01 12:26:30,610: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@broker:5672/
/: timed out.
Trying again in 16.00 seconds... (8/100)

[2022-04-01 12:26:52,310: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@broker:5672/
/: timed out.
Trying again in 2.00 seconds... (1/100)



Rabbitmq container:
2022-04-01 10:19:36.381278+00:00 [info] <0.886.0> accepting AMQP connection <0.886.0> (127.0.0.1:52808 -> 127.0.0.1:5672)
2022-04-01 10:19:36.636151+00:00 [info] <0.889.0> accepting AMQP connection <0.889.0> (127.0.0.1:52810 -> 127.0.0.1:5672)
2022-04-01 10:19:36.658821+00:00 [info] <0.892.0> accepting AMQP connection <0.892.0> (127.0.0.1:52812 -> 127.0.0.1:5672)
2022-04-01 10:19:36.659647+00:00 [info] <0.895.0> accepting AMQP connection <0.895.0> (127.0.0.1:52814 -> 127.0.0.1:5672)
2022-04-01 10:19:36.660175+00:00 [info] <0.898.0> accepting AMQP connection <0.898.0> (127.0.0.1:52816 -> 127.0.0.1:5672)
2022-04-01 10:19:36.660624+00:00 [info] <0.901.0> accepting AMQP connection <0.901.0> (127.0.0.1:52818 -> 127.0.0.1:5672)
2022-04-01 10:19:41.388907+00:00 [warning] <0.895.0> closing AMQP connection <0.895.0> (127.0.0.1:52814 -> 127.0.0.1:5672):
2022-04-01 10:19:41.388907+00:00 [warning] <0.895.0> client unexpectedly closed TCP connection
2022-04-01 10:19:41.388907+00:00 [warning] <0.901.0> closing AMQP connection <0.901.0> (127.0.0.1:52818 -> 127.0.0.1:5672):
2022-04-01 10:19:41.388907+00:00 [warning] <0.901.0> client unexpectedly closed TCP connection
2022-04-01 10:19:41.389143+00:00 [warning] <0.898.0> closing AMQP connection <0.898.0> (127.0.0.1:52816 -> 127.0.0.1:5672):
2022-04-01 10:19:41.389143+00:00 [warning] <0.898.0> client unexpectedly closed TCP connection
2022-04-01 10:19:41.389313+00:00 [warning] <0.892.0> closing AMQP connection <0.892.0> (127.0.0.1:52812 -> 127.0.0.1:5672):
2022-04-01 10:19:41.389313+00:00 [warning] <0.892.0> client unexpectedly closed TCP connection
2022-04-01 10:19:41.389412+00:00 [warning] <0.889.0> closing AMQP connection <0.889.0> (127.0.0.1:52810 -> 127.0.0.1:5672):
2022-04-01 10:19:41.389412+00:00 [warning] <0.889.0> client unexpectedly closed TCP connection
2022-04-01 10:19:41.389481+00:00 [warning] <0.886.0> closing AMQP connection <0.886.0> (127.0.0.1:52808 -> 127.0.0.1:5672):
2022-04-01 10:19:41.389481+00:00 [warning] <0.886.0> client unexpectedly closed TCP connection

t.c....@gmail.com

unread,
Apr 1, 2022, 7:21:44 AM4/1/22
to OpenREM
I seem to have found the solution... replaced rabbitmq:3-management-alpine with rabbitmq:3-management in docker-compose.yml and now it works!
In case anyone wants to give podman a go, just follow the documentation (https://docs.openrem.org/en/latest/installation.html#windows-or-linux-docker-install) with a few minor adjustments:
podman-compose up -d
podman-compose exec openrem python manage.py makemigrations remapp --noinput
podman-compose exec openrem python manage.py migrate --noinput
podman-compose exec openrem python manage.py loaddata openskin_safelist.json
podman-compose exec openrem python manage.py collectstatic --noinput --clear
podman-compose exec openrem python manage.py compilemessages

The last command requires an interactive TTY, so just add an additional "-it":
podman-compose exec -it openrem python manage.py createsuperuser

Op vrijdag 1 april 2022 om 12:35:31 UTC+2 schreef t.c....@gmail.com:

Ed McDonagh

unread,
Apr 1, 2022, 5:24:38 PM4/1/22
to t.c....@gmail.com, OpenREM
That's really helpful Tim - thank you. I wasn't aware of podman or the RHEL situation - hopefully we can have it running for both equally well.

I wonder what was required in the rabbitmq container that wasn't in the alpine version?

--
You received this message because you are subscribed to the Google Groups "OpenREM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrem+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openrem/41489d20-366b-4665-9677-aa89c3a3657an%40googlegroups.com.

Tim de Wit

unread,
Apr 2, 2022, 1:42:23 AM4/2/22
to Ed McDonagh, OpenREM
So far it does :)
Makes me wonder too.. Perhaps we could contact the rabbitmq-docker maintainers? If I’m not mistaken I did see a few of the many connections succeed, so it might be a performance issue (too many simultaneous connections or rate-limiting in the “light” container).

On 1 Apr 2022, at 23:24, Ed McDonagh <e...@openrem.org> wrote:



t.c....@gmail.com

unread,
Apr 2, 2022, 3:26:19 PM4/2/22
to OpenREM
Been reading about differences between "normal" and alpine based docker images. The reduced footprint comes with a cost.. they seem to perform worse on average. Reasons vary but it might be related to a different implementation of libc.
I performed a comparison myself, by running send.py (from https://www.rabbitmq.com/tutorials/tutorial-one-python.html, slightly modified to support authentication) in a loop from inside the openrem container. Results:

time for run in {1..10}; do python send.py; done

rabbitmq:3-management-alpine:
real    0m51.227s
user    0m1.359s
sys     0m0.195s

rabbitmq:3-management:
real    0m1.598s
user    0m1.329s
sys     0m0.200s

More than a factor 30 faster!

I'm not in the opportunity right now to test with docker right now but considering that these issues don't happen with docker, the difference is probably a lot smaller.

Op zaterdag 2 april 2022 om 07:42:23 UTC+2 schreef t.c....@gmail.com:

t.c....@gmail.com

unread,
Apr 4, 2022, 7:27:14 AM4/4/22
to OpenREM
Just tested with docker and there's no noticeable difference between the alpine and non-alpine version.
Regarding the podman tests: both tests were performed with the flower and celery containers turned off (although that did not seem to make any difference).

Op zaterdag 2 april 2022 om 21:26:19 UTC+2 schreef t.c....@gmail.com:

Ed McDonagh

unread,
Apr 5, 2022, 2:46:24 AM4/5/22
to OpenREM
I wonder if it would be better just to ditch the alpine versions - we already have fairly large images to download so would it make any difference to anyone?

Reply all
Reply to author
Forward
0 new messages