PacketFence
Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001154PacketFencecorepublic2011-01-18 06:032011-10-25 09:01
Reportermaikel 
Assigned Tofgaudreault 
PrioritynormalSeveritytweakReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.0.0 
Target Version2.2.0Fixed in Version2.2.0 
Summary0001154: Violation grace timer
DescriptionIn 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.



TagsCode Review
fixed in git revision
fixed in mtn revision81801f7674995800842eb8514a054f032034529f
Attached Filespatch file icon 0001154.patch [^] (3,788 bytes) 2011-03-23 17:26 [Show Content]

- Relationships

-  Notes
(0001810)
obilodeau (reporter)
2011-01-18 09:17

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 (viewer)
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 (viewer)
2011-03-23 17:27

Uploaded a new patch. I now use our global normalize_time sub instead of my own stuff.
(0002049)
obilodeau (reporter)
2011-05-02 18:22

fix committed. Note that I have *not* committed the checkup portion because an empty grace would have generated an error.

- 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


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker