UCL-MIRSG / ansible-collection-infra

Ansible Collection to configure infrastructure for XNAT and OMERO
BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

The pinned `docker` versions are unintentionally upgraded during the playbook #105

Closed paddyroddy closed 1 month ago

paddyroddy commented 1 month ago

Short Description

In https://github.com/UCL-MIRSG/ansible-collection-infra/pull/67 a bug was fixed which is related to v25 of docker client. The PR addressed this to pin the versions, but upon running the playbook once the client had been upgraded to 26.1.3, rather than the specified 24.0.9 (which the engine has). Running subsequent times upgrades both to 26.1.3 (likely due to the provision role).

Client: Docker Engine - Community
 Version:           26.1.3
 API version:       1.43 (downgraded from 1.45)
 Go version:        go1.21.10
 Git commit:        b72abbb
 Built:             Thu May 16 08:34:33 2024
 OS/Arch:           linux/arm64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.9
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.13
  Git commit:       fca702d
  Built:            Thu Feb  1 00:48:18 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.32
  GitCommit:        8b3b7ca2e5ce38e8f31a34f35b2b68ceb8470d89
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Evidence/Steps to Reproduce

Run the install_xnat playbook and check on xnat-cserv with docker version

Acceptance Criteria/Expected Behaviour

No response

Details

No response

Resolution

No response

paddyroddy commented 1 month ago

Easy fix would probably be to ignore the docker ones specified in https://github.com/UCL-MIRSG/ansible-collection-infra/blob/9319707eed2dca321b00c4d1a3e5bf147718f011/roles/docker/tasks/main.yml#L38-L40 in the upgrade step

HChughtai commented 1 month ago

I checked on ucl-test-xnat - whilst the user interface reports that the Container Service is up, attempting to pull an image returns an error indicative of the CS plugin/Docker version issue.

This is confirmed by checking the versions of Docker and the CLI on the configured container service server (mirsg-linux in this case) and having the reported versions be 26.1.3

p-j-smith commented 1 month ago

Easy fix would probably be to ignore the docker ones specified in

ansible-collection-infra/roles/docker/tasks/main.yml

https://github.com/UCL-MIRSG/ansible-collection-infra/blob/9319707eed2dca321b00c4d1a3e5bf147718f011/roles/docker/tasks/main.yml#L38-L40 in the upgrade step

Yep, and we need to allow docker-ce and docker-ce-cli to be downgraded (as it's already upgraded on the test server)