Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
c4a26315
Commit
c4a26315
authored
May 25, 2015
by
Justin Santa Barbara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mount logic breaks if /var/lib/kubelet is a symlink
Pass the correct kubelet root-dir on AWS
parent
98392532
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
2 deletions
+20
-2
format-disks.sh
cluster/aws/templates/format-disks.sh
+1
-0
salt-master.sh
cluster/aws/templates/salt-master.sh
+6
-0
salt-minion.sh
cluster/aws/templates/salt-minion.sh
+6
-0
default
cluster/saltbase/salt/kubelet/default
+6
-1
mount.go
pkg/util/mount/mount.go
+1
-1
No files found.
cluster/aws/templates/format-disks.sh
View file @
c4a26315
...
...
@@ -75,5 +75,6 @@ else
fi
mkdir
-p
/mnt/kubelet
ln
-s
/mnt/kubelet /var/lib/kubelet
KUBELET_ROOT
=
"/mnt/kubelet"
fi
cluster/aws/templates/salt-master.sh
View file @
c4a26315
...
...
@@ -38,6 +38,12 @@ if [[ -n "${DOCKER_ROOT}" ]]; then
EOF
fi
if
[[
-n
"
${
KUBELET_ROOT
}
"
]]
;
then
cat
<<
EOF
>>/etc/salt/minion.d/grains.conf
kubelet_root: '
$(
echo
"
$KUBELET_ROOT
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
# Auto accept all keys from minions that try to join
mkdir
-p
/etc/salt/master.d
cat
<<
EOF
>/etc/salt/master.d/auto-accept.conf
...
...
cluster/aws/templates/salt-minion.sh
View file @
c4a26315
...
...
@@ -55,6 +55,12 @@ if [[ -n "${DOCKER_ROOT}" ]]; then
EOF
fi
if
[[
-n
"
${
KUBELET_ROOT
}
"
]]
;
then
cat
<<
EOF
>>/etc/salt/minion.d/grains.conf
kubelet_root: '
$(
echo
"
$KUBELET_ROOT
"
|
sed
-e
"s/'/''/g"
)
'
EOF
fi
install-salt
service salt-minion start
cluster/saltbase/salt/kubelet/default
View file @
c4a26315
...
...
@@ -53,6 +53,11 @@
{% set docker_root = " --docker_root=" + grains.docker_root -%}
{% endif -%}
{% set kubelet_root = "" -%}
{% if grains.kubelet_root is defined -%}
{% set kubelet_root = " --root_dir=" + grains.kubelet_root -%}
{% endif -%}
{% set configure_cbr0 = "" -%}
{% if pillar['allocate_node_cidrs'] is defined -%}
{% set configure_cbr0 = "--configure-cbr0=" + pillar['allocate_node_cidrs'] -%}
...
...
@@ -66,4 +71,4 @@
{% set cgroup_root = "--cgroup_root=/" -%}
{% endif -%}
DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{hostname_override}} {{cloud_provider}} {{config}} --allow_privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{configure_cbr0}} {{cgroup_root}} {{system_container}}"
DAEMON_ARGS="{{daemon_args}} {{api_servers_with_port}} {{hostname_override}} {{cloud_provider}} {{config}} --allow_privileged={{pillar['allow_privileged']}} {{pillar['log_level']}} {{cluster_dns}} {{cluster_domain}} {{docker_root}} {{
kubelet_root}} {{
configure_cbr0}} {{cgroup_root}} {{system_container}}"
pkg/util/mount/mount.go
View file @
c4a26315
...
...
@@ -69,7 +69,7 @@ func GetMountRefs(mounter Interface, mountPath string) ([]string, error) {
// Find all references to the device.
var
refs
[]
string
if
deviceName
==
""
{
glog
.
Warningf
(
"could not determine device for path: %
s
"
,
mountPath
)
glog
.
Warningf
(
"could not determine device for path: %
q
"
,
mountPath
)
}
else
{
for
i
:=
range
mps
{
if
mps
[
i
]
.
Device
==
deviceName
&&
mps
[
i
]
.
Path
!=
mountPath
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment