Project

General

Profile

Bug #5448

Packages not being reinstalled after upgrade from 2.2.x

Added by Stilez y over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
Package System
Target version:
Start date:
11/14/2015
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.3
Affected Architecture:

Description

Example reproduction:

Start with 2.2.5 with (say) "System Patches" package installed.
Update to 2.3
Visit "Packages" page

Result:

1) All packages currently installed are shown with a blank version and "!" on the left of the name, and they also appear in the list of "available packages" even if that version is already installed (because the current version isn't properly handled).
2) Reinstalling the package the usual way fixes it, and then the package is shown correctly in the "installed" list with a tick mark next to it and a version number.

Screenshot shows page after this is done - note that now, "System Patches" package is correctly shown but others still are not correct. Reinstalling these packages fixed their recognition the same way.

pkg.png (10.7 KB) pkg.png Stilez y, 11/14/2015 12:40 PM
pkg2.png (27.9 KB) pkg2.png Stilez y, 11/14/2015 12:45 PM
dump.txt (2.52 MB) dump.txt Stilez y, 11/17/2015 10:58 AM

Associated revisions

Revision 1f6845f8 (diff)
Added by Renato Botelho over 3 years ago

At least /boot/loader.rc has schg, make sure to remove it before upgrade. Ticket #5448

History

#1 Updated by Stilez y over 3 years ago

Related 2nd bug - if you try to reinstall all packages to fix this, using the normal "reinstall all packages" function under "backup/restore", it only reinstalls the packages that are recognised above, not the other packages that exist, and are installed, but aren't yet recoghnised with a version number.

See screenshot taken directly after the screenshot/bug report above - only 1 package was reinstalled although a dozen packages are installed (and tested/working) on the router.

#2 Updated by Chris Buechler over 3 years ago

  • Category set to Package System
  • Target version set to 2.3
  • Affected Version set to 2.3

#3 Updated by Jim Thompson over 3 years ago

  • Assignee set to Renato Botelho

#4 Updated by Renato Botelho over 3 years ago

2.2 uses PBI and 2.3 uses pkg. There is a transition code written that does the following operations during upgrade from 2.2 -> 2.3:

1. Before upgrade it removes all PBIs and symlinks, preserving config items on config.xml
2. During first boot after upgrade, it reads all package information from config.xml and install appropriate pkgs

When config portion of a package is there but proper pkg is not installed, it shows package in red, because it's in a broken state, allowing you to reinstall it.

In your case, it seems like the operation #2 was not successfull, you can check if /cf/conf/upgrade_log.txt still contain information from 2.2 -> 2.3 upgrade and attach it to the ticket so we can take a look and try to identify what happened

#5 Updated by Stilez y over 3 years ago

I have the full file. It's long but the key pieces seem to be these:

tar: Failed to set default locale
x ./tmp/pre_upgrade_command
Removing PBI dansguardian-2.12.0.3_2-amd64 and all symlinks
Removing PBI mtr-0.85_1-amd64 and all symlinks
Removing PBI nmap-6.47-amd64 and all symlinks
Removing PBI p7zip-9.20.1_2-amd64 and all symlinks
Removing PBI pfblockerng-1.6.3_1-amd64 and all symlinks
Removing PBI snort-2.9.7.3-amd64 and all symlinks
Removing PBI squid-2.7.9_4-amd64 and all symlinks
Removing PBI stunnel-5.07-amd64 and all symlinks
Removing PBI suricata-2.0.8_1-amd64 and all symlinks
Removing PBI syslog-ng-3.6.2_3-amd64 and all symlinks
Removing PBI zip-3.0_1-amd64 and all symlinks
Firmware upgrade in progress...
Installing /root/firmware.tgz.
tar: Failed to set default locale
./boot/loader.rc: Could not unlink
tar: Error exit delayed from previous errors.
Image installed /root/firmware.tgz.
.: modification time (Fri Nov 6 21:23:09 2015, Sat Nov 14 18:15:25 2015)

A ton of package/file + modification time...
A ton of permissions info
A ton of "<pbi filename> missing"

And then what looks like the issue:

Warning: PHP Startup: apc: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: xml: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: dom: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: SimpleXML: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20121212/xmlreader.so' - /usr/local/lib/php/20121212/xmlreader.so: Undefined symbol "dom_node_class_entry" in Unknown on line 0

Warning: PHP Startup: xmlwriter: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: curl: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: gettext: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: ldap: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: openssl: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: pcntl: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: hash: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: posix: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: readline: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: session: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20121212/suhosin.so' - /usr/local/lib/php/20121212/suhosin.so: Undefined symbol "ps_globals" in Unknown on line 0

Warning: PHP Startup: ctype: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

Warning: PHP Startup: mbstring: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match
in Unknown on line 0

This looks like the problem. If you need the rest of the file, say so. It doesn't seem to add much more, though.

#6 Updated by Renato Botelho over 3 years ago

Please attach complete file.

Looks like it didn't extract upgrade image correctly, and ended up trying to load old PHP modules. I'll investigate

#7 Updated by Stilez y over 3 years ago

Added

#8 Updated by Stilez y over 3 years ago

FWIW the files used for updates:

2.2.3 to 2.2.5: pfSense-Full-Update-2.2.5-RELEASE-amd64.tgz
2.2.5 to 2.3: pfSense-Full-Update-2.3-ALPHA-amd64-20151114-0155.tgz

#9 Updated by Renato Botelho over 3 years ago

  • Subject changed from Packages UI doesn't properly recognise versions of installed packages upon upgrade from 2.2.x to 2.3 to Packages not being reinstalled after upgrade from 2.2.x

Changing description. Version is blank because only config.xml part of package is in place, binary pkg is missing so package is in a Broken state, hence it show up in red

#10 Updated by Renato Botelho over 3 years ago

  • Status changed from New to Feedback

I did ~10 upgrades from 2.2.x to 2.3 with different set of packages installed and couldn't reproduce it. Probably all the changes that happened in this area in the last 2 months fixed it.

Leave it in feedback state for now, waiting for more tests and comments

#11 Updated by Chris Buechler over 3 years ago

  • Status changed from Feedback to Resolved

I've upgraded several different configs with differing packages in the past few days, and all were upgraded correctly.

Also available in: Atom PDF