jonschipp / ISLET

Isolated, Scalable, & Lightweight Environment for Training
Other
111 stars 18 forks source link

Already in use after user deletion #69

Open jonschipp opened 8 years ago

jonschipp commented 8 years ago

Reproducibility:

  1. Create a new user
  2. Launch environment
  3. Run del_user plugin
  4. Create user with same name as in step 1
  5. Launch same environment as in step 1

ATA[0000] Error response from daemon: Conflict. The name "argus.cock" is already in use by container 0779d6e39429. You have to delete (or rename) that container to be able to reuse that name.

We need to remove the user's containers after account deletion.

More info

shell: CLIENT=10.0.2.2 SRCPORT=60599 SERVER=10.0.2.15 DSTPORT=22 SSH_TTY=/dev/pts/3 TERM=xterm PPID=14539 TMOUT=60
opt: docker run --name=argus.cock --tty --hostname argus --cpu-shares 1024 --cpuset-cpus 0 --memory 256m --memory-swap 10m  --net none --dns 127.0.0.1 --add-host argus:127.0.0.1   -v /exercises:/exercises:ro  --cap-drop AUDIT_WRITE --cap-drop CHOWN --cap-drop DAC_OVERRIDE --cap-drop FOWNER --cap-drop FSETID --cap-drop MAC_OVERRIDE --cap-drop MKNOD --cap-drop NET_BIND_SERVICE --cap-add NET_RAW --cap-drop SYSLOG --cap-drop SYS_ADMIN --cap-drop SYS_CHROOT --cap-drop KILL --cap-add SETFCAP --cap-add SETUID --cap-add SETGID --cap-drop AUDIT_CONTROL --cap-drop BLOCK_SUSPEND --cap-drop DAC_READ_SEARCH --cap-drop IPC_LOCK --cap-drop IPC_OWNER --cap-drop LEASE --cap-drop LINUX_IMMUTABLE --cap-add NET_ADMIN --cap-drop NET_BROADCAST --cap-drop SYS_BOOT --cap-drop SYS_MODULE --cap-drop SYS_PACCT --cap-drop SYS_PTRACE --cap-drop SYS_NICE --cap-drop SYS_RAWIO --cap-drop SYS_RESOURCE --cap-drop SYS_TIME --cap-drop SYS_TTY_CONFIG --cap-drop WAKE_ALARM  --workdir /home/demo  --env IMAGE --env PLATFORM  --interactive jonschipp/islet-argus su demo
Enjoy yourself!
Training materials are in /exercises
WARNING: Localhost DNS setting (--dns=127.0.0.1) may fail in containers.
FATA[0000] Error response from daemon: Conflict. The name "argus.cock" is already in use by container 0779d6e39429. You have to delete (or rename) that container to be able to reuse that name.
Failed to run! Turn on debug mode for more info: DEBUG=yes in /etc/islet/islet.conf
Connection to 127.0.0.1 closed.