Skip to content

Idea on refactor config management #271

@schaefi

Description

@schaefi

So far we implement our own way to manage (cleanup/revert/create) config files in the system that gets registered. However that cleanup code has already lead to inconsistent system states and we have no opportunity to really see what we change. My idea here is to make use of git to manage and also cleanup data in the following way

  • init a git at places where we do changes prior anything else
git init /etc
  • some config file already exists
git add my_file
git commit -m origin_my_file
git tag my_file
# we change it
...

# on cleanup:
git reset --hard my_file --
  • some config file is net new
# we create it
touch some_other_file...

# on cleanup
git ls-files --error-unmatch some_other_file || rm -f some_other_file

We have to keep track of a list of files that we create and/or modify. Shouldn't be that hard. So far the list of files I found that we change or create is as follows

  • /etc/zypp/services.d
  • /etc/hosts
  • /etc/containers/config.json
  • /etc/profile.local
  • /etc/containers/registries.conf
  • /etc/docker/daemon.json
  • /etc/uyuni/uyuni-tools.yaml

So just /etc git managed

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions