-
Notifications
You must be signed in to change notification settings - Fork 522
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4352 +/- ##
==========================================
+ Coverage 72.07% 72.08% +0.01%
==========================================
Files 141 141
Lines 21640 21662 +22
==========================================
+ Hits 15596 15616 +20
- Misses 5093 5094 +1
- Partials 951 952 +1
Continue to review full report at Codecov.
|
/cc |
@@ -452,6 +452,9 @@ MASTER_CONTAINER_ADDONS_PLACEHOLDER | |||
mount --bind $MOUNT_DIR $MOUNT_DIR | |||
fi | |||
mount --make-shared $MOUNT_DIR | |||
{{- if IsAzureCNI}} | |||
ifconfig eth0 mtu {{GetEth0MTU}} up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not persisted between restarts. Shouldn't that go in /etc/network/interfaces
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
putting the statement into this script means the ifconfig update happens before every systemd kubelet startup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words, doing it this way tightly couples the configuration to kubelet/k8s (even if the MTU is changed out of band for some reason, kubelet will always set it to the desired value before it starts up) rather than making an OS-wide config one time at cluster startup.
(Also, this was the easiest way to do it, so... :))
pkg/api/vlabs/validate.go
Outdated
allowedMTUs += strconv.Itoa(mtu) + ", " | ||
} | ||
allowedMTUs = strings.TrimRight(allowedMTUs, ", ") | ||
return errors.Errorf("Invalid linuxProfile eth0MTU value \"%d\", please use one of the following versions: %s", a.LinuxProfile.Eth0MTU, allowedMTUs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return errors.Errorf("Invalid linuxProfile eth0MTU value \"%d\", please use one of the following versions: %s", a.LinuxProfile.Eth0MTU, allowedMTUs) | |
return errors.Errorf("Invalid linuxProfile eth0MTU value \"%d\", please use one of the following values: %s", a.LinuxProfile.Eth0MTU, allowedMTUs) |
nit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aramase, jackfrancis The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Reason for Change:
This PR introduces a
eth0MTU
int property tolinuxProfile
, that can be used to configure either1500
or3900
for the eth0 interface.We don't accept this configuration vector if you are in a kubenet configuration.
Issue Fixed:
In service of #4350
Credit Where Due:
Does this change contain code from or inspired by another project?
If "Yes," did you notify that project's maintainers and provide attribution?
Requirements:
Notes: