change the mode of tmp dir to 777,to fix a warning causing by apt.
add some error message when start service failed. change the start_jupyter.sh, use `which jupyterhub-single` to get the position of jupyterhub-single
This commit is contained in:
parent
0e4555fe55
commit
d71838c3d7
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue