PacketFence - BTS - PacketFence |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0001154 | PacketFence | core | public | 2011-01-18 06:03 | 2011-10-25 09:01 |
|
Reporter | maikel | |
Assigned To | fgaudreault | |
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | 2.0.0 | |
Target Version | 2.2.0 | Fixed in Version | 2.2.0 | |
fixed in git revision | |
fixed in mtn revision | 81801f7674995800842eb8514a054f032034529f |
|
Summary | 0001154: Violation grace timer |
Description | In violations.conf the grace timer is set as 120m
Though in the class table in the database, that figure is stored as 120 instead of the expected 7200
Hence when a violation is closed. The user expects 2 hours grace time, instead he gets 2 minutes.
Storing the grace timer as 7200 seconds in the ui and in violations.conf fixes this issue.
Also interesting is that when a grace timer is edited. The class table only gets updated after packetfence gets restarted, while this should be a quite dynamical figure.
|
Steps To Reproduce | |
Additional Information | |
Tags | Code Review |
Relationships | |
Attached Files | 0001154.patch (3,788) 2011-03-23 17:26 https://www.packetfence.org/bugs/file_download.php?file_id=86&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2011-01-18 06:03 | maikel | New Issue | |
2011-01-18 09:17 | obilodeau | Note Added: 0001810 | |
2011-01-18 09:17 | obilodeau | Target Version | => 2.0.1 |
2011-01-26 15:30 | obilodeau | Target Version | 2.0.1 => 2.0.2 |
2011-03-03 15:19 | obilodeau | Target Version | 2.0.2 => +1 |
2011-03-23 17:03 | fgaudreault | Note Added: 0001985 | |
2011-03-23 17:04 | fgaudreault | File Added: 0001154.patch | |
2011-03-23 17:04 | fgaudreault | Tag Attached: Code Review | |
2011-03-23 17:04 | fgaudreault | Status | new => assigned |
2011-03-23 17:04 | fgaudreault | Assigned To | => fgaudreault |
2011-03-23 17:04 | fgaudreault | Status | assigned => feedback |
2011-03-23 17:26 | fgaudreault | File Deleted: 0001154.patch | |
2011-03-23 17:26 | fgaudreault | File Added: 0001154.patch | |
2011-03-23 17:26 | fgaudreault | Note Edited: 0001985 | |
2011-03-23 17:27 | fgaudreault | Note Added: 0001986 | |
2011-05-02 18:22 | obilodeau | mtn revision | => 81801f7674995800842eb8514a054f032034529f |
2011-05-02 18:22 | obilodeau | Note Added: 0002049 | |
2011-05-02 18:22 | obilodeau | Status | feedback => resolved |
2011-05-02 18:22 | obilodeau | Fixed in Version | => trunk |
2011-05-02 18:22 | obilodeau | Resolution | open => fixed |
2011-05-04 11:33 | obilodeau | Fixed in Version | trunk => 2.2.0 |
2011-05-04 11:40 | obilodeau | Status | resolved => closed |
2011-10-25 09:01 | obilodeau | Target Version | +1 => 2.2.0 |
Notes |
|
|
Thanks for the report! Targeted for 2.0.1.
As for the 'only gets updated after packetfence gets restarted', this is by current design. Config files are parsed and merged in the class tables (class, trigger, ...) only on the reload of a major packetfence daemon.
I know it's a hassle and it shouldn't be that way but it's not a bug. Please open an issue with feature severity and explain the behavior you would like to have. |
|
|
(0001985)
|
fgaudreault
|
2011-03-23 17:03
(edited on: 2011-03-23 17:26) |
|
Here is a patch I made to support those formats. Apply on vanilla 2.1.0 :
### (only numbers), we consider that it's in seconds
###s (numbers + trailing s), seconds
###m (numbers + trailing m), minutes
###h (numbers + trailing h), hours
###w (numbers + trailing m), months
###y (numbers + trailing y), years
If we have an unsupported grace timer (ie. 111patate), PF will break at start time.
Let me know what you think.
NB. Theres a bunch of code in lib/pf/pfcmd/checkup.pm that will overlap the patch from ticket 000992
|
|
|
(0001986)
|
fgaudreault
|
2011-03-23 17:27
|
|
Uploaded a new patch. I now use our global normalize_time sub instead of my own stuff. |
|
|
|
fix committed. Note that I have *not* committed the checkup portion because an empty grace would have generated an error. |
|