Bug #5446
closed
System Patches doesn't auto-apply on upgrade from 2.2 to 2.3
Added by Stilez y almost 9 years ago.
Updated over 8 years ago.
Description
Backed up my current 2.2.5, installed on a VM, updated to 2.3 alpha (14 Nov), and noticed that none of the patches that were able to be applied against 2.3 and were flagged to auto-apply, were auto-applied.
GUI reported "yes" for auto-apply so it's not a data issue, and they were successfully applied when "apply" was clicked. Unless auto-apply was disabled for the alpha release this seems like a bug.
- Project changed from pfSense to pfSense Packages
- Category set to System Patches
- Affected Version set to 2.3
- Assignee set to Renato Botelho
Well, this uses earlyshellcmd in config.xml. Whatever broke there is an issue in pfSense core very likely, not in package.
Hmmm, and thinking about this, this could have never worked. You upgrade, the packages get removed, then you reboot, the packages get reinstalled. In between there, there's really no way to autoapply the patches on boot.
In which case the check for autoapply needs to trigger on post_install as well as earlyshellcmd...?
I hadn't noticed autoapply not happening after previous upgrades (2.2.3->2.2.4, 2.2.4->2.2.5) so it looks like something changed
Frankly, I don't think anything at all changed here.
I could not reproduce the issue. I added a patch, mark it to auto apply, rebooted after an upgrade and it was applied
Stilez y wrote:
I hadn't noticed autoapply not happening after previous upgrades (2.2.3->2.2.4, 2.2.4->2.2.5) so it looks like something changed
Just to clarify, you claim patches are not auto applied on first boot after upgrade from 2.2 -> 2.3, right? If you reboot your 2.3 system patch is applied during boot, correct?
I didn't test that scenario, just noted what happened after the update reboot, as you can see in the screenshots. I didn't further re-reboot to see if that changed anything.
- Subject changed from System Patches doesn't auto-apply on current 2.3 to System Patches doesn't auto-apply on upgrade from 2.2 to 2.3
I tried it in lots of different combinations and the only case I can see an issue is during upgrade from 2.2. to 2.3.
What happens in this case is before restart, on 2.2, upgrade process remove all PBIs and set packages to be reinstalled after reboot on 2.3, so during first 2.3 boot, System Patches is not installed and cannot auto apply any patch.
I'm keeping the ticket open to think what could be done in this case
Honestly we should probably keep this behavior. The likelihood of someone's 2.2.x patch breaking 2.3 in an undesirable way is fairly high, so the fact that it doesn't auto-apply during the upgrade is probably preventing more problems than fixing it would solve.
Yes, due to the huge changes to the code-base from bootstrap and a whole bunch of code style etc. stuff across /etc /etc/inc and /usr/local/www... I also can't imagine a patch that applies to 2.2.* code that would still apply cleanly to 2.3 anyway. Should be just advertised in the release notes so that people know to review all their system patches after 2.3 upgrade.
If it matches the code, then it probably has a fair chance of working. GUI changes above all will break, but those simply won't match the new code anyway, so they won't get auto-applied regardless.
It doesn't seem that likely that a patch will match 2.2.x and also match 2.3, but then works on 2.2.x and breaks 2.3. It's easy to think of examples both ways, but it just doesn't seem that likely (any more than on any other upgrade where auto-apply is enforced and the patch matches).
Maybe just say that that due to the massive changes, system patches created under 2.2 are likely to need review before using, and patches related to GUI output is likely to need rewriting.
- Status changed from New to Closed
Closing this since it's safer to just not auto-apply in this case. We'll add notes to docs/upgrade guide if necessary.
Also available in: Atom
PDF