PacketFence - BTS - PacketFence
View Issue Details
0001757PacketFenceweb adminpublic2014-01-13 10:242014-01-14 10:27
caralo 
francis 
normalminoralways
resolvedfixed 
LinuxDebian7 (Wheezy)
4.1.0 
4.1.1 
dff8c1fbc9ff850cd50f7d705af36eb97f3e29c9
0001757: httpd.admin Error when applied role in nodes action menu
 When you select a node in the Nodes tab and try to apply a new role in the action menu, the node role gets changed but it doesnt evaluate the new role. So it doesnt change the vlan if it has to.
 If you examine packetfence.log, you can see:

 httpd.admin(0) ERROR: Odd number of elements in hash assignment at /usr/local/pf/html/pfappserver/lib/pfappserver/Base/Action/AdminRole.pm line 30.
 (pfappserver::__ANON__)

If you change the node role directly pressing in the mac, everything works as expected.
Web gui -> Nodes Tab -> select one or more nodes
Action menu -> Apply role -> Select any Role
No tags attached.
Issue History
2014-01-13 10:24caraloNew Issue
2014-01-13 19:01dbsanchNote Added: 0003486
2014-01-14 03:50caraloNote Added: 0003487
2014-01-14 07:57fdurandNote Added: 0003488
2014-01-14 08:54caraloNote Added: 0003489
2014-01-14 10:27francisfixed in git revision => dff8c1fbc9ff850cd50f7d705af36eb97f3e29c9
2014-01-14 10:27francisNote Added: 0003490
2014-01-14 10:27francisStatusnew => resolved
2014-01-14 10:27francisFixed in Version => 4.1.1
2014-01-14 10:27francisResolutionopen => fixed
2014-01-14 10:27francisAssigned To => francis
2014-01-14 10:27francisNote Deleted: 0003490

Notes
(0003486)
dbsanch   
2014-01-13 19:01   
Resolved: the my.conf file had been changed to force a recovery and never changed back to the default value ('0').

[mysqld]
innodb_force_recovery = 4

As a safety measure, InnoDB prevents users from performing INSERT, UPDATE, or DELETE operations when innodb_force_recovery is greater than 0.
--------------------------------------------------------------------------------
Resolution:

[mysqld]
innodb_force_recovery = 0
(0003487)
caralo   
2014-01-14 03:50   
I have connected to mysql database and the system variable innodb_force_recovery was 0. Just in case it was not right, I have forced "innodb_force_recovery = 0" in my.cnf but I still get the same error.
(0003488)
fdurand   
2014-01-14 07:57   
Hello,
if you want to be able to reƩvaluate the vlan after changing the role then you can apply this patch:
https://github.com/inverse-inc/packetfence/pull/117/files [^]

Fabrice
(0003489)
caralo   
2014-01-14 08:54   
I have applied the patch and but it doesnt work. I think that the problem is previous to reevaluation. It has to do with:

 httpd.admin(0) ERROR: Odd number of elements in hash assignment at /usr/local/pf/html/pfappserver/lib/pfappserver/Base/Action/AdminRole.pm line 30.
 (pfappserver::__ANON__)

The role change (and reevaluation) works perfectly if you change the role in the menu that opens when you press the mac of a node. But in this case you have to change the role one by one. If you want to change the role of many nodes at the same time, you should use the action menu but it doesnt work (changes the role but not the vlan)