Skip to content

Commit

Permalink
Merge pull request #10657 from hakman/automated-cherry-pick-of-#10654…
Browse files Browse the repository at this point in the history
…-upstream-release-1.19

Automated cherry pick of #10654: Set the tcp_rmem sysctl in bootstrap script
  • Loading branch information
k8s-ci-robot committed Jan 26, 2021
2 parents 6ad8bad + 7776002 commit b046b37
Show file tree
Hide file tree
Showing 103 changed files with 366 additions and 4 deletions.
6 changes: 6 additions & 0 deletions pkg/model/bootstrapscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,12 @@ func (b *BootstrapScript) Run(c *fi.Context) error {
"GzipBase64": func(data string) (string, error) {
return gzipBase64(data)
},

"SetSysctls": func() string {
// By setting some sysctls early, we avoid broken configurations that prevent nodeup download.
// See https://github.com/kubernetes/kops/issues/10206 for details.
return "sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true\n"
},
}

awsNodeUpTemplate, err := resources.AWSNodeUpTemplate(b.ig)
Expand Down
2 changes: 2 additions & 0 deletions pkg/model/resources/nodeup.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ NODEUP_HASH_ARM64={{ NodeUpSourceHashArm64 }}
{{ ProxyEnv }}
{{ SetSysctls }}
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
3 changes: 3 additions & 0 deletions pkg/model/tests/data/bootstrapscript_0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ systemctl daemon-reload
systemctl daemon-reexec


sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
3 changes: 3 additions & 0 deletions pkg/model/tests/data/bootstrapscript_1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ systemctl daemon-reload
systemctl daemon-reexec


sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
3 changes: 3 additions & 0 deletions pkg/model/tests/data/bootstrapscript_2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ systemctl daemon-reload
systemctl daemon-reexec


sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
3 changes: 3 additions & 0 deletions pkg/model/tests/data/bootstrapscript_3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ systemctl daemon-reload
systemctl daemon-reexec


sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
3 changes: 3 additions & 0 deletions pkg/model/tests/data/bootstrapscript_4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ systemctl daemon-reload
systemctl daemon-reexec


sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
3 changes: 3 additions & 0 deletions pkg/model/tests/data/bootstrapscript_5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ systemctl daemon-reload
systemctl daemon-reexec


sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Resources.AWSEC2LaunchTemplatemasterustest1amasterscomplexexamplecom.Properties.
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down Expand Up @@ -377,6 +380,9 @@ Resources.AWSEC2LaunchTemplatenodescomplexexamplecom.Properties.LaunchTemplateDa
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Resources.AWSEC2LaunchTemplatemasterustest1amasterscontainerdexamplecom.Properti
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down Expand Up @@ -348,6 +351,9 @@ Resources.AWSEC2LaunchTemplatenodescontainerdexamplecom.Properties.LaunchTemplat
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Resources.AWSEC2LaunchTemplatemasterustest1amasterscontainerdexamplecom.Properti
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down Expand Up @@ -326,6 +329,9 @@ Resources.AWSEC2LaunchTemplatenodescontainerdexamplecom.Properties.LaunchTemplat
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Resources.AWSEC2LaunchTemplatemasterustest1amastersdockerexamplecom.Properties.L
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down Expand Up @@ -344,6 +347,9 @@ Resources.AWSEC2LaunchTemplatenodesdockerexamplecom.Properties.LaunchTemplateDat
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Resources.AWSEC2LaunchTemplatemasterustest1amastersminimalexamplecom.Properties.
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down Expand Up @@ -342,6 +345,9 @@ Resources.AWSEC2LaunchTemplatenodesminimalexamplecom.Properties.LaunchTemplateDa
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Resources.AWSEC2LaunchTemplatemasterustest1amastersexternallbexamplecom.Properti
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down Expand Up @@ -342,6 +345,9 @@ Resources.AWSEC2LaunchTemplatenodesexternallbexamplecom.Properties.LaunchTemplat
sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true
function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ export AWS_REGION=us-test-1



sysctl -w net.ipv4.tcp_rmem='4096 12582912 16777216' || true


function ensure-install-dir() {
INSTALL_DIR="/opt/kops"
# On ContainerOS, we install under /var/lib/toolbox; /opt is ro and noexec
Expand Down
Loading

0 comments on commit b046b37

Please sign in to comment.