Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gl-27] Install cifs-utils on existing nodes #15

Merged
merged 1 commit into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If multiple identifiers make sense you can also state the commands multiple time
/area TODO
/kind bug
/priority normal
/os gardenlinux
/os garden-linux

**What happened**:

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If multiple identifiers make sense you can also state the commands multiple time
/area TODO
/kind enhancement
/priority normal
/os gardenlinux
/os garden-linux

**What would you like to be added**:

Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For Gardener Enhancement Proposals (GEPs), please check the following [documenta
/area TODO
/kind TODO
/priority normal
/os gardenlinux
/os garden-linux

**What this PR does / why we need it**:

Expand Down
2 changes: 1 addition & 1 deletion hack/update-github-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ for file in `find "$(dirname $0)"/../vendor/github.com/gardener/gardener/.github
sed 's/to the Gardener project/for this extension/g' |\
sed 's/to Gardener/to this extension/g' |\
sed 's/- Gardener version:/- Gardener version (if relevant):\n- Extension version:/g' |\
sed 's/\/priority normal/\/priority normal\n\/os gardenlinux/g' \
sed 's/\/priority normal/\/priority normal\n\/os garden-linux/g' \
> "$(dirname $0)/../.github/${file#*.github/}"
done
17 changes: 12 additions & 5 deletions pkg/generator/templates/cloud-init.gardenlinux.template
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,24 @@ grep -sq "^nfsd$" /etc/modules || echo "nfsd" >>/etc/modules
modprobe nfsd
nslookup $(hostname) || systemctl restart systemd-networkd
systemctl daemon-reload

if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release && ! dpkg-query --show cifs-utils &>/dev/null
then
PARTITION=$(mount -v | grep "^/.*/usr" | awk '{print $1}')
mount -o remount,rw ${PARTITION} /usr
until apt update -qq && apt install --no-upgrade -qqy cifs-utils

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this may cause issue on AliCloud because in China mainland, debian source network are not so stable

do
sleep 1
done
mount -o remount,ro ${PARTITION} /usr
fi

{{- if .Bootstrap }}
{{- if isContainerDEnabled .CRI }}
systemctl enable containerd && systemctl restart containerd
{{- end }}
if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release
then
PARTITION=$(mount -v | grep "^/.*/usr" | awk '{print $1}')
mount -o remount,rw ${PARTITION} /usr
until apt update -qq && apt install --no-upgrade -qqy cifs-utils; do sleep 1; done
mount -o remount,ro ${PARTITION} /usr

mkdir -p /etc/docker
cat << EOF > /etc/docker/daemon.json
{ "storage-driver": "overlay2",
Expand Down
12 changes: 9 additions & 3 deletions pkg/generator/testfiles/cloud-init
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@ grep -sq "^nfsd$" /etc/modules || echo "nfsd" >>/etc/modules
modprobe nfsd
nslookup $(hostname) || systemctl restart systemd-networkd
systemctl daemon-reload
if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release

if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release && ! dpkg-query --show cifs-utils &>/dev/null
then
PARTITION=$(mount -v | grep "^/.*/usr" | awk '{print $1}')
mount -o remount,rw ${PARTITION} /usr
until apt update -qq && apt install --no-upgrade -qqy cifs-utils; do sleep 1; done
until apt update -qq && apt install --no-upgrade -qqy cifs-utils
do
sleep 1
done
mount -o remount,ro ${PARTITION} /usr

fi
if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release
then
mkdir -p /etc/docker
cat << EOF > /etc/docker/daemon.json
{ "storage-driver": "overlay2",
Expand Down
14 changes: 10 additions & 4 deletions pkg/generator/testfiles/containerd-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,20 @@ grep -sq "^nfsd$" /etc/modules || echo "nfsd" >>/etc/modules
modprobe nfsd
nslookup $(hostname) || systemctl restart systemd-networkd
systemctl daemon-reload
systemctl enable containerd && systemctl restart containerd
if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release

if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release && ! dpkg-query --show cifs-utils &>/dev/null
then
PARTITION=$(mount -v | grep "^/.*/usr" | awk '{print $1}')
mount -o remount,rw ${PARTITION} /usr
until apt update -qq && apt install --no-upgrade -qqy cifs-utils; do sleep 1; done
until apt update -qq && apt install --no-upgrade -qqy cifs-utils
do
sleep 1
done
mount -o remount,ro ${PARTITION} /usr

fi
systemctl enable containerd && systemctl restart containerd
if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release
then
mkdir -p /etc/docker
cat << EOF > /etc/docker/daemon.json
{ "storage-driver": "overlay2",
Expand Down
11 changes: 11 additions & 0 deletions pkg/generator/testfiles/containerd-reconcile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,16 @@ grep -sq "^nfsd$" /etc/modules || echo "nfsd" >>/etc/modules
modprobe nfsd
nslookup $(hostname) || systemctl restart systemd-networkd
systemctl daemon-reload

if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release && ! dpkg-query --show cifs-utils &>/dev/null
then
PARTITION=$(mount -v | grep "^/.*/usr" | awk '{print $1}')
mount -o remount,rw ${PARTITION} /usr
until apt update -qq && apt install --no-upgrade -qqy cifs-utils
do
sleep 1
done
mount -o remount,ro ${PARTITION} /usr
fi
systemctl enable 'unit1' && systemctl restart 'unit1'
systemctl enable 'unit2' && systemctl restart 'unit2'
12 changes: 9 additions & 3 deletions pkg/generator/testfiles/docker-bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ grep -sq "^nfsd$" /etc/modules || echo "nfsd" >>/etc/modules
modprobe nfsd
nslookup $(hostname) || systemctl restart systemd-networkd
systemctl daemon-reload
if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release

if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release && ! dpkg-query --show cifs-utils &>/dev/null
then
PARTITION=$(mount -v | grep "^/.*/usr" | awk '{print $1}')
mount -o remount,rw ${PARTITION} /usr
until apt update -qq && apt install --no-upgrade -qqy cifs-utils; do sleep 1; done
until apt update -qq && apt install --no-upgrade -qqy cifs-utils
do
sleep 1
done
mount -o remount,ro ${PARTITION} /usr

fi
if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release
then
mkdir -p /etc/docker
cat << EOF > /etc/docker/daemon.json
{ "storage-driver": "overlay2",
Expand Down
11 changes: 11 additions & 0 deletions pkg/generator/testfiles/docker-reconcile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,16 @@ grep -sq "^nfsd$" /etc/modules || echo "nfsd" >>/etc/modules
modprobe nfsd
nslookup $(hostname) || systemctl restart systemd-networkd
systemctl daemon-reload

if grep -q '^GARDENLINUX_BUILD_ID=27.[01]' /etc/os-release && ! dpkg-query --show cifs-utils &>/dev/null
then
PARTITION=$(mount -v | grep "^/.*/usr" | awk '{print $1}')
mount -o remount,rw ${PARTITION} /usr
until apt update -qq && apt install --no-upgrade -qqy cifs-utils
do
sleep 1
done
mount -o remount,ro ${PARTITION} /usr
fi
systemctl enable 'unit1' && systemctl restart 'unit1'
systemctl enable 'unit2' && systemctl restart 'unit2'