Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devops
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osm
devops
Commits
e309737a
Commit
e309737a
authored
7 years ago
by
marchettim
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix MTU of nested LXD containers inside VCA"
parents
38bdcea6
a885f626
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
jenkins/VCA/start_build
+7
-8
7 additions, 8 deletions
jenkins/VCA/start_build
with
7 additions
and
8 deletions
jenkins/VCA/start_build
+
7
−
8
View file @
e309737a
...
...
@@ -60,16 +60,15 @@ DEFAULT_INTERFACE=$(route -n | awk '$1~/^0.0.0.0/ {print $8}')
DEFAULT_MTU
=
$(
ip addr show
$DEFAULT_INTERFACE
| perl
-ne
'if (/mtu\s(\d+)/) {print $1;}'
)
INFO
"Setting lxdbr0 MTU to
$DEFAULT_MTU
"
ifconfig lxdbr0 mtu
$DEFAULT_MTU
# Make the MTU change persistent between reboots
sed
-i
'/lxc list/d'
/etc/rc.local
sed
-i
"
$
i lxc list > /dev/null"
/etc/rc.local
sed
-i
'/ifconfig lxdbr0 mtu/d'
/etc/rc.local
sed
-i
"
$
i ifconfig lxdbr0 mtu
$DEFAULT_MTU
"
/etc/rc.local
# This sets the MTU of lxdbr0 on the host machine without the need to recycle
# the interface or reboot the machine.
ifconfig lxdbr0 mtu
$DEFAULT_MTU
# Enable the rc-local service so our changes get executed upon boot
systemctl
enable
rc-local.service
# Setting the MTU in the default profile will be applied to every lxc container.
# Existing containers will need to be restarted for the new MTU to take effect.
# This will also persist the MTU change for the host's lxdbr0
lxc profile device
set
default eth0 mtu
$DEFAULT_MTU
INFO
"Pre-caching Ubuntu:16.04 image (this may take several minutes)..."
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment