Quota deletion / Crontabs reset. Bug ?

Report issues relating to bandwith monitoring, bandwidth quotas or QoS in this forum.

Moderator: Moderators

Post Reply
d3fz
Posts: 277
Joined: Sun Aug 28, 2016 7:34 pm

Quota deletion / Crontabs reset. Bug ?

Post by d3fz »

Hi there,

i was poking around with the Quotas section the other day, and i found something strange.

I´ve set my router to reboot every day at 5am, and out of nowhere, it simply stopped rebooting. Then i remembered i've added and deleted some quotas the day before, so i took a closer look.

This is my default /etc/crontabs/root file with no active quotas:

Code: Select all

0,1,11,21,31,41,51 * * * * /usr/bin/set_kernel_timezone >/dev/null 2>&1
0 5 * * * sh /usr/lib/gargoyle/reboot.sh
After adding the first (and only) quota rule, and then clicking 'Save Changes', /etc/crontabs/root now looks like this:

Code: Select all

0,1,11,21,31,41,51 * * * * /usr/bin/set_kernel_timezone >/dev/null 2>&1
0 5 * * * sh /usr/lib/gargoyle/reboot.sh

0 0,4,8,12,16,20 * * * /usr/bin/backup_quotas >/dev/null 2>&1
0 0,4,8,12,16,20 * * * /tmp/bw_backup/do_bw_backup.sh
So far, so good. I can add and delete another quotas, click 'Save Changes' and there's no problem. But as soon as i delete all of them, or the only active quota, and then 'Save Changes', i lose all my schedule tasks in Crontabs.

This is what /etc/crontabs/root looks like after that:

Code: Select all

0 0,4,8,12,16,20 * * * /tmp/bw_backup/do_bw_backup.sh
Is this a bug or an expected behavior ? Can anyone else confirm this ?

I'm running Gargoyle 1.9.X (Built 20160714-0844 git@9b75d12) on a TP-Link TL-WR842N/ND v2.
TP-Link Archer C7 v2 - Gargoyle 1.12.X
TP-Link WR842ND v2 - Gargoyle 1.10.X
TP-Link RE450 AC v2 - Stock FW 1.0.4
TP-Link WA850RE v1.2 - LEDE 17.01.1

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Quota deletion / Crontabs reset. Bug ?

Post by Lantis »

Absolutely a bug. Thanks for pointing it out. :)
I'm just testing now but i believe i've fixed it.
I expect this has been a longstanding issue that has been in gargoyle since its inception and gone unnoticed.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

d3fz
Posts: 277
Joined: Sun Aug 28, 2016 7:34 pm

Re: Quota deletion / Crontabs reset. Bug ?

Post by d3fz »

Thank you for fixing it so quickly, Lantis. Glad i could help.
TP-Link Archer C7 v2 - Gargoyle 1.12.X
TP-Link WR842ND v2 - Gargoyle 1.10.X
TP-Link RE450 AC v2 - Stock FW 1.0.4
TP-Link WA850RE v1.2 - LEDE 17.01.1

Post Reply