Upgrade 2.2.6 to 2.3.5



  • Hi.

    I have a pfSense system running on 2.2.6 amd64 and the automatic system update feature tells me to upgrade to 2.3.5.
    I tried to do that but after the upgrading the system is not working anymore.

    Interfaces are not recognized anymore and on the console I get this stack strace:

    
    Fatal error: Call to undefined function pfSense_fsync() in /etc/inc/config.lib.inc on line 204
    
    Call Stack:
        0.0005    214144    1.    {main}() /etc/rc.banner:0
        0.0012    214960    2.    require_once('/etc/inc/config.inc') /etc/rc.banner:56
        0.0716    276896    3.    parse_config() /etc/inc/config.inc:219
        0.6563   2142864    4.    generate_config_cache() /etc/inc/config.lib.inc:175
    
    PHP ERROR: Type: 1, File: /etc/inc/config.lib.inc, Line: 204, Message: Call to undefined function pfSense_fsync()
    
    

    I also have this crash report:

    
    Crash report begins.  Anonymous machine information:
    amd64
    10.3-RELEASE-p22
    FreeBSD 10.3-RELEASE-p22 #0 352658d6e(RELENG_2_3): Tue Oct 24 05:06:11 CDT 2017     root@ce23-amd64-builder:/builder/pfsense-235/tmp/obj/builder/pfsense-235/tmp/FreeBSD-src/sys/pfSense
    
    Crash report details:
    
    PHP Errors:
    [15-Feb-2018 09:57:21 Europe/Rome] PHP Fatal error:  Call to undefined function pfSense_fsync() in /etc/inc/config.lib.inc on line 982
    [15-Feb-2018 09:57:21 Europe/Rome] PHP Stack trace:
    [15-Feb-2018 09:57:21 Europe/Rome] PHP   1\. {main}() /etc/rc.packages:0
    [15-Feb-2018 09:57:21 Europe/Rome] PHP   2\. install_package_xml() /etc/rc.packages:106
    [15-Feb-2018 09:57:21 Europe/Rome] PHP   3\. write_config() /etc/inc/pkg-utils.inc:788
    [15-Feb-2018 09:57:21 Europe/Rome] PHP   4\. backup_config() /etc/inc/config.lib.inc:593
    [15-Feb-2018 09:57:38 Europe/Rome] PHP Fatal error:  Call to undefined function pfSense_fsync() in /etc/inc/config.lib.inc on line 982
    [15-Feb-2018 09:57:38 Europe/Rome] PHP Stack trace:
    [15-Feb-2018 09:57:38 Europe/Rome] PHP   1\. {main}() /etc/rc.packages:0
    [15-Feb-2018 09:57:38 Europe/Rome] PHP   2\. install_package_xml() /etc/rc.packages:106
    [15-Feb-2018 09:57:38 Europe/Rome] PHP   3\. write_config() /etc/inc/pkg-utils.inc:788
    [15-Feb-2018 09:57:38 Europe/Rome] PHP   4\. backup_config() /etc/inc/config.lib.inc:593
    [15-Feb-2018 09:57:42 Europe/Rome] PHP Fatal error:  Call to undefined function pfsense_interface_listget() in /etc/inc/interfaces.inc on line 101
    [15-Feb-2018 09:57:42 Europe/Rome] PHP Stack trace:
    [15-Feb-2018 09:57:42 Europe/Rome] PHP   1\. {main}() -:0
    [15-Feb-2018 09:57:42 Europe/Rome] PHP   2\. haproxy_configure() -:5
    [15-Feb-2018 09:57:42 Europe/Rome] PHP   3\. haproxy_check_run() /usr/local/pkg/haproxy/haproxy.inc:1151
    [15-Feb-2018 09:57:42 Europe/Rome] PHP   4\. haproxy_writeconf() /usr/local/pkg/haproxy/haproxy.inc:2158
    [15-Feb-2018 09:57:42 Europe/Rome] PHP   5\. get_frontend_bindips() /usr/local/pkg/haproxy/haproxy.inc:1578
    [15-Feb-2018 09:57:42 Europe/Rome] PHP   6\. haproxy_interface_ip() /usr/local/pkg/haproxy/haproxy.inc:2380
    [15-Feb-2018 09:57:42 Europe/Rome] PHP   7\. haproxy_get_bindable_interfaces() /usr/local/pkg/haproxy/haproxy_utils.inc:110
    [15-Feb-2018 09:57:42 Europe/Rome] PHP   8\. get_interface_ip() /usr/local/pkg/haproxy/haproxy_utils.inc:164
    [15-Feb-2018 09:57:42 Europe/Rome] PHP   9\. get_failover_interface() /etc/inc/interfaces.inc:5488
    [15-Feb-2018 09:57:42 Europe/Rome] PHP  10\. get_real_interface() /etc/inc/interfaces.inc:6039
    [15-Feb-2018 09:57:42 Europe/Rome] PHP  11\. does_interface_exist() /etc/inc/interfaces.inc:4869
    [15-Feb-2018 09:57:42 Europe/Rome] PHP  12\. get_interface_arr() /etc/inc/interfaces.inc:118
    [15-Feb-2018 09:57:44 Europe/Rome] PHP Fatal error:  Call to undefined function pfSense_fsync() in /etc/inc/config.lib.inc on line 204
    [15-Feb-2018 09:57:44 Europe/Rome] PHP Stack trace:
    [15-Feb-2018 09:57:44 Europe/Rome] PHP   1\. {main}() /etc/rc.banner:0
    [15-Feb-2018 09:57:44 Europe/Rome] PHP   2\. require_once() /etc/rc.banner:56
    [15-Feb-2018 09:57:44 Europe/Rome] PHP   3\. parse_config() /etc/inc/config.inc:219
    [15-Feb-2018 09:57:44 Europe/Rome] PHP   4\. generate_config_cache() /etc/inc/config.lib.inc:175
    
    Filename: /var/crash/minfree
    2048
    
    

    I found this bug: https://redmine.pfsense.org/issues/8135#change-35821

    If this is happening only upgrading to 2.3.5, would it possible to upgrade to a previous version (for example 2.3.0) and then go up to 2.3.5 (finally I want to reach 2.4.x)?

    Thank you very much!
    Bye



  • Hi,

    The missing function "pfSense_fsync()" isn't a PHP function (I can't find it) thus probably compiled C code, the function is present in executable (bin file).
    Or, it should be there after a successful upgrade.
    But it isn't.
    Drive errors ? out of disk space, the upgrade failed ? Whatever.

    Instead of finding out why, take the 10 minutes shortcut.
    Install 2.3.5 (final 32 bits - supported a couple of month before final |.| ) or the future lane : 2.4.2 (64 bits).



  • Thank you for your answer!

    @Gertjan:

    Instead of finding out why, take the 10 minutes shortcut.
    Install 2.3.5 (final 32 bits - supported a couple of month before final |.| ) or the future lane : 2.4.2 (64 bits).

    How I can do this?
    The automatic upgrade wants to upgrade only to 2.3.5, not 2.4.2.


  • LAYER 8 Global Moderator

    "(finally I want to reach 2.4.x)?"

    Then why not just install that and be done with it… How convoluted is your config that it would take so much time to recreate.. Much of what could be loaded in via xml - with a bit of manipulation maybe if you had say hundreds of dhcp reservations or something, etc.

    Or you needed to create hundreds of vlans, etc.



  • @johnpoz:

    "(finally I want to reach 2.4.x)?"

    Then why not just install that and be done with it… How convoluted is your config that it would take so much time to recreate.. Much of what could be loaded in via xml - with a bit of manipulation maybe if you had say hundreds of dhcp reservations or something, etc.

    Or you needed to create hundreds of vlans, etc.

    I really don't prefer to do this, this should be the last choice.
    I have 10 different networks, many firewall rules, many haProxy frontends, VPN with user and passwords, and this would mean retest all the configuration.


  • Banned

    As it looks now the installation is already hosed, so a fresh install is the fastest and safest way to get back to a consistent system that won't barf on the next upgrade attempt.



  • @Grimson:

    As it looks now the installation is already hosed, so a fresh install is the fastest and safest way to get back to a consistent system that won't barf on the next upgrade attempt.

    The system is not hosed at the moment, because I rolled back to the pre-upgrade situation.
    I just wish to understand why the upgrade is not running well from 2.2.6 to 2.3.5 (I tried 3 times and got the same results).


  • Rebel Alliance Developer Netgate

    1. Remove packages as the upgrade guide suggests, this is especially important coming from anything pre-2.3 as the package format changed
    2. Upgrade
    3. Add back the packages you need



  • @jimp:

    1. Remove packages as the upgrade guide suggests, this is especially important coming from anything pre-2.3 as the package format changed
    2. Upgrade
    3. Add back the packages you need

    Thanks!
    I made a test and removing installed packages before upgrading made the upgrading work good!
    I have many HAProxy frontends and backends. Is there a way to backup and reimport them after I reinstalled it to the new system?
    I'm asking this because I don't see an "HAProxy" backup area.
    Will be enough to save and restore HAProxy configuration files directly? Will this restore all the configuration in the web interface too?


  • Rebel Alliance Developer Netgate

    The haproxy config won't be removed when you uninstall. That all stays in place. Once you reinstall haproxy the settings will all still be there.


Log in to reply