Skip to content

Commit

Permalink
DLPX-84565 telegraf.service restarts after upgrade when it should be …
Browse files Browse the repository at this point in the history
  • Loading branch information
palash-gandhi committed Oct 4, 2023
1 parent 0bdff1c commit e156319
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion upgrade/upgrade-scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ function mask_service() {
chroot "/var/lib/machines/$container" systemctl mask "$svc" ||
die "failed to mask '$svc' in container '$container'"
else
systemctl mask "$svc" || die "failed to mask '$svc'"
systemctl mask --now "$svc" || die "failed to mask '$svc'"
fi
}

Expand Down Expand Up @@ -442,6 +442,10 @@ function fix_and_migrate_services() {
fi
fi

if [[ "$(systemctl is-enabled telegraf)" == enabled ]]; then
mask_service telegraf "$container"
fi

#
# The services listed below are either permanently disabled or can be
# dynamically modified by the application(s) running on the appliance,
Expand Down Expand Up @@ -483,5 +487,6 @@ function fix_and_migrate_services() {
snmpd.service
systemd-timesyncd.service
td-agent.service
telegraf.service
EOF
}

0 comments on commit e156319

Please sign in to comment.