Ok, hacked it out to set some basic values and now the "class" db is populating. I've gotta get this thing set back up and capture some nodes, then I can play with it to see if my definition of "sane" works :^). Will submit diff once it's test.
BTW, you guys should submit the class update code to Obfuscated Perl contest, that thing was hidden down in there pretty darned good! Took me a couple of hours to figured out WHERE the values for that query were being generated. ;^) Don -----Original Message----- From: Don Greer [mailto:don.gr...@dptlabs.com] Sent: Friday, May 17, 2013 2:52 PM To: packetfence-devel@lists.sourceforge.net Subject: [PacketFence-devel] FW: [PacketFence-users] Possible bug in Violations on 4.0.0 Moving this over to Devel, as it does appear to be a bug. -----Original Message----- From: Don Greer [mailto:don.gr...@dptlabs.com] Sent: Friday, May 17, 2013 1:11 PM To: packetfence-us...@lists.sourceforge.net Subject: Re: [PacketFence-users] Possible bug in Violations on 4.0.0 Pardon me if this is duplicated... think I hit submit too quickly :^/. So I should have gone digging sooner. Looky what I found at the beginning of a set of failures: May 17 12:47:19 httpd.admin(0) INFO: "1300000" successfully modified (pfappserver::Base::Model::Config::update) May 17 12:47:19 httpd.admin(0) INFO: called reload_violation_config (pf::config::cached::reload_violation_config) May 17 12:47:19 httpd.admin(0) INFO: called file_reload_violation_config (pf::config::cached::file_reload_violation_config) May 17 12:47:19 httpd.admin(0) WARN: database query failed with: Column 'max_enables' cannot be null. (errno: 1048), will try again (pf::db::db_query_execute) May 17 12:47:19 httpd.admin(0) WARN: database query failed with: Column 'max_enables' cannot be null. (errno: 1048), will try again (pf::db::db_query_execute) May 17 12:47:19 httpd.admin(0) WARN: database query failed with: Column 'max_enables' cannot be null. (errno: 1048), will try again (pf::db::db_query_execute) May 17 12:47:19 httpd.admin(0) ERROR: Database issue: We tried 3 times to serve query class_add_sql called from pf::class::class_add and we failed. Is the database running? (pf::db::db_query_execute) May 17 12:47:19 httpd.admin(0) WARN: database query failed with: Cannot add or update a child row: a foreign key constraint fails (`pf`.`trigger`, CONSTRAINT `0_64` FOREIGN KEY (`vid`) REFERENCES `class` (`vid`) ON DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again (pf::db::db_query_execute) May 17 12:47:19 httpd.admin(0) WARN: database query failed with: Cannot add or update a child row: a foreign key constraint fails (`pf`.`trigger`, CONSTRAINT `0_64` FOREIGN KEY (`vid`) REFERENCES `class` (`vid`) ON DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again (pf::db::db_query_execute) May 17 12:47:19 httpd.admin(0) WARN: database query failed with: Cannot add or update a child row: a foreign key constraint fails (`pf`.`trigger`, CONSTRAINT `0_64` FOREIGN KEY (`vid`) REFERENCES `class` (`vid`) ON DELETE CASCADE ON UPDATE CASCADE). (errno: 1452), will try again (pf::db::db_query_execute) May 17 12:47:19 httpd.admin(0) ERROR: Database issue: We tried 3 times to serve query trigger_add_sql called from pf::trigger::trigger_add and we failed. Is the database running? (pf::db::db_query_execute) This is on a freshly loaded PF (wiped out the old one and started again). And sure enough, in the "Generic" violation (1300000) "Auto Enable" is unchecked and "Max Enables" is blank. So, what's the best way to handle this? Should I go set "Max Enables" to 0 on everything, or should we touch the schema to remove that NOT_NULL in the table def? ... So I attempted to enter something into "Max Enables" and then found I had NOT_NULL violations on "Auto Enable" and "Dynamic Window". Hmmmmm. Back to a similar choice, do we fix that in code or in the schema. I think the Schema is the best option, for maintainability, but I'm not cooking this goose. Guidance, please? Don ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ PacketFence-users mailing list packetfence-us...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/packetfence-users ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ PacketFence-devel mailing list PacketFence-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/packetfence-devel ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ PacketFence-devel mailing list PacketFence-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/packetfence-devel