Quotas disappeared

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

Moderator: Moderators

Post Reply
maphew
Posts: 22
Joined: Tue Oct 13, 2015 3:10 am

Quotas disappeared

Post by maphew »

This evening I edited one of the existing quotas which applied to an IP range, to change the throttling rates. After I saved and applied changes all of the range rules disappeared, leaving only 2 ALL rules. I then rebooted the router, and now there are no quotas at all. This has happened 2 or 3 times before, several months ago.

Based on viewtopic.php?f=12&t=5056 I had a look at

Code: Select all

/overlay/upper/usr/data/quotas
via ssh, and all of the old rules are still present.

Code: Select all

root@gateway:/overlay/upper/usr/data/quotas# ls
quota_192.168.1.121-192.168.1.140_combined
quota_192.168.1.141-192.168.1.160_combined
quota_192.168.1.161-192.168.1.180_combined
quota_192.168.1.99-192.168.1.120_combined
quota_ALL_OTHERS_INDIVIDUAL_A_combined
quota_ALL_combined
And don't appear (to me) to be malformed:

Code: Select all

root@gateway:/overlay/upper/usr/data/quotas# cat *
1509248551
0.0.0.0         4291379352
1509248551
0.0.0.0         14502371026
1509248551
0.0.0.0         14214741734
1509248551
0.0.0.0         13080820529
1509248551
192.168.1.3     304
192.168.1.50    0
192.168.1.202   21296
192.168.1.203   0
192.168.1.206   0
192.168.1.219   0
192.168.1.237   0
192.168.1.242   0
192.168.1.249   0
1509252430
0.0.0.0         191973669519
The quota management page now:
Image

Device Name:gateway
Gargoyle Version:1.9.2
Model:TP-Link Archer C7 v2
Device Configuration:Gateway
Memory Usage:42.4MB / 123.1MB (34.4%)
Connections:350/4096
CPU Load Averages:0.08 / 0.08 / 0.08 (1/5/15 minutes)

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

Re: Quotas disappeared

Post by Lantis »

Those are the quota statuses, not the configuration for the quota itself.

This commonly happens with multiple tabs/windows open.
You unfortunately can’t recover them at this point.
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.

maphew
Posts: 22
Joined: Tue Oct 13, 2015 3:10 am

Re: Quotas disappeared

Post by maphew »

Lantis wrote:Those are the quota statuses, not the configuration for the quota itself.

This commonly happens with multiple tabs/windows open.
You unfortunately can’t recover them at this point.
Urgh. Ok, thanks. That's bad news about multiple tabs. When working out quota adjustments I usually have a 2nd open to look at the usage distribution, and a 3rd for ip assignments. (I have a hard time remembering which users/machines are in which ip range.)

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

Re: Quotas disappeared

Post by Lantis »

Definitely understand where you’re coming from.
Unfortunately it’s a single instance interface
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.

maphew
Posts: 22
Joined: Tue Oct 13, 2015 3:10 am

Re: Quotas disappeared

Post by maphew »

I've got things back to where they were before, and learned that the location of the quota rules appears to be `/etc/config/firewall`. Edit that file and add something like the below is enough to have the rule show up in the web interface (`http://gateway.example.net/quotas.sh`)
I don't know if that's safe, so for for good measure after editing the file and I load the web page and hit [save changes].

Code: Select all

config quota 'quota_5'
        option combined_limit '12884901888'
        option exceeded_up_speed '64'
        option exceeded_down_speed '128'
        option reset_interval 'week'
        option ip '192.168.1.121-192.168.1.139'
        option id '192.168.1.121-192.168.1.139'
        option enabled '1'
I'm curious about the `option id` line. Where is that used/re-used? Could I change that to something meaningful like `option id 'Kids: .121 to .139'`?

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

Re: Quotas disappeared

Post by Lantis »

No, please don’t edit that option.
It is used internally for loading iptables modules.
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.

maphew
Posts: 22
Joined: Tue Oct 13, 2015 3:10 am

Re: Quotas disappeared

Post by maphew »

Through testing and extended waiting to see if something unexpected broke I figured out that changing `config quota 'quota_3'` to something like `config quota 'the_kids'` works.

This helps me when I edit the file manually through ssh but it's not exposed anywhere in the web UI. Is that something that can be changed?

pkkrusty
Posts: 45
Joined: Mon Jan 13, 2020 4:41 pm

Re: Quotas disappeared

Post by pkkrusty »

Lantis wrote:Those are the quota statuses, not the configuration for the quota itself.

This commonly happens with multiple tabs/windows open.
You unfortunately can’t recover them at this point.
I've had this happen a few times also, and had to rebuild the quota list. Can you give any more specifics on behavior to avoid? I only had one window open, but was impatient waiting for a DHCP assighment to save, and edited the URL to go straight to the quota page to enter that, and noticed that 70% were missing. Do I need to wait the 45 seconds for the tables to get fully re-written before I navigate somewhere else?

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

Re: Quotas disappeared

Post by Lantis »

Yes, absolutely.
Many functions cause the firewall to restart and reload configuration. If you start another function midway through this, you're asking for trouble.
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.

Post Reply