Skip to content

Commit a221a5d

Browse files
author
Mrunal Patel
authored
Merge pull request cri-o#1526 from giuseppe/system-container-use-bind-mount-prefix
syscontainers: use --bind-mount-prefix
2 parents 393429d + 5d05ae0 commit a221a5d

File tree

6 files changed

+33
-69
lines changed

6 files changed

+33
-69
lines changed

contrib/system_containers/centos/config.json.template

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -297,28 +297,6 @@
297297
"source": "/root",
298298
"type": "bind"
299299
},
300-
{
301-
"destination": "/home",
302-
"options": [
303-
"rbind",
304-
"rprivate",
305-
"rw",
306-
"mode=755"
307-
],
308-
"source": "/home",
309-
"type": "bind"
310-
},
311-
{
312-
"destination": "/mnt",
313-
"options": [
314-
"rbind",
315-
"rw",
316-
"rprivate",
317-
"mode=755"
318-
],
319-
"source": "/mnt",
320-
"type": "bind"
321-
},
322300
{
323301
"type": "bind",
324302
"source": "${RUN_DIRECTORY}",
@@ -413,6 +391,16 @@
413391
"source": "/dev",
414392
"type": "bind"
415393
},
394+
{
395+
"destination": "/host",
396+
"options": [
397+
"rbind",
398+
"rshared",
399+
"rw"
400+
],
401+
"source": "/",
402+
"type": "bind"
403+
},
416404
{
417405
"destination": "/sys",
418406
"options": [

contrib/system_containers/centos/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ printf %s $LABEL > /proc/self/attr/exec
88
test -e /etc/sysconfig/crio-storage && source /etc/sysconfig/crio-storage
99
test -e /etc/sysconfig/crio-network && source /etc/sysconfig/crio-network
1010

11-
exec /usr/bin/crio --log-level=$LOG_LEVEL
11+
exec /usr/bin/crio --bind-mount-prefix=/host --log-level=$LOG_LEVEL

contrib/system_containers/fedora/config.json.template

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -302,28 +302,6 @@
302302
"source": "/root",
303303
"type": "bind"
304304
},
305-
{
306-
"destination": "/home",
307-
"options": [
308-
"rbind",
309-
"rprivate",
310-
"rw",
311-
"mode=755"
312-
],
313-
"source": "/home",
314-
"type": "bind"
315-
},
316-
{
317-
"destination": "/mnt",
318-
"options": [
319-
"rbind",
320-
"rw",
321-
"rprivate",
322-
"mode=755"
323-
],
324-
"source": "/mnt",
325-
"type": "bind"
326-
},
327305
{
328306
"type": "bind",
329307
"source": "${RUN_DIRECTORY}",
@@ -418,6 +396,16 @@
418396
"source": "/dev",
419397
"type": "bind"
420398
},
399+
{
400+
"destination": "/host",
401+
"options": [
402+
"rbind",
403+
"rshared",
404+
"rw"
405+
],
406+
"source": "/",
407+
"type": "bind"
408+
},
421409
{
422410
"destination": "/sys",
423411
"options": [

contrib/system_containers/fedora/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ printf %s $LABEL > /proc/self/attr/exec
88
test -e /etc/sysconfig/crio-storage && source /etc/sysconfig/crio-storage
99
test -e /etc/sysconfig/crio-network && source /etc/sysconfig/crio-network
1010

11-
exec /usr/bin/crio --log-level=$LOG_LEVEL
11+
exec /usr/bin/crio --bind-mount-prefix=/host --log-level=$LOG_LEVEL

contrib/system_containers/rhel/config.json.template

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -292,28 +292,6 @@
292292
"source": "/root",
293293
"type": "bind"
294294
},
295-
{
296-
"destination": "/home",
297-
"options": [
298-
"rbind",
299-
"rprivate",
300-
"rw",
301-
"mode=755"
302-
],
303-
"source": "/home",
304-
"type": "bind"
305-
},
306-
{
307-
"destination": "/mnt",
308-
"options": [
309-
"rbind",
310-
"rw",
311-
"rprivate",
312-
"mode=755"
313-
],
314-
"source": "/mnt",
315-
"type": "bind"
316-
},
317295
{
318296
"type": "bind",
319297
"source": "${RUN_DIRECTORY}",
@@ -408,6 +386,16 @@
408386
"source": "/dev",
409387
"type": "bind"
410388
},
389+
{
390+
"destination": "/host",
391+
"options": [
392+
"rbind",
393+
"rshared",
394+
"rw"
395+
],
396+
"source": "/",
397+
"type": "bind"
398+
},
411399
{
412400
"destination": "/sys",
413401
"options": [

contrib/system_containers/rhel/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ printf %s $LABEL > /proc/self/attr/exec
88
test -e /etc/sysconfig/crio-storage && source /etc/sysconfig/crio-storage
99
test -e /etc/sysconfig/crio-network && source /etc/sysconfig/crio-network
1010

11-
exec /usr/bin/crio --log-level=$LOG_LEVEL
11+
exec /usr/bin/crio --bind-mount-prefix=/host --log-level=$LOG_LEVEL

0 commit comments

Comments
 (0)