opnsense / update

OPNsense update tools
https://opnsense.org/
BSD 2-Clause "Simplified" License
126 stars 76 forks source link

Converting FreeBSD 12.1 to OPNsense 20.7.8, leaves the wrong version of PKG #66

Closed Napsterbater closed 3 years ago

Napsterbater commented 3 years ago

In order to have ZFS (single disk) for my OPNsense box I am testing/preconfiguring what I can on a Hyper-V VM.

I used a Freebsd 12.1 Boot Only ISO, then ran:

# pkg install ca_root_nss
# fetch https://raw.githubusercontent.com/opnsense/update/master/bootstrap/opnsense-bootstrap.sh
# sh ./opnsense-bootstrap.sh

And started configuring OPNsense when it was done.

One thing I kept running into was everytime I installed a plugin, it seemingly did not finish in the UI, and the UI/System started acting sluggish and parts were not displaying correctly.

I realized and noticed that configd was stopped/not running after every attempt to install a plugin.

Managed to stumble upon this thread https://forum.opnsense.org/index.php?topic=14177.msg65379#msg65379

I ran "pkg query %R pkg" and "pkg query %v pkg", the output showed: unknown-repository 1.16.1 I then ran "opnsense-revert pkg" and it downgraded pkg from 1.16.1 to 1.15.10_2

So far it seems to have corrected configd.

fichtner commented 3 years ago

It happens from time to time that FreeBSD pkg is ahead and gets pulled in for the people who are not careful to disable the FreeBSD mirror, but in this case I'm unsure where pkg 1.16.1 came from when we explicitly remove it here:

https://github.com/opnsense/update/blob/a42918a17067d0a070ea6bda957e0590b32ab273/bootstrap/opnsense-bootstrap.sh#L189

And yes, pkg from FreeBSD added "reaper" functionality (a longer while ago) because they say pkg shouldn't restart services...

fichtner commented 3 years ago

Alright I can reproduce. This seems to be a fun regression via pkg 1.16...

fichtner commented 3 years ago
Screenshot 2021-01-24 at 10 35 33 AM

WTF is it doing :)

fichtner commented 3 years ago

Ok, it's silently bootstrapping before it's ready, fixed via https://github.com/opnsense/core/commit/acae90a9e72 -- since this is core git no changes in opnsense-boostrap needed and bootstrap fixed. Thanks!