Bug 50969 - docker compose create gets wrong main container id for main service
docker compose create gets wrong main container id for main service
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 4.4-3-errata
Assigned To: Felix Botner
Jannik Ahlers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2020-03-16 11:30 CET by Felix Botner
Modified: 2020-03-18 12:27 CET (History)
0 users

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2020-03-16 11:30:43 CET
Is the services use the same image, it can happen that docker compose create() gets the wrong container id for the main service (appcenter/apps/APP_ID/container).
Comment 2 Felix Botner univentionstaff 2020-03-16 14:45:07 CET
9e26a403474120ec840df2ee4d06509e48352f0a - univention-appcenter
5a605ac0e228652a7539b459fb4eca19221e229d

2e7aa337596c8b05ce8b35cf8b2479cb7790ca5b - yaml
5c0ae2681d25d7faca3b9bbeec9a3fd59500e97d


The logic for getting the container id for the main service is now as follows:

 * get container_name from main service in docker-compose.yaml
 * OR get the name from docker-compose ps (the name with '_${main_service}_')
 * OR us ${app_id}_${main_service_name}_1
 * get container id from docker inspect ${container_name}
Comment 3 Jannik Ahlers univentionstaff 2020-03-17 17:33:49 CET
Code: OK
YAML: OK

The ucr variable appcenter/apps/$APPIDcontainer gets set to correct container id for apps that do and do not specify container names in their compose file.

-> Verified
Comment 4 Erik Damrose univentionstaff 2020-03-18 12:27:56 CET
<http://errata.software-univention.de/ucs/4.4/485.html>