Merge pull request #271 from zhongyehong/master

change the mode of tmp dir to 777,to fix a warning causing by apt.
This commit is contained in:
zhong yehong 2017-10-12 18:21:09 +08:00 committed by GitHub
commit a8afe7c250
4 changed files with 9 additions and 6 deletions

View File

@ -185,11 +185,14 @@ IP=%s
if Ret == 0:
logger.info("start ssh and jupyter notebook services for container %s success" % lxc_name)
return [True, "start container services success"]
else:
logger.error('start services for container %s failed:jupyter' % lxc_name)
return [False, "start services for container failed:jupyter"]
else:
logger.info("start ssh service for container %s success" % lxc_name)
return [True, "start container services success"]
logger.error('start services for container %s failed' % lxc_name)
return [False, "start services for container failed"]
logger.error('start services for container %s failed:ssh' % lxc_name)
return [False, "start services for container failed:ssh"]
# mount_container: mount base image and user image by aufs
def mount_container(self,lxc_name):

View File

@ -155,7 +155,7 @@ class ImageMgr():
self.prepareImage(user,image,layer)
logger.info("image has been prepared")
sys_run("mount -t aufs -o br=%s=rw:%s/local/basefs=ro+wh -o udba=reval none %s/" % (layer,self.NFS_PREFIX,rootfs),True)
sys_run("mkdir -p %s/local/temp/%s" % (self.NFS_PREFIX,lxc))
sys_run("mkdir -m 777 -p %s/local/temp/%s" % (self.NFS_PREFIX,lxc))
except Exception as e:
logger.error(e)

View File

@ -18,7 +18,7 @@ apt-get update
echo "$MASTER_IP docklet-master" >> /etc/hosts
#下载git包
apt-get install git
apt-get -y install git
#下载docklet源码
git clone http://github.com/unias/docklet.git /home/docklet
@ -42,7 +42,7 @@ cp /home/docklet/conf/docklet.conf.template /home/docklet/conf/docklet.conf
NETWORK_DEVICE=`route | grep default | awk {'print $8'};`
#更改配置文件
echo "DISKPOOL_SIZE=100000
echo "DISKPOOL_SIZE=10000
ETCD=$MASTER_IP:2379
NETWORK_DEVICE=$NETWORK_DEVICE
PORTAL_URL=http://iwork.pku.edu.cn

View File

@ -8,7 +8,7 @@
DAEMON_USER=root
# settings for docklet worker
DAEMON=/usr/local/bin/jupyterhub-singleuser
DAEMON=`which jupyterhub-singleuser`
DAEMON_NAME=jupyter
# The process ID of the script when it runs is stored here:
PIDFILE=/home/jupyter/$DAEMON_NAME.pid