Project

General

Profile

Bug #6137

Old package inc files may cause problems post-upgrade

Added by Adam Thompson about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
High
Category:
Package System
Target version:
Start date:
04/13/2016
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.3
Affected Architecture:

Description

This is apparently a fairly common problem, and I'm not sure how to address it. I didn't see anything in here or in the release notes, but there are forum posts. Apologies if it is documented and I'm blind...

https://forum.pfsense.org/index.php?topic=109714.msg610841#msg610841
http://blog.stordata.se/index.php/2016/04/13/upgrade-to-pfsense-2-3-breaks-haproxy-how-to-do-it/

I upgraded first, discovered the breakage, uninstalled the 2.3 haproxy package, then checked and there were rather a lot of haproxy-related files still scattered all over the filesystem.

Would it be feasible for the new 2.3 haproxy package to have a subpackage whose postinstall script just goes and cleans up commonly-found left-over files that shouldn't be there anymore? That's my best guess at how to handle this...

Associated revisions

Revision a07d27e5 (diff)
Added by Renato Botelho about 3 years ago

Fix #6137:

- Uninstall all packages on current system before upgrade using
pre_upgrade_command script
- Create a file containing all packages previously installed and
reinstall them on first boot after upgrade

Revision c0cb3c73 (diff)
Added by Renato Botelho about 3 years ago

Fix #6137:

- Uninstall all packages on current system before upgrade using
pre_upgrade_command script
- Create a file containing all packages previously installed and
reinstall them on first boot after upgrade

Revision 18bd1ccb (diff)
Added by Renato Botelho about 3 years ago

Remove a wrong comment I left by accident and make it really remove packages. Fixes #6137

Revision 3b577b94 (diff)
Added by Renato Botelho about 3 years ago

Remove a wrong comment I left by accident and make it really remove packages. Fixes #6137

Revision 4458ed6b (diff)
Added by Chris Buechler about 3 years ago

Fix package_reinstall_all post-upgrade when packages have been removed in pre_upgrade. Ticket #6137

Revision 7b31a030 (diff)
Added by Chris Buechler about 3 years ago

Fix package_reinstall_all post-upgrade when packages have been removed in pre_upgrade. Ticket #6137

History

#1 Updated by Jim Thompson about 3 years ago

  • Assignee set to Chris Buechler

#2 Updated by Jim Thompson about 3 years ago

  • Assignee changed from Chris Buechler to Renato Botelho

#3 Updated by Chris Buechler about 3 years ago

  • Project changed from pfSense Packages to pfSense
  • Subject changed from Haproxy fails after 2.2.x to 2.3 upgrade to Old package inc files may cause problems post-upgrade
  • Category changed from haproxy to Package System
  • Status changed from New to Confirmed

The problem this causes is one of the old haproxy*.inc files make filter_configure_sync hang forever. So it kills the entire system until you remove those inc files.

We probably ought to whack all of the inc files in /usr/local/pkg with the exception of those in base in post-upgrade unless Renato has a better idea. That will prevent the haproxy issue, and possibly any number of other post-upgrade issues related to old package inc files.

Moving to base and package system because it's possibly an issue with much more than haproxy and should have a general fix.

#4 Updated by Renato Botelho about 3 years ago

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

#5 Updated by Chris Buechler about 3 years ago

The upgrade log shows it doing the package uninstall as configured, and it's correctly reinstalled post-upgrade, but it leaves behind the .inc files in /usr/local/pkg/ so it doesn't fix the root issue here.

Also no doubt many inc files hanging around out there that aren't part of an installed package. After uninstalling the packages, it should rm /usr/local/pkg/* minus the files in base.

Basic example config attached for haproxy. Restore to 2.2.6, upgrade to 2.3.1 snapshot. This particular config, having the .inc files hanging around there doesn't hurt anything. But their presence in /usr/local/pkg/ is what will break with many configs.

#6 Updated by Renato Botelho about 3 years ago

It was my fault, I forgot part of the code commented out. Fixed now.

#7 Updated by Renato Botelho about 3 years ago

  • Status changed from Confirmed to Feedback

#8 Updated by Adam Thompson about 3 years ago

I think I have two firewalls still running 2.2.x, so I should be able to test in a "real world" scenario.

Can you please advise when this fix hits the public website, and/or provide an upgrade URL I can test with?

(I probably won't be able to do a test upgrade until Tuesday at the earliest... and I'm only going to take one shot at upgrading each firewall, because they're both production systems. At least one of them is i386, not amd64, if that makes any difference.)

#9 Updated by Renato Botelho about 3 years ago

Adam Thompson wrote:

I think I have two firewalls still running 2.2.x, so I should be able to test in a "real world" scenario.

Can you please advise when this fix hits the public website, and/or provide an upgrade URL I can test with?

(I probably won't be able to do a test upgrade until Tuesday at the earliest... and I'm only going to take one shot at upgrading each firewall, because they're both production systems. At least one of them is i386, not amd64, if that makes any difference.)

You can get 2.3.1-DEVELOPMENT snapshots at https://snapshots.pfsense.org/. All snapshots newer than 20160606-0900 will contain the fix.

#10 Updated by Chris Buechler about 3 years ago

the removal part was fine. The reinstall post-upgrade wasn't working until my last commit. Leaving to verify once that hits a snapshot.

#11 Updated by Renato Botelho about 3 years ago

It passed on all my tests too

#12 Updated by Chris Buechler about 3 years ago

  • Status changed from Feedback to Resolved

all works now

Also available in: Atom PDF