Project

General

Profile

Actions

Bug #5873

closed

PHP error from upgrade_142_to_143() when run during rc.bootup

Added by Jim Pingle over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Configuration Upgrade
Target version:
Start date:
02/10/2016
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.3
Affected Architecture:
All

Description

On three systems I have seen an error during the reboot process in upgrade_142_to_143() when run from rc.bootup. Stack trace is:

[10-Feb-2016 08:31:20 America/New_York] PHP Stack trace:
[10-Feb-2016 08:31:20 America/New_York] PHP   1. {main}() /etc/rc.bootup:0
[10-Feb-2016 08:31:20 America/New_York] PHP   2. convert_config() /etc/rc.bootup:197
[10-Feb-2016 08:31:20 America/New_York] PHP   3. upgrade_142_to_143() /etc/inc/config.lib.inc:456

Though it does seem to convert the configuration OK if it happens when the system is up already (gitsync or run manually). Looks like at a minimum that function needs some is_array() tests on the vars before attempting a foreach.

Assigning to Steve B since the function is handling rule separator entries.

Actions #1

Updated by Jim Pingle over 8 years ago

More info: It does happen at gitsync but it requires having just the wrong thing in the config.

Config contains this:

                <separator>
                        <wan/>
                </separator>


Better PHP error:
Warning: Invalid argument supplied for foreach() in /etc/inc/upgrade_config.inc on line 4420

[...]
    4.3915    1288000   5. post_cvssync_commands() /usr/local/sbin/pfSsh.php(345) : eval()'d code:357
    4.4052    1288104   6. convert_config() /usr/local/sbin/pfSsh.php(345) : eval()'d code:376
    4.4396    2699400   7. upgrade_142_to_143() /etc/inc/config.lib.inc:456

Actions #2

Updated by Anonymous over 8 years ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Jim Pingle over 8 years ago

  • Status changed from Feedback to Resolved

Tested with a problem config on two systems, works fine now, thanks!

Actions

Also available in: Atom PDF