Project

General

Profile

Bug #9083

Config upgrade issue with empty IPsec P1

Added by Jim Pingle 5 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Upgrade
Target version:
Start date:
10/31/2018
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.4
Affected Architecture:
All

Description

An older configuration will fail to upgrade with an incomplete or empty IPsec Phase 1 section:

    <ipsec>
        <phase1></phase1>
        <logging>
            [...]
        </logging>
    </ipsec>

This generates a PHP error during the upgrade process, which then fails:

Fatal error: Uncaught Error: Cannot use string offset as an array in /etc/inc/upgrade_config.inc:5502
Stack trace:
#0 /etc/inc/config.lib.inc(378): upgrade_174_to_175()
#1 /etc/rc.bootup(125): convert_config()
#2 {main}
  thrown in /etc/inc/upgrade_config.inc on line 5502

Associated revisions

Revision 024e5de2 (diff)
Added by Jim Pingle 5 months ago

Skip empty IPsec P1 during upgrade to 17.5. Fixes #9083

Revision 1f7ea9ce (diff)
Added by Jim Pingle 5 months ago

Skip empty IPsec P1 during upgrade to 17.5. Fixes #9083

(cherry picked from commit 024e5de242661219bb8a62f183b1601cec44aa3c)

History

#1 Updated by Jim Pingle 5 months ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

#2 Updated by Vladimir Lind 4 months ago

On 2.4.5-DEVELOPMENT (amd64) built on Wed Oct 03 17:24:18 EDT 2018 edited config.xml - cut out content between <phase1></phase1> of existing ipsec p1 instance, saved changes. Then run rm /tmp/config.cache. After that started upgrade to latest snap. Upgrade to "Wed Nov 14 23:01:04 EST 2018" finished successfully.

#3 Updated by James Dekker 4 months ago

  • Status changed from Feedback to Resolved

Tested on 2.4.4, was able to reproduce the bad behavior. Tested on 2.4.5.a.20181116.1325 and the behavior could not be reproduced, looks good.

Also available in: Atom PDF