linuxserver / docker-couchpotato

http://linuxserver.io
GNU General Public License v3.0
154 stars 69 forks source link

Relaunched on docker 17.09.0-ce (in rancher) - bogus nospace issue on data dir #27

Closed TrueOsiris closed 6 years ago

TrueOsiris commented 6 years ago
Ubuntu 17.04 I'm using Rancher, but the launch command worked before without a problem. added a host os user with ids 1001, 1001 and passed those vars to the docker. It's just relaunching it after upgrading docker to docker 17.09.0-ce (from 17.05.0-ce) with the config kept in a volume, causing "Shutting down as CP needs some space to work. You\'ll get corrupted data otherwise. 0MB free" in the log The /config is a passed through volume on the dockerhost The /downloads is somewhere on the network as a cifs share, mounted on the dockerhost. Both are passed as volumes to the container. I don't know which layer is causing the issue. It might be - ubuntu OS - rancher - docker - your docker image not coping with the latest docker version - passed through shares and volumes Rights-wise, I double checked on every level. Workaround/Fix I disabled the freespace check in runner.py ` # Check available space try: total_space, available_space = getFreeSpace(data_dir) if available_space < 100: log.error('Shutting down as CP needs some space to work. You\'ll get corrupted data otherwise. Only %sMB left', available_space) return except: log.error('Failed getting diskspace: %s', traceback.format_exc())` changed to ` # Check available space try: total_space, available_space = getFreeSpace(data_dir) if available_space < 0: log.error('Shutting down as CP needs some space to work. You\'ll get corrupted data otherwise. Only %sMB left', available_space) return except: log.error('Failed getting diskspace: %s', traceback.format_exc())` All is working fine now. As I have like 200GB free in the /config folder (mounted volume), there's something wrong with the freespace check. Also when doing `df -h`, I'm not seeing the /config as separate entry, but this is probably normal. And I'm actually seeing the correct empty diskspace on the root. The /downloads entry is however present in this list. `root@Downloadstack-couchpotato-1.mydomain:/app/couchpotato$ df -h Filesystem Size Used Avail Use% Mounted on overlay 196G 6.6G 179G 4% / tmpfs 64M 0 64M 0% /dev tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup //10.10.0.3/downloads 11T 1.3T 9.3T 13% /downloads /dev/sda2 196G 6.6G 179G 4% /.r shm 64M 0 64M 0% /dev/shm `
TrueOsiris commented 6 years ago

Sorry about not keeping carriage-return/line-feed's in the codestrings. No idea on how to do that.

thelamer commented 6 years ago

The data directory it is checking is '/config/data' .

If you have Ubuntu as your base OS and Docker is installed why not just use it to create the container ?

docker create \
    --name=couchpotato \
    -v config:/config \
    -e PGID=1000 -e PUID=1000  \
    -e TZ=US/Pacific \
    -p 5050:5050 \
    linuxserver/couchpotato

If the volumes Rancher is creating are not reporting disk space I recommend reaching out to their community they will be much more helpful as they all use it daily vs a developer issue report.

https://forums.rancher.com/