Anonymous | Login | 2024-11-21 21:23 EST |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||
0001317 | PacketFence | core | public | 2011-10-20 12:00 | 2012-10-29 15:02 | |||
Reporter | fgaudreault | |||||||
Assigned To | fgaudreault | |||||||
Priority | high | Severity | minor | Reproducibility | always | |||
Status | resolved | Resolution | fixed | |||||
Platform | OS | OS Version | ||||||
Product Version | 3.0.1 | |||||||
Target Version | 3.6.1 | Fixed in Version | devel | |||||
Summary | 0001317: Nodes are beeing unreg if expire_mode set to window and no unreg date is set | |||||||
Description | Problematic query : $node_statements->{'node_expire_window_sql'} = get_db_handle()->prepare( qq [ SELECT mac FROM node WHERE status="reg" AND unix_timestamp(regdate) + ? < unix_timestamp(now()) ] ); If you set no unregdate (0000-00-00 00:00:00) and you add 999w, it will always be lower than NOW(). The nodes will then be unregistered even if they should not. | |||||||
Tags | No tags attached. | |||||||
fixed in git revision | ad54619a893500d7d6febeb08094357048caa7ba | |||||||
fixed in mtn revision | ||||||||
Attached Files | ||||||||
Notes | |
(0002373) obilodeau (reporter) 2011-10-21 11:25 |
watch out, unregdate is not in the above query. So what is important is regdate + window < unix_timestamp( now() ). When you saw nodes being batch de-registered what did they had as a regdate? Why was it so low? |
(0002374) fgaudreault (viewer) 2011-10-21 14:41 |
You are right, my regdate was 0 since I registered my devices using raw SQL without updating that field with now(). However, the bug remains, if my regdate is 3 days ago, and my window is 2d, regardless the unregdate, I will still be unregistered. |
(0002484) obilodeau (reporter) 2011-12-22 11:15 |
Reducing severity since the feature works as intended. But we will still fix it by setting now + window to unregdate instead of looking at regdate because it gives more control to the administrators if they want to manually alter the unregdate. |
(0003263) fgaudreault (viewer) 2012-10-29 14:37 |
We should only rely on the unregdate. At the registration time, we set the proper unregdate if using mode deadline or mode window. We should NEVER base our decision regarding the regdate. A network admin should be allowed to mess with the unregdate manually. I will remove the unnecessary code in node_maintenance. |
(0003264) fgaudreault (viewer) 2012-10-29 15:02 |
Fixed in devel. Cleaned up some useless code. |
Issue History | |||
Date Modified | Username | Field | Change |
2011-10-20 12:00 | fgaudreault | New Issue | |
2011-10-20 12:01 | obilodeau | Status | new => assigned |
2011-10-20 12:01 | obilodeau | Assigned To | => obilodeau |
2011-10-21 11:25 | obilodeau | Note Added: 0002373 | |
2011-10-21 14:41 | fgaudreault | Note Added: 0002374 | |
2011-12-22 11:15 | obilodeau | Note Added: 0002484 | |
2011-12-22 11:15 | obilodeau | Severity | major => minor |
2012-10-19 14:19 | fgaudreault | Assigned To | obilodeau => |
2012-10-19 14:19 | fgaudreault | Target Version | => general |
2012-10-26 16:13 | fgaudreault | Target Version | general => 3.6.1 |
2012-10-29 14:37 | fgaudreault | Note Added: 0003263 | |
2012-10-29 15:02 | fgaudreault | git revision | => ad54619a893500d7d6febeb08094357048caa7ba |
2012-10-29 15:02 | fgaudreault | Note Added: 0003264 | |
2012-10-29 15:02 | fgaudreault | Status | assigned => resolved |
2012-10-29 15:02 | fgaudreault | Fixed in Version | => devel |
2012-10-29 15:02 | fgaudreault | Resolution | open => fixed |
2012-10-29 15:02 | fgaudreault | Assigned To | => fgaudreault |
Copyright © 2000 - 2012 MantisBT Group |