vyshane / kid

Utility to launch Kubernetes in Docker
Apache License 2.0
141 stars 31 forks source link

set -e causes kid to fail #13

Open LordGaav opened 8 years ago

LordGaav commented 8 years ago

When using kid up, the following output is generated:

$ ./kid up
WARNING: No swap limit support
WARNING: No swap limit support

When adding set -x to the script, the following is outputted:

$ ./kid up
+ '[' up == up ']'
+ start_kubernetes 1.3.2 8080 31999 cluster.local 10.0.0.10
+ local kubernetes_version=1.3.2
+ local kubernetes_api_port=8080
+ local dashboard_service_nodeport=31999
+ local dns_domain=cluster.local
+ local dns_server_ip=10.0.0.10
+ check_prerequisites
+ require_command_exists kubectl
+ command -v kubectl
+ require_command_exists docker
+ command -v docker
+ require_command_exists socat
+ command -v socat
+ docker info
WARNING: No swap limit support
+ '[' 0 '!=' 0 ']'
++ active_docker_machine
++ docker-machine active
++ [[ 1 == 0 ]]
+ '[' -n ']'
+ fix_shared_mount /
+ path=/
+ docker run -it --rm --entrypoint=sh --privileged --net=host -e sysimage=/host -v /:/host -v /dev:/dev -v /run:/run gcr.io/google_containers/hyperkube-amd64:v1.3.2 -c 'nsenter --mount=$sysimage/proc/1/ns/mnt -- mount --make-shared /'
+ docker info
+ egrep -q 'Kernel Version: .*-moby'
WARNING: No swap limit support

It looks like the re-introduction of set -e in 73ed5770dc3b9dd0ab83792c5d03ee8332981bec causes the script to fail on https://github.com/vyshane/kid/blob/73ed5770dc3b9dd0ab83792c5d03ee8332981bec/kid#L45 .

Removing the set -e allows kid up to run successfully.

vyshane commented 8 years ago

Okay, I've removed the offending set -e.

mongrelion commented 7 years ago

If the offending set -e has been removed then I think we can close this issue @vyshane