Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
fix: disable unattended upgrades during CSE execution (#1681)
Browse files Browse the repository at this point in the history
* fix: disable unattended upgrades during CSE execution

Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>

* style: remove comments to save CSE bytes

Co-authored-by: Matt Boersma <Matt.Boersma@microsoft.com>
  • Loading branch information
Sylvain Rabot and mboersma committed Apr 3, 2020
1 parent fc1fd2b commit 0fff207
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parts/k8s/cloud-init/artifacts/cse_main.sh
Expand Up @@ -247,6 +247,9 @@ if $FULL_INSTALL_REQUIRED; then
fi
{{end}}

{{- /* re-enable unattended upgrades */}}
rm -f /etc/apt/apt.conf.d/99periodic

{{- if not IsAzureStackCloud}}
if [[ $OS == $UBUNTU_OS_NAME ]]; then
time_metric "PurgeApt" apt_get_purge apache2-utils &
Expand Down
9 changes: 9 additions & 0 deletions parts/k8s/cloud-init/masternodecustomdata.yml
Expand Up @@ -133,6 +133,15 @@ write_files:
{{CloudInitData "aptPreferences"}}
{{end}}

- path: /etc/apt/apt.conf.d/99periodic
permissions: "0644"
owner: root
content: |
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
{{if IsIPv6Enabled}}
- path: {{GetDHCPv6ServiceCSEScriptFilepath}}
permissions: "0644"
Expand Down
9 changes: 9 additions & 0 deletions parts/k8s/cloud-init/nodecustomdata.yml
Expand Up @@ -127,6 +127,15 @@ write_files:
{{CloudInitData "aptPreferences"}}
{{end}}

- path: /etc/apt/apt.conf.d/99periodic
permissions: "0644"
owner: root
content: |
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
{{if IsIPv6Enabled}}
- path: {{GetDHCPv6ServiceCSEScriptFilepath}}
permissions: "0644"
Expand Down
21 changes: 21 additions & 0 deletions pkg/engine/templates_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0fff207

Please sign in to comment.