Bug #6920
Upgrading to 2.4 with a stale package .inc file can prevent the system from fully booting after upgrade
100%
Description
I upgraded a 2.3 VM that had recently had FreeRADIUS installed, but removed. The old freeradius.inc was somehow left behind.
When the system attempted to boot after the 2.4 upgrade it stopped partway through booting and presented a login prompt. Just above was this:
[11-Nov-2016 22:12:16 America/New_York] PHP Warning: require_once(xmlrpc.inc): failed to open stream: No such file or directory in /usr/local/pkg/freeradius.inc on line 40 [11-Nov-2016 22:12:16 America/New_York] PHP Stack trace: [11-Nov-2016 22:12:16 America/New_York] PHP 1. {main}() /etc/rc.bootup:0 [11-Nov-2016 22:12:16 America/New_York] PHP 2. filter_configure_sync() /etc/rc.bootup:217 [11-Nov-2016 22:12:16 America/New_York] PHP 3. filter_nat_rules_generate() /etc/inc/filter.inc:265 [11-Nov-2016 22:12:16 America/New_York] PHP 4. discover_pkg_rules() /etc/inc/filter.inc:2344 [11-Nov-2016 22:12:16 America/New_York] PHP 5. require_once() /etc/inc/filter.inc:4211 [11-Nov-2016 22:12:16 America/New_York] PHP Fatal error: require_once(): Failed opening required 'xmlrpc.inc' (include_path='.:/etc/inc:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg:/usr/local/www/classes:/usr/local/www/classes/Form:/usr/local/share/pear') in /usr/local/pkg/freeradius.inc on line 40
That file has been replaced/moved on 2.4 so the old reference is invalid. The package wasn't installed, so it wasn't reinstalled to get an updated copy.
We may want to sanity check that there aren't any files present in /usr/local/pkg/ which might reference xmlrpc.inc or other removed files.
Associated revisions
Fix #6920: Do not include stale .inc files
Packages can declare a function called $pkgname_generate_rules() and it
will be executed during filter reload process and add the hability to
package insert necessary firewall rules. Code was listing all files
/usr/local/pkg/*.inc and processing all of them without any kind of
check, what lead to the error reported in #6920.
Change the code to read only .inc files that belongs to currently
installed packages.
Ticket #6920: Use filter_rule_function tag to detect function name
History
#1
Updated by Jim Thompson about 4 years ago
- Assignee set to Renato Botelho
#2
Updated by Renato Botelho about 4 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset fef29f5aee32899b72886f8a0c00205bf0f2fc09.
#3
Updated by Jim Pingle about 4 years ago
- Status changed from Feedback to Resolved
Seems to be fixed now. I put a file in /usr/local/pkg/ that would work on 2.3.3 and break on 2.4, and it did not affect the upgrade.
Fix #6920: Do not include stale .inc files
Packages can declare a function called $pkgname_generate_rules() and it
will be executed during filter reload process and add the hability to
package insert necessary firewall rules. Code was listing all files
/usr/local/pkg/*.inc and processing all of them without any kind of
check, what lead to the error reported in #6920.
Change the code to read only .inc files that belongs to currently
installed packages.