Skip to content

Inform user when cloud-init generated config files are left during uninstalling

Ani Sinha requested to merge anisinha/cloud-init:fix-mr57 into c9s

BZ: 2232296

Several config files are generated by cloud-init that are not normally removed
when cloud-init is uninstalled. Inform users of the config files that are left.
We want users to inspect the files and remove them manually if they wanted.
Therefore, we do not remove the files from the post uninstall script in rpm spec.

After this change, users will get messages like the following upon cloud-init
uninstall:

Remove 1 Package

Freed space: 3.9 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/
Running scriptlet: cloud-init-23.1.1-10.el9.anisinha202308161520.noarch 1/1
Erasing : cloud-init-23.1.1-10.el9.anisinha202308161520.noarch 1/
Running scriptlet: cloud-init-23.1.1-10.el9.anisinha202308161520.noarch 1/1
/etc/ssh/sshd_config.d/50-cloud-init.conf not removed
/etc/NetworkManager/conf.d/99-cloud-init.conf not removed
Verifying : cloud-init-23.1.1-10.el9.anisinha202308161520.noarch 1/1
Installed products updated.
Removed:
cloud-init-23.1.1-10.el9.anisinha202308161520.noarch

    
Fixes: ea3dc73a171a4 ("Remove /etc/ssh/sshd_config.d/50-cloud-init.conf when uninstalling")
    
X-downstrteam-only: true
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Edited by Ani Sinha

Merge request reports