Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
notebooks-operations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
702
Projekty
notebooks-operations
Commits
9594881b
Commit
9594881b
authored
10 months ago
by
František Dvořák
Browse files
Options
Downloads
Patches
Plain Diff
Try to fix a race-condition during docker runtime volume setup
parent
1967eaba
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
staging/deploy.sh
+1
-0
1 addition, 0 deletions
staging/deploy.sh
staging/terraform/vms.tf
+3
-1
3 additions, 1 deletion
staging/terraform/vms.tf
with
4 additions
and
1 deletion
staging/deploy.sh
+
1
−
0
View file @
9594881b
...
...
@@ -44,6 +44,7 @@ ansible -m command -a '/root/squid-volume.sh' 'ingress[0]'
# k8s + notebooks
ansible-playbook playbooks/k8s.yaml
while
ansible
-i
./inventory
-m
command
-a
'kubectl get pods --all-namespaces'
master |
tail
-n
+3 |
grep
-v
' Running '
;
do
sleep
5
;
done
# docker runtime directory after Kubernetes deployment (problem with unmounts)
ansible
-m
copy
-a
'src=terraform/docker-volume.sh dest=/root/ mode=preserve'
'ingress nfs worker'
ansible
-m
command
-a
'/root/docker-volume.sh'
'ingress nfs worker'
...
...
This diff is collapsed.
Click to expand it.
staging/terraform/vms.tf
+
3
−
1
View file @
9594881b
...
...
@@ -237,13 +237,15 @@ if ! dumpe2fs -h "$device" >/dev/null 2>&1; then
mkfs
.
ext4
-
L
DOCKER
"
$
device"
grep
-
q
'LABEL=DOCKER'
/
etc
/
fstab
||
/
bin
/
echo
-
e
"LABEL=DOCKER
\t
/var/lib/docker/overlay2
\t
ext4
\t
defaults,x-systemd.before=local-fs.target
\t
0
\t
0"
|
tee
-
a
/
etc
/
fstab
mkdir
-
p
/
var
/
lib
/
docker
/
overlay2
2
>/
dev
/
null
||
true
s
ervice
docker
stop
>/
dev
/
null
2
>&
1
||
true
s
ystemctl
stop
docker
kubelet
>/
dev
/
null
2
>&
1
||
true
sleep
10
systemctl
stop
docker
kubelet
>/
dev
/
null
2
>&
1
||
true
umount
/
var
/
lib
/
docker
/
overlay2
2
>&
1
||
true
mount
"
$
device"
/
mnt
mv
/
var
/
lib
/
docker
/
overlay2
/* /mnt >/dev/null 2>&1 || true
umount /mnt
mount -a
systemctl start docker kubelet >/dev/null 2>&1 || true
fi
EOT
}
...
...
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