Skip to content

PR #1296 introduces undocumented change leaving unmanaged apt/yum configurations #1302

@onlyhavecans

Description

@onlyhavecans

👻 Brief Description

The following diff changes the name of the yum & apt repositories created, leaving unmanaged files on the system for anybody upgrading the cookbook.

https://github.com/sous-chefs/docker/pull/1296/files#diff-059a185f60594cf519f17dece33dd581e48b872f91da8186a994ad507b80f59dL165-R178

🥞 Cookbook version

>= 11.9.0

👩‍🍳 Chef-Infra Version

Chef Workstation version: 25.2.1075
Chef Habitat version: 1.6.1243
Test Kitchen version: 3.6.0
Cookstyle version: 7.32.8
Chef Infra Client version: 18.6.2
Chef InSpec version: 5.22.65
Chef CLI version: 5.6.16

🎩 Platform details

Any yum or apt-based distribution

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install using docker cookbook < 11.9 (example below)
  2. upgrade the docker cookbook to >= 11.9.0
  3. converge
  4. note change (below)

Install example

docker_installation_package "docker-ce" do
  package_name "docker-ce"
  setup_docker_repo true
  version node['docker']['package']['version']
  action :create
end

Post 11.9 converge

resources updated this run:
* file[/etc/apt/sources.list.d/docker.list]
  - create new file /etc/apt/sources.list.d/docker.list
  - update content in file /etc/apt/sources.list.d/docker.list from none to a2bdf9
  - change mode from '' to '0644'

* execute[apt-cache gencaches]
  - execute ["apt-cache", "gencaches"]

* execute[apt-get -q update]
  - execute ["apt-get", "-q", "update"]

* apt_update[docker]
  - force update new lists of packages

* apt_repository[docker]
  - force update new lists of packages

* docker_installation_package[docker-ce]
$ ls -al /etc/apt/sources.list.d/
...
-rw-r--r--  1 root root   76 Mar 21 16:08 docker.list
-rw-r--r-- 99 root root   76 Oct 22 09:32 Docker.list
...

🚓 Expected behavior

  1. post warnings when deploying changes that require manual remediation
  2. Idempotently replace its configurations

➕ Additional context

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions