puppetlabs / puppetlabs-docker

The Puppet Docker repository
Apache License 2.0
91 stars 309 forks source link

"docker" fact not working on 23.0.1 #896

Closed seidler2547 closed 1 year ago

seidler2547 commented 1 year ago

It seems that because if this strange version check: https://github.com/puppetlabs/puppetlabs-docker/blob/c3c4d6f704684de60712801e35423abb310ea42b/lib/facter/docker.rb#L124 the "docker" fact stopped working on our Debian 11 machines with Docker CE 23.0.1, build a5ee5b1. If I change the regexp to be more "inclusive", it works. But I don't really understand the regex enough to fix it properly.

smortex commented 1 year ago

It looks like i currently have docker 20.10.22 witch match because:

Version part Regexp part
20. nothing
1 1
0 [0-9]
nothing [0-2]?
. [.]
22 \w+

This original intention was to restrict versions to 1.13+ according to e7ad171a540f2d6d5b2ab76d36e7149de828b3b7 but since then multiple tweaks made it even more broken :smile:. I'll open a PR de fix this.