Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSMorphing] Add automatic dpkg --configure step before installing packages. #308

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions coriolis/osmorphing/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ def pre_packages_install(self, package_names):

def install_packages(self, package_names):
try:
# NOTE(aznashwan): in the rare event that a replica sync occurs
# while the source machine was midway through installing or
# configuring a package, forcing it to retain old conf files
# which were previously modified on the source machine.
deb_reconfigure_cmd = (
"dpkg --configure --force-confold -a")
self._exec_cmd_chroot(deb_reconfigure_cmd)

apt_get_cmd = (
'/bin/bash -c "DEBIAN_FRONTEND=noninteractive '
'apt-get install %s -y '
Expand Down
Loading