Project

General

Profile

Bug #6594

Package reinstallation post-config restore hangs if no Internet connectivity

Added by Chris Buechler 10 months ago. Updated 11 days ago.

Status:
Feedback
Priority:
High
Category:
Package System
Target version:
Start date:
07/09/2016
Due date:
% Done:

100%

Affected version:
2.3.x
Affected Architecture:

Description

If you restore a config, and upon reboot the system doesn't have Internet connectivity when trying to update metadata for packages, it'll get stuck during boot. It needs to timeout and continue with the boot in that circumstance like <=2.2.x.

2.4.0.b.20170401.1306-6594-boot-output (3.2 KB) James Dekker, 04/01/2017 09:33 PM

Associated revisions

Revision 9c91c7bd
Added by Doktor Notor 2 months ago

Fix the pkg_call() and set the timeout to a sane value (Bug #6594)

Revision a21a36fe
Added by Doktor Notor about 2 months ago

Fix the pkg_call() and set the timeout to a sane value (Bug #6594)
(cherry picked from commit 9c91c7bd747074b8cdaa90e8810f0c2df081f72d)

Revision a1147a30
Added by Doktor Notor about 2 months ago

Fix the pkg_call() and set the timeout to a sane value (Bug #6594)
(cherry picked from commit 9c91c7bd747074b8cdaa90e8810f0c2df081f72d)

History

#1 Updated by Jim Thompson 10 months ago

  • Assignee set to Renato Botelho

#2 Updated by Adam Piasecki 10 months ago

This happens even without packages installed. I restored a config without any package information in it. Even selected
"Do not backup package information." when backing up the config. It still hangs on boot.

#3 Updated by Chris Buechler 9 months ago

  • Description updated (diff)
  • Priority changed from Normal to High

It's still the package reinstall that gets hung up, regardless of whether or not you have packages installed. It sets needs_package_sync_after_reboot regardless of whether there are packages in the config, which is where it gets hung.

#4 Updated by Kevin Wojniak 4 months ago

I'm running into this right now. Not a big network guy, just trying to replace our small business' router with a SG-4860 1U and twiddling my thumbs while the router sits and attempts to access WAN even though interfaces haven't been assigned (I did a restore of the config from the web).

I think changing it to not attempt 3 (?) times and use a lower timeout would greatly help. Then I could be on my way home sooner :)

#5 Updated by Pig Monkey 4 months ago

I was just hit by this as well. In my case I am preparing to replace a device at a remote site. I used pfsense's restore functionality to upload the configuration from the old device to the new device, and rebooted. Then wondered why it seemed to still be hanging 15 minutes later.

After throwing in a serial cable and power cycling the new device, I saw the "Waiting for Internet connection to update pkg metadata and finish package reinstallationUpdating pfSense-core repository catalogue..." message. After hanging there for a while it moves on to "Updating pfSense repository catalogue..." and then hangs again. It finally errors there, and then moves on to hanging at "Updating pfSense-core repository catalogue..." And then it loops back to "pfSense repository catalogue...". It does the loop 3 or 4 times.

A shorter timeout is definitely appropriate. If the first check fails, it would be nice if it did not attempt the subsequent updates. Perhaps there should be some sort of "offline" boot option that we can use to prevent any connection attempts if we know we're going to bring the device up without WAN.

#6 Updated by Renato Botelho 2 months ago

Kevin Wojniak wrote:

I'm running into this right now. Not a big network guy, just trying to replace our small business' router with a SG-4860 1U and twiddling my thumbs while the router sits and attempts to access WAN even though interfaces haven't been assigned (I did a restore of the config from the web).

I think changing it to not attempt 3 (?) times and use a lower timeout would greatly help. Then I could be on my way home sooner :)

Which version were you upgrading to?

#7 Updated by Renato Botelho 2 months ago

Pig Monkey wrote:

I was just hit by this as well. In my case I am preparing to replace a device at a remote site. I used pfsense's restore functionality to upload the configuration from the old device to the new device, and rebooted. Then wondered why it seemed to still be hanging 15 minutes later.

After throwing in a serial cable and power cycling the new device, I saw the "Waiting for Internet connection to update pkg metadata and finish package reinstallationUpdating pfSense-core repository catalogue..." message. After hanging there for a while it moves on to "Updating pfSense repository catalogue..." and then hangs again. It finally errors there, and then moves on to hanging at "Updating pfSense-core repository catalogue..." And then it loops back to "pfSense repository catalogue...". It does the loop 3 or 4 times.

A shorter timeout is definitely appropriate. If the first check fails, it would be nice if it did not attempt the subsequent updates. Perhaps there should be some sort of "offline" boot option that we can use to prevent any connection attempts if we know we're going to bring the device up without WAN.

Which version were you upgrading to?

#8 Updated by Pig Monkey 2 months ago

Renato Botelho wrote:

Which version were you upgrading to?

2.3.2

#9 Updated by Kill Bill 2 months ago

Someone test this, perhaps? https://github.com/pfsense/pfsense/pull/3582

Dunno, but it seems to me someone has misread the PHP docs.

#10 Updated by Renato Botelho about 2 months ago

Kill Bill wrote:

Someone test this, perhaps? https://github.com/pfsense/pfsense/pull/3582

Dunno, but it seems to me someone has misread the PHP docs.

It was really a bug, thanks for spotting it but it has no relation with this one. That piece of code is only used by GUI, during boot only pfSense-upgrade is used.

#11 Updated by Renato Botelho about 2 months ago

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

Pig Monkey wrote:

Renato Botelho wrote:

Which version were you upgrading to?

2.3.2

It has a fix on 2.3.3 and 2.4.0. I couldn't replicate it anymore

#12 Updated by Kill Bill about 2 months ago

Renato Botelho wrote:

Kill Bill wrote:

Someone test this, perhaps? https://github.com/pfsense/pfsense/pull/3582

Dunno, but it seems to me someone has misread the PHP docs.

It was really a bug, thanks for spotting it but it has no relation with this one. That piece of code is only used by GUI, during boot only pfSense-upgrade is used.

Well, at least it definitely seems to have fixed the GUI freeze on package (re)install.

#13 Updated by James Dekker 24 days ago

On 2.4.0.b.20170401.1306, when a backup from 2.4.0.b.20170328.1156 is restored with no WAN connectivity the attached console output is shown. pfSense is not accessible from the WebGUI until the process times out and it moves on.

#14 Updated by Paighton Bisconer 11 days ago

On 2.4.0.b.20170407.1403, backed up config, restored with no WAN connectivity, pfSense WEBGUI was accessible, console did hang on reinstalling packages but once WAN was restored everything worked fine. No crashes or hangs while restoring config other than waiting for packages.

Also available in: Atom PDF