scyto / multicast-relay

multicast-relay docker for UniFi Dream Machines
MIT License
52 stars 12 forks source link

Request to disable verbose logging by default #6

Closed MarkBurchard closed 2 years ago

MarkBurchard commented 3 years ago

The verbose logging creates a large logfile (>500MB) (Found on the UDM Base at /mnt/data/podman/storage/overlay-containers//userdata/ctr.log)

The UDM Base has 12GB internal storage. A ~500MB logfile represents roughly 8-10% of the available free space on the /mnt/data partition, which makes me nervous. It's become an ingrained habit to truncate CTR.log every few days.

Alternately, is there a way to launch the container with verbose logging turned off that would persist over restarts/reboots?

scyto commented 3 years ago

it only logs to stdout - i wonder if something changed on the unifios podman instance to log that to a file? AFAIK it never used to do that, at least no one has ever reported it, and i don't recall seeing it. (if this is the case this will be an issue for many community containers...)

I can change the default on the verbose but will need to rebuild;

scyto commented 3 years ago

@MarkBurchard I pushed a new build, can you see if that turned off the verbose env var?

MarkBurchard commented 3 years ago

Pulled the new build. The logfile is at 12MB after ~2 hours. That seems like an improvement but I'll check the growth delta again tomorrow to be certain.

The actual content of the log output looks the same to me but since I don't have a copy of the pre-change logs I can't say for sure.

Thanks for taking a look at this. I'll post an update tomorrow.

scyto commented 3 years ago

thanks for doing that, can you shell into the container (or docker inspect) and make sure the env var didn't get set - that will validate verbose got turned off (if i have time i will try and look over weekend too).

MarkBurchard commented 3 years ago

So at ~21 hours ctr.log is 60MB. I can't quantify the reduction in logfile size but that is definitely lower than the rate of +500MB every 3 to 4 days.

I tried to log into the container but got a cgroups error that I'm still troubleshooting. When I run a ps I still see the verbose OPT (which I omitted from my initial run command):

ps -ef | grep verbose

5697 root grep verbose 29246 root python3 ./multicast-relay/multicast-relay.py --interfaces br5 br10 --foreground --verbose

So it seems like the problem is solved or at least greatly mitigated and I'm good with that but I'm still puzzled as to the mechanics of it ;-) If I find time I'll try to dig into a little further but for now I'm perfectly happy to be the beneficiary of mysterious good luck...

Thanks again for looking into this.

scyto commented 2 years ago

closing as resolved, if more changes are needed open a new issue, thanks for the feedback!