Bug 32897 - docker-compose incompatible with docker 24.x
Summary: docker-compose incompatible with docker 24.x
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal critical
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2024-02-26 11:35 CET by Bruno Cornec
Modified: 2024-02-28 06:49 CET (History)
3 users (show)

See Also:
Source RPM: docker-compose-1.29.2-4.mga9.src.rpm
CVE:
Status comment:


Attachments
Terminal output for docker-compose test (redis not started) (5.71 KB, text/plain)
2024-02-27 12:07 CET, Len Lawrence
Details
Second attempt at the compose test (3.46 KB, application/x-troff-man)
2024-02-27 12:31 CET, Len Lawrence
Details
Test file for docker compose command (214 bytes, application/x-yaml)
2024-02-27 15:03 CET, Bruno Cornec
Details

Description Bruno Cornec 2024-02-26 11:35:55 CET
Description of problem:

That version of docker-compose should be updated to support docker 24.x as provided with mga9. Compatible version are 2.x
Comment 1 Bruno Cornec 2024-02-26 12:26:29 CET
Could someone test the package in updates_testing (docker-compose-2.20.3-1.mga9.x86_64.rpm) please so it's pushed to updates.

Assignee: bugsquad => qa-bugs
Status: NEW => ASSIGNED

Comment 2 katnatek 2024-02-27 01:51:57 CET
Bruno Perhaps you could provide a test case for the docker packages ?
katnatek 2024-02-27 01:57:45 CET

Keywords: (none) => advisory

Comment 3 Len Lawrence 2024-02-27 12:07:32 CET
Created attachment 14427 [details]
Terminal output for docker-compose test (redis not started)

docker-compose, redis and python-flask were all installed.

CC: (none) => tarazed25

Comment 4 Len Lawrence 2024-02-27 12:25:12 CET
mga9, x64

Installed docker-compose, redis and python-flask before the update, the latter two for the test.
Attempting to use docker-compose came back with "compose is not a docker command".

Updated the package then built the test application described in the tutorial at 
https://docs.docker.com/compose/gettingstarted/

Started docker and redis services then
$ docker compose up
That seemed to work although there was a dire warning at the end, but there was nothing going on at http://localhost:8000/.

The fact that the test does not run as expected probably does not matter because the compose command does work AFAICS.  RAM is not a problem on this machine (the test requires a spare 10GB).
Comment 5 Len Lawrence 2024-02-27 12:31:09 CET
Created attachment 14428 [details]
Second attempt at the compose test

The first test was a false start because redis service was not running.
Comment 6 Len Lawrence 2024-02-27 12:57:47 CET
(In reply to comment #4)
The sequence became a bit garbled there.  The test application was built before the update.  I lost my original text when posting the attachment.
Comment 7 Bruno Cornec 2024-02-27 15:02:43 CET
(In reply to katnatek from comment #2)
> Bruno Perhaps you could provide a test case for the docker packages ?

Yes sorry. I'm attaching an example docker-compose.yml file for the test.

Please in the directory in which you download it issue:

systemctl (re)start docker (so the docker daemon runs)
docker compose pull (should get the images)
docker compose up -d
docker ps should give:
CONTAINER ID   IMAGE     COMMAND                  CREATED         STATUS         PORTS                                       NAMES
896b4a4e402d   mariadb   "docker-entrypoint.s…"   2 minutes ago   Up 2 minutes   0.0.0.0:33060->3306/tcp, :::3306->3306/tcp   docker-compose-db-1


If you want you can try to connect to the MariaDB DB using the creds in the docker-compose.yml file, that should work. Use port 33060 to connect to the DB.

Hope this helps.
Comment 8 Bruno Cornec 2024-02-27 15:03:25 CET
Created attachment 14429 [details]
Test file for docker compose command
Comment 9 Bruno Cornec 2024-02-27 15:04:51 CET
(In reply to Len Lawrence from comment #4)
> mga9, x64
> 
> Installed docker-compose, redis and python-flask before the update, the
> latter two for the test.
> Attempting to use docker-compose came back with "compose is not a docker
> command".
> 
> Updated the package then built the test application described in the
> tutorial at 
> https://docs.docker.com/compose/gettingstarted/
> 
> Started docker and redis services then
> $ docker compose up
> That seemed to work although there was a dire warning at the end, but there
> was nothing going on at http://localhost:8000/.
> 
> The fact that the test does not run as expected probably does not matter
> because the compose command does work AFAICS.  RAM is not a problem on this
> machine (the test requires a spare 10GB).

From your output, youshould have someting on port 5000.
Comment 10 Len Lawrence 2024-02-27 22:16:04 CET
Ran the `docker ps` command - forgot that earlier.
$ docker ps
CONTAINER ID   IMAGE             COMMAND                  CREATED        STATUS          PORTS                                       NAMES
d3ea5830d917   composetest-web   "flask run"              10 hours ago   Up 16 seconds   0.0.0.0:8000->5000/tcp, :::8000->5000/tcp   composetest-web-1
ddd0be9ff060   redis:alpine      "docker-entrypoint.s…"   10 hours ago   Up 16 seconds   6379/tcp                                    composetest-redis-1

Checked the firewall as well - removed protection from a lot of veth... interfaces.  That was no help.
Comment 11 Len Lawrence 2024-02-27 22:29:41 CET
(In reply to Bruno Cornec in comment #9)
Trying your YAML file.
$ docker compose up -d
[+] Running 9/9
 ✔ db 8 layers [⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                          23.9s 
   ✔ 01007420e9b0 Pull complete                                           13.9s 
   ✔ 31505b2b3fb6 Pull complete                                           14.8s 
   ✔ 97328dbb4b34 Pull complete                                            2.3s 
   ✔ 15d22565a968 Pull complete                                            1.7s 
   ✔ a150d2776ac9 Pull complete                                            2.5s 
   ✔ 5b0eb1c11437 Pull complete                                           19.9s 
   ✔ 11ffc9dfe027 Pull complete                                            3.0s 
   ✔ 51f9c9c328e6 Pull complete                                            4.3s 
WARN[0023] Found orphan containers ([composetest-web-1 composetest-redis-1]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. 
[+] Running 1/1
 ✔ Container composetest-db-1  Started                                     0.3s 

$ docker ps
CONTAINER ID   IMAGE             COMMAND                  CREATED              STATUS              PORTS                                         NAMES
1a9e38c68b82   mariadb           "docker-entrypoint.s…"   About a minute ago   Up About a minute   0.0.0.0:33060->3306/tcp, :::33060->3306/tcp   composetest-db-1

I know nothing about MariaDB but port 33060 shows:
i���
11.3.2-MariaDB-1:11.3.2+maria~ubu2204����{%?OP$a=�юч-�яЃ���������KCK3XF3i<-kV�mysql_native_password�!��я„#08S01Got packets out of order
Comment 12 Len Lawrence 2024-02-27 22:38:44 CET
And
$ docker compose up -d --remove-orphans
[+] Running 3/2
 ✔ Container composetest-redis-1  Remov...                                 0.2s 
 ✔ Container composetest-web-1    Removed                                 10.2s 
 ✔ Container composetest-db-1     Running                                  0.0s
Comment 13 Len Lawrence 2024-02-27 22:43:53 CET
Again - it seems to work.  Leaving the database stuff to katnatek.
Comment 14 katnatek 2024-02-27 22:57:16 CET
(In reply to Len Lawrence from comment #13)
> Again - it seems to work.  Leaving the database stuff to katnatek.

I'm bot go beyond you do 
https://bugs.mageia.org/show_bug.cgi?id=32899#c7

No matter too much with the current packages not works
katnatek 2024-02-27 23:38:11 CET

Whiteboard: (none) => MGA9-64-OK

Comment 15 Len Lawrence 2024-02-28 00:15:28 CET
Well, I did try this as a shot in the dark:
$ mysql --user=test --password=password test
ERROR 2002 (HY000): Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2)

$ mysql --user=test --password=password test:33060
ERROR 2002 (HY000): Can't connect to local server through socket '/var/lib/mysql/mysql.sock' (2)
Comment 16 Len Lawrence 2024-02-28 00:24:38 CET
(In reply to katnatek in comment #14)

This looked more like it, but...
$ mysql --user=test --password=password --port=33060 test
ERROR 1045 (28000): Access denied for user 'test'@'172.18.0.1' (using password: YES)

So, yes, agreed, let it go.
Comment 17 Thomas Andrews 2024-02-28 00:34:45 CET
Thanks, guys. Validating.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs

Comment 18 Mageia Robot 2024-02-28 06:49:07 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2024-0077.html

Resolution: (none) => FIXED
Status: ASSIGNED => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.