Skip to content

Commit

Permalink
DLPX-91434 cloud-init config to disable it should be copied due to co…
Browse files Browse the repository at this point in the history
…nflict with upstream naming found in DLPX-91387 (#764)

PR URL: https://www.github.com/delphix/appliance-build/pull/764
  • Loading branch information
palash-gandhi authored Jun 27, 2024
1 parent 7ed0ffa commit b229319
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions upgrade/upgrade-scripts/execute
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,23 @@ apt-mark manual "delphix-entire-$opt_p" ||
[[ -f "/usr/share/doc/delphix-entire-$opt_p/packages.list.gz" ]] ||
die "delphix-entire's packages.list.gz file is missing"

#
# In DLPX-91387, we discovered that cloud-init's preinst script was
# removing '/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg', which
# was created by the delphix-osadmin service to disable cloud-init from
# overwriting the netplan file after the initial boot.
# To prevent this from happening, DLPX-91387 renamed the file to
# '99-delphix-disable-network-config.cfg'. Here, we copy the file to the new location
# before installing the new packages so that the upgrade of cloud-init
# does not cause this configuration to be lost.
#
if [[ -f "/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" ]]; then
cp "/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" \
"/etc/cloud/cloud.cfg.d/99-delphix-disable-network-config.cfg" ||
die "failed to copy /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" \
" to /etc/cloud/cloud.cfg.d/99-delphix-disable-network-config.cfg"
fi

zcat "/usr/share/doc/delphix-entire-$opt_p/packages.list.gz" |
xargs_apt_get install -y --allow-downgrades ||
die "failed to install packages listed in packages.list.gz file"
Expand Down
1 change: 1 addition & 0 deletions upgrade/upgrade-scripts/upgrade-container
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ function migrate_configuration() {
done <<-EOF
/etc/challenge_response.key
/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
/etc/cloud/cloud.cfg.d/99-delphix-disable-network-config.cfg
/etc/delphix-interface-names.yaml
/etc/default/locale
/etc/engine-code
Expand Down

0 comments on commit b229319

Please sign in to comment.