Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit 426e2cf

Browse files
authored
Merge pull request #245 from isnuryusuf/master
adding function to umount when the /dev/sda1
2 parents 552f60a + 4874d58 commit 426e2cf

File tree

5 files changed

+19
-2
lines changed

5 files changed

+19
-2
lines changed

krib/profiles/example-krib-ha.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Description: Example HA Krib Profile - Clone Me!
44
Documentation: |
55
Minimum required Params to set on a KRIB Kubernetes
66
cluster to define a Highly Available setup.
7+
8+
Clone this profile as `krib-ha` and change the VIP to your needs.
9+
710
Meta:
811
color: blue
912
icon: ship

krib/tasks/krib-dev-reset.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Templates:
3737
echo "drpcli plugins runaction certs deleteroot certs/root {{.Param "etcd/name"}}-server-ca"
3838
echo "drpcli plugins runaction certs deleteroot certs/root {{.Param "etcd/name"}}-peer-ca"
3939
echo "==========================================================================="
40+
echo "Try to add unsafe/rs-password with value: your-non-default-password, on your profile and re-run the krib-reset-cluster workflow"
41+
4042
sleep 1
4143
{{if .ParamExists "unsafe/rs-password"}}
4244
PASSWORD="{{.Param "unsafe/rs-password"}}"

krib/templates/etcd-config.sh.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ fi
197197
mkdir -p ${TMP_DIR}
198198

199199
echo "Download etcd version: v${ETCD_VERSION}"
200-
download -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz -o ${TMP_DIR}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
200+
download -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz -O ${TMP_DIR}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz
201201
echo "Install etcd version: ${ETCD_VERSION}"
202202
tar -C ${INSTALL_DIR} -xzf ${TMP_DIR}/etcd-v${ETCD_VERSION}-linux-amd64.tar.gz --strip-components=1
203203

krib/templates/krib-helm-init.sh.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ if [[ $MASTER_INDEX != notme ]] ; then
4646
chmod 700 get_helm.sh
4747

4848
HELM_INSTALL_DIR=$INSTALL_DIR ./get_helm.sh -v ${HELM_VERSION}
49+
echo "When helm fail to get the latest version, please add param "helm/version" and re-run again"
50+
echo "You can find the version release or tag on: https://github.com/helm/helm/releases/"
51+
4952
fi
5053

5154
if [[ ! -z $(kubectl -n kube-system rollout status deploy/tiller-deploy -w=0 | grep success) ]] ; then

krib/templates/mount-disks.sh.tmpl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ case $BE in
2424
;;
2525
esac
2626

27+
# Umount disk if already mounted
28+
export MOUNT=/mnt/hdd
29+
30+
if grep -qs $MOUNT /proc/mounts; then
31+
umount /dev/sda1
32+
else
33+
echo "/dev/sda1 is not mounted"
34+
fi
35+
2736
GETDISK=$(lsblk | grep "disk" | awk '{ print $1 }' | head -1)
2837
echo "Found /dev/$GETDISK - using ..."
2938

@@ -41,7 +50,7 @@ partprobe
4150

4251
echo "Make filesystem - xfs - docker likes it"
4352

44-
mkfs.xfs /dev/${GETDISK}1
53+
mkfs.xfs -f /dev/${GETDISK}1
4554

4655
echo "Mount filesystem - put it in place, put not permanently"
4756

0 commit comments

Comments
 (0)