How to switch from OPNsense community to business edition

Started by s.leistritz, November 23, 2023, 09:08:52 AM

Previous topic - Next topic
Greetings, maybe this topic was already discussed in the past (and I could not find it).

Current System:

Now i want to switch to the business version using the subscription key included in the order.
Under System -> Firmware -> Settings I changed.

  • Change Mirror to Deciso (HTTPS, NL, Commercial)
  • Select Type = Business
  • Entered Subscription Key
  • Save

The next check for Update does not work:
Quote
***GOT REQUEST TO CHECK FOR UPDATES***
Currently running OPNsense 23.7.7 at Thu Nov 23 09:05:14 CET 2023
Fetching changelog information, please wait... fetch: https://pkg.opnsense.org/FreeBSD:13:amd64/23.10/sets/changelog.txz: Not Found
Updating OPNsense repository catalogue...
pkg: https://pkg.opnsense.org/FreeBSD:13:amd64/23.10/latest/meta.txz: Not Found
repository OPNsense has no meta file, using default settings
pkg: https://pkg.opnsense.org/FreeBSD:13:amd64/23.10/latest/packagesite.pkg: Not Found
pkg: https://pkg.opnsense.org/FreeBSD:13:amd64/23.10/latest/packagesite.txz: Not Found
Unable to update repository OPNsense
Error updating repositories!
pkg: Repository OPNsense cannot be opened. 'pkg update' required
Checking integrity... done (0 conflicting)
Your packages are up to date.
***DONE***

The systems tries to look for the business packages (23.10) on the wrong mirror (pkg.opnsense.org instead of Deciso).

Maybe I missed something. Thanks for any help/advice you can give!

Hi,

Can you update to latest communiyy first? There was an issue with the mirror rewrite on 23.7.7 initially and it looks like you never updated to the hotfixed version.


Cheers,
Franco

i always have to check for updates twice for the commercial server to apply any updates.
the first one errors. saying its not available, then the 2nd time it works

Sounds a bit like a DNS oddity. I'm pretty sure the OP is the specific 23.7.7 issue.

But while we are here can you emulate the same problem with two pings one after the other to the update server?


Cheers,
Franco

November 24, 2023, 12:55:27 PM #4 Last Edit: November 24, 2023, 01:00:55 PM by DEC670airp414user
Quote from: franco on November 23, 2023, 09:02:35 PM
Sounds a bit like a DNS oddity. I'm pretty sure the OP is the specific 23.7.7 issue.

But while we are here can you emulate the same problem with two pings one after the other to the update server?


Cheers,
Franco

what server do you want me to try to ping?

ping: cannot resolve https://opnsense-update.deciso.com/: Unknown host
ping: cannot resolve www.opnsense-update.deciso.com: Unknown hostping: cannot resolve ping : https://pkg.opnsense.org: Unknown host

well, just this twice in a row to see if only the first one fails or both or none:

# ping opnsense-update.deciso.com

ping just fine both before and after

The matching OPNsense 23.10 series does not yet exist. Images are available to switch this installation to the latest business edition.   is the error that comes up in red then behind the window I get the below.   If I immediately check for updates again. if updates are available they are downloaded and installed.
there is another thread in General.   where this only happens on business edition.  i moved to the latest community and it went away.   did a fresh install of business, and imported my config file and it does it again


***GOT REQUEST TO CHECK FOR UPDATES***
Currently running OPNsense 23.10_2 at Fri Nov 24 07:21:24 EST 2023
Fetching subscription information, please wait... done
Fetching changelog information, please wait... done
Updating OPNsense repository catalogue...
Fetching meta.conf: . done
Fetching packagesite.pkg: .......... done
pkg: sqlite error while executing CREATE TABLE packages (id INTEGER PRIMARY KEY,origin TEXT,name TEXT NOT NULL,version TEXT NOT NULL,comment TEXT NOT NULL,desc TEXT NOT NULL,osversion TEXT,arch TEXT NOT NULL,maintainer TEXT NOT NULL,www TEXT,prefix TEXT NOT NULL,pkgsize INTEGER NOT NULL,flatsize INTEGER NOT NULL,licenselogic INTEGER NOT NULL,cksum TEXT NOT NULL,path TEXT NOT NULL,pkg_format_version INTEGER,manifestdigest TEXT NULL,olddigest TEXT NULL,dep_formula TEXT NULL,vital INTEGER NOT NULL DEFAULT 0);CREATE TABLE deps (origin TEXT,name TEXT,version TEXT,package_id INTEGER REFERENCES packages(id)  ON DELETE CASCADE ON UPDATE CASCADE,UNIQUE(package_id, name));CREATE TABLE categories (id INTEGER PRIMARY KEY, name TEXT NOT NULL UNIQUE );CREATE TABLE pkg_categories (package_id INTEGER REFERENCES packages(id)  ON DELETE CASCADE ON UPDATE CASCADE,category_id INTEGER REFERENCES categories(id)  ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, category_id));CREATE TABLE licenses (id INTEGER PRIMARY KEY,name TEXT NOT NULL UNIQUE);CREATE TABLE pkg_licenses (package_id INTEGER REFERENCES packages(id)  ON DELETE CASCADE ON UPDATE CASCADE,license_id INTEGER REFERENCES licenses(id)  ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, license_id));CREATE TABLE option (option_id INTEGER PRIMARY KEY,option TEXT NOT NULL UNIQUE);CREATE TABLE option_desc (option_desc_id INTEGER PRIMARY KEY,option_desc TEXT NOT NULL UNIQUE);CREATE TABLE pkg_option (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,option_id INTEGER NOT NULL REFERENCES option(option_id) ON DELETE RESTRICT ON UPDATE CASCADE,value TEXT NOT NULL,PRIMARY KEY(package_id, option_id));CREATE TABLE pkg_option_desc (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,option_id INTEGER NOT NULL REFERENCES option(option_id) ON DELETE RESTRICT ON UPDATE CASCADE,option_desc_id INTEGER NOT NULL REFERENCES option_desc(option_desc_id) ON DELETE RESTRICT ON UPDATE CASCADE,PRIMARY KEY(package_id, option_id));CREATE TABLE pkg_option_default (package_id INTEGER NOT NULL REFERENCES packages(id) ON DELETE CASCADE ON UPDATE CASCADE,option_id INTEGER NOT NULL REFERENCES option(option_id) ON DELETE RESTRICT ON UPDATE CASCADE,default_value TEXT NOT NULL,PRIMARY KEY(package_id, option_id));CREATE TABLE shlibs (id INTEGER PRIMARY KEY,name TEXT NOT NULL UNIQUE );CREATE TABLE pkg_shlibs_required (package_id INTEGER NOT NULL REFERENCES packages(id)  ON DELETE CASCADE ON UPDATE CASCADE,shlib_id INTEGER NOT NULL REFERENCES shlibs(id)  ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, shlib_id));CREATE TABLE pkg_shlibs_provided (package_id INTEGER NOT NULL REFERENCES packages(id)  ON DELETE CASCADE ON UPDATE CASCADE,shlib_id INTEGER NOT NULL REFERENCES shlibs(id)  ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, shlib_id));CREATE TABLE annotation (annotation_id INTEGER PRIMARY KEY,annotation TEXT NOT NULL UNIQUE);CREATE TABLE pkg_annotation (package_id INTEGER REFERENCES packages(id) ON DELETE CASCADE ON UPDATE RESTRICT,tag_id INTEGER NOT NULL REFERENCES annotation(annotation_id) ON DELETE CASCADE ON UPDATE RESTRICT,value_id INTEGER NOT NULL REFERENCES annotation(annotation_id) ON DELETE CASCADE ON UPDATE RESTRICT,UNIQUE (package_id, tag_id));CREATE TABLE pkg_conflicts (package_id INTEGER NOT NULL REFERENCES packages(id)  ON DELETE CASCADE ON UPDATE CASCADE,conflict_id INTEGER NOT NULL,UNIQUE(package_id, conflict_id));CREATE TABLE provides(    id INTEGER PRIMARY KEY,    provide TEXT NOT NULL);CREATE TABLE pkg_provides (package_id INTEGER NOT NULL REFERENCES packages(id)  ON DELETE CASCADE ON UPDATE CASCADE,provide_id INTEGER NOT NULL REFERENCES provides(id)  ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, provide_id));CREATE TABLE requires(    id INTEGER PRIMARY KEY,    require TEXT NOT NULL);CREATE TABLE pkg_requires (package_id INTEGER NOT NULL REFERENCES packages(id)  ON DELETE CASCADE ON UPDATE CASCADE,require_id INTEGER NOT NULL REFERENCES requires(id)  ON DELETE RESTRICT ON UPDATE RESTRICT,UNIQUE(package_id, require_id));PRAGMA user_version=2014; in file pkgdb.c:2333: disk I/O error
Unable to create repository OPNsense
Unable to update repository OPNsense
Error updating repositories!
pkg: Repository OPNsense cannot be opened. 'pkg update' required
Checking integrity... done (0 conflicting)
Your packages are up to date.
***DONE***

Can you open the System: Settings: Firmware page from the menu... wait for 30 seconds then click "check for updates" once... still same problem?

The fun part is I can reproduce this easily with:

# pkg update -f & ; pkg update -f

The not so fun part is what the hell can we do about it? oO


If anyone wants to try a fix for that:

# pkg add -f https://pkg.opnsense.org/FreeBSD:13:amd64/snapshots/latest/All/pkg-1.19.2_1.pkg

The package manager patch proposal is to lock the update procedure internally and wait with other process to finish so when it releases it should be in sync.


Cheers,
Franco

Sorry for hijacking, but one question:

You can open FreeBSD issues on Github now instead of bugs.freebsd.org? Seriously surprised.

Thanks for clarifying
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

For pkg that was always the case as it never had an SVN. For src I think small PRs are supported, but not bug reports. For ports I think none.


Cheers,
Franco

I moved from 23.7 to business just now and got this message:

root@OPNsense:/home/23 # pkg add -f https://pkg.opnsense.org/FreeBSD:13:amd64/snapshots/latest/All/pkg-1.19.2_1.pkg
Fetching pkg-1.19.2_1.pkg: 100%    4 MiB   4.2MB/s    00:01   
Installing pkg-1.19.2_1...
package pkg is already installed, forced install
Extracting pkg-1.19.2_1: 100%
root@OPNsense:/home/234 #

guessing that means that because the package was already on the server it was already applied from the move from 23.7 to business?

this is the first time I've had a complete update without errors for quite some time:
Thank you Franco!

***GOT REQUEST TO CHECK FOR UPDATES***
Currently running OPNsense 23.10_2 at Thu Nov 30 07:29:30 EST 2023
Fetching subscription information, please wait... done
Fetching changelog information, please wait... done
Updating OPNsense repository catalogue...
Fetching meta.conf: . done
Fetching packagesite.pkg: .......... done
Processing entries: .......... done
OPNsense repository update completed. 861 packages processed.
All repositories are up to date.
Checking integrity... done (0 conflicting)
Your packages are up to date.
Checking for upgrades (1 candidates): . done
Processing candidates (1 candidates): . done
Checking integrity... done (0 conflicting)
Your packages are up to date.
***DONE***