Skip to content

docker: Define storage-driver from facts

Guillaume Samson requested to merge gitlab_runner_storage_driver into production

After applying the same configuration than rancher-node-metal03 on runner0, the ZFS pool and datasets are exactly the same.
The docker version and configuration are the same too but the storage driver of docker is still overlay2 on runner0:

root@runner0:~# docker info | awk 'NR>18 && NR < 26'
 Server Version: 24.0.6
 Storage Driver: overlay2
  Backing Filesystem: zfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
root@rancher-node-metal03:~# docker info | awk 'NR>18 && NR < 28'
 Server Version: 24.0.6
 Storage Driver: zfs
  Zpool: data
  Zpool Health: ONLINE
  Parent Dataset: data/docker
  Space Used By Parent: 159744
  Space Available: 3079596613632
  Parent Quota: no
  Compression: zstd

This update will define add a storage-driver options if /var/lib/docker is a ZFS dataset.

ᐅ bin/octocatalog-diff -t gitlab_runner_storage_driver -f production runner0
[...]
*******************************************
  File[/etc/default/docker-storage] =>
   parameters =>
     content =>
      @@ -15,3 +15,3 @@
       # DOCKER_STORAGE_OPTIONS = --storage-opt dm.metadatadev=/dev/mylogvol/my-docker-metadata --storage-opt dm.datadev=/dev/mylogvol/my-docker-data
      _
      -DOCKER_STORAGE_OPTIONS=""
      +DOCKER_STORAGE_OPTIONS=" --storage-driver zfs"
*******************************************
*** End octocatalog-diff on runner0.internal.staging.swh.network
ᐅ bin/octocatalog-diff -t gitlab_runner_storage_driver -f production thyssen
[...]
*** Running octocatalog-diff on host thyssen.internal.softwareheritage.org
I, [2023-10-11T17:17:23.706535 #616681]  INFO -- : Catalogs compiled for thyssen.internal.softwareheritage.org
I, [2023-10-11T17:17:23.950306 #616681]  INFO -- : Diffs computed for thyssen.internal.softwareheritage.org
I, [2023-10-11T17:17:23.950347 #616681]  INFO -- : No differences
*** End octocatalog-diff on thyssen.internal.softwareheritage.org
ᐅ bin/octocatalog-diff -t gitlab_runner_storage_driver -f production cassandra01
[...]
*******************************************
  File[/etc/default/docker-storage] =>
   parameters =>
     content =>
      @@ -15,3 +15,3 @@
       # DOCKER_STORAGE_OPTIONS = --storage-opt dm.metadatadev=/dev/mylogvol/my-docker-metadata --storage-opt dm.datadev=/dev/mylogvol/my-docker-data
      _
      -DOCKER_STORAGE_OPTIONS=""
      +DOCKER_STORAGE_OPTIONS=" --storage-driver zfs"
*******************************************
*** End octocatalog-diff on cassandra01.internal.softwareheritage.org
ᐅ bin/octocatalog-diff -t gitlab_runner_storage_driver -f production rancher-node-metal03
[...]
*******************************************
  File[/etc/default/docker-storage] =>
   parameters =>
     content =>
      @@ -15,3 +15,3 @@
       # DOCKER_STORAGE_OPTIONS = --storage-opt dm.metadatadev=/dev/mylogvol/my-docker-metadata --storage-opt dm.datadev=/dev/mylogvol/my-docker-data
      _
      -DOCKER_STORAGE_OPTIONS=""
      +DOCKER_STORAGE_OPTIONS=" --storage-driver zfs"
*******************************************
*** End octocatalog-diff on rancher-node-metal03.internal.softwareheritage.org
ᐅ bin/octocatalog-diff -t gitlab_runner_storage_driver -f production maven-exporter
[...]
*******************************************
  File[/etc/default/docker-storage] =>
   parameters =>
     content =>
      @@ -15,3 +15,3 @@
       # DOCKER_STORAGE_OPTIONS = --storage-opt dm.metadatadev=/dev/mylogvol/my-docker-metadata --storage-opt dm.datadev=/dev/mylogvol/my-docker-data
      _
      -DOCKER_STORAGE_OPTIONS=""
      +DOCKER_STORAGE_OPTIONS=" --storage-driver zfs"
*******************************************
*** End octocatalog-diff on maven-exporter.internal.softwareheritage.org

May be it could be useful to create an issue to remove docker service where it's no longer needed.

Merge request reports

Loading