Getting the workdir of docker by CONF
Change-Id: Ie605dd07b3cc4e117a431f6648d4a5385057a86e
This commit is contained in:
parent
dbcd282f77
commit
646d2548df
@ -20,8 +20,10 @@ from oslo_log import log as logging
|
|||||||
from zun.common import consts
|
from zun.common import consts
|
||||||
from zun.common import exception
|
from zun.common import exception
|
||||||
from zun.common import utils
|
from zun.common import utils
|
||||||
|
import zun.conf
|
||||||
from zun.container.docker import utils as docker_utils
|
from zun.container.docker import utils as docker_utils
|
||||||
|
|
||||||
|
CONF = zun.conf.CONF
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@ -74,10 +76,10 @@ class Host(object):
|
|||||||
if backing_filesystem == 'xfs':
|
if backing_filesystem == 'xfs':
|
||||||
# Check project quota mount option
|
# Check project quota mount option
|
||||||
try:
|
try:
|
||||||
utils.execute(
|
cmd = "mount |grep $(df " + CONF.docker.docker_data_root + \
|
||||||
"mount | grep $(df /var/lib/docker | "
|
" |awk 'FNR==2 {print $1}') | grep 'xfs'" \
|
||||||
"awk 'FNR==2 {print $1}') |grep 'xfs' |"
|
" |grep 'pquota|prjquota'"
|
||||||
" grep -E 'pquota|prjquota'", shell=True)
|
utils.execute(cmd, shell=True)
|
||||||
except exception.CommandError:
|
except exception.CommandError:
|
||||||
sp_disk_quota = False
|
sp_disk_quota = False
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user