FreeNAS 9.10-RELEASE now available!

Status
Not open for further replies.

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
For me, rebooting was an option but didn't work. I'm getting:

Code:
root@owncloud:/ # pkg upgrade
Updating FreeBSD repository catalogue...
Repository FreeBSD has a wrong packagesite, need to re-create database
[owncloud] Fetching meta.txz: 100% 968 B 1.0kB/s 00:01
[owncloud] Fetching packagesite.txz: 100% 5 MiB 2.8MB/s 00:02
Processing entries: 0%
pkg: wrong architecture: freebsd:9:x86:64 instead of FreeBSD:10:amd64
pkg: repository FreeBSD contains packages with wrong ABI: freebsd:9:x86:64
Processing entries: 100%
Unable to update repository FreeBSD
All repositories are up-to-date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.


The problem is here:

Code:
root@owncloud:/ # pkg -vv

...snip...

Repositories:
FreeBSD: {
url : "pkg+http://pkg.FreeBSD.org/freebsd:9:x86:64/latest",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}


The fix is:

vi /usr/local/etc/pkg/repos/FreeBSD.conf
and change freebsd:9:x86:64 to ${ABI}


EDIT: Looks like someone already reported this bug: https://bugs.freenas.org/issues/14211

EDIT2: My previous advice was not good advice...don't do that. You need to delete your entire jails dataset in the storage tab and then things will work correctly. My previous solution was just a band-aid hiding further problems.

I'm the one who opened the ticket.

So you're not having this problem anymore? I did make sure to destroy my jails dataset before installing new jails. I did see it download the 10.3 jail template when I created the first jail. If you're not having this issue anymore then I guess I will destroy the dataset again. I just spent a few hours almost completing things.
 

wondercow

Dabbler
Joined
Dec 20, 2015
Messages
15
Yeah, it took me a long time to get it figured out. You have to stop all jails, then delete all jails (in the jails tab) THEN go to the storage tab and actually delete /jails from your list of datasets. Just deleting everything inside of it isn't enough. You actually have to delete /jails itself. Learned that the hard way. Also don't do it on the CLI. I deleted /jails via CLI first and it just keeps coming ba

The process is deceiving because when you create a new jail, it says it's downloading the 10.3 jail template but you will end up with problems once it moves forward. It's kind of a false positive.

In any case try making sure that /jails is 100% gone before you make a new jail.
 

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
Yeah, it took me a long time to get it figured out. You have to stop all jails, then delete all jails (in the jails tab) THEN go to the storage tab and actually delete /jails from your list of datasets. Just deleting everything inside of it isn't enough. You actually have to delete /jails itself. Learned that the hard way. Also don't do it on the CLI. I deleted /jails via CLI first and it just keeps coming ba

The process is deceiving because when you create a new jail, it says it's downloading the 10.3 jail template but you will end up with problems once it moves forward. It's kind of a false positive.

In any case try making sure that /jails is 100% gone before you make a new jail.
Ok, thanks. Guess I have to start over.

I did delete the jails dataset before, however I first tried to delete each jail from the storage tab first. Something must've went wrong there.
 

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
Nope, still not working. jails dataset was completely destroyed. Do I need to change the collection URL in jails configuration to something other than http://download.freenas.org/jails/9.3/x64/ ?

Code:
Version                 : 1.6.4

PKG_DBDIR = "/var/db/pkg";

PKG_CACHEDIR = "/var/cache/pkg";

PORTSDIR = "/usr/ports";

INDEXDIR = "";

INDEXFILE = "INDEX-10";

HANDLE_RC_SCRIPTS = false;

DEFAULT_ALWAYS_YES = false;

ASSUME_ALWAYS_YES = false;

REPOS_DIR [

    "/etc/pkg/",

    "/usr/local/etc/pkg/repos/",

]

PLIST_KEYWORDS_DIR = "";

SYSLOG = true;

ABI = "FreeBSD:10:amd64";

ALTABI = "freebsd:10:x86:64";

DEVELOPER_MODE = false;

VULNXML_SITE = "http://vuxml.freebsd.org/freebsd/vuln.xml.bz2";

FETCH_RETRY = 3;

PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";

PKG_ENABLE_PLUGINS = true;

PLUGINS [

]

DEBUG_SCRIPTS = false;

PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";

PERMISSIVE = false;

REPO_AUTOUPDATE = true;

NAMESERVER = "";

HTTP_USER_AGENT = "pkg/1.6.4";

EVENT_PIPE = "";

FETCH_TIMEOUT = 30;

UNSET_TIMESTAMP = false;

SSH_RESTRICT_DIR = "";

PKG_ENV {

}

PKG_SSH_ARGS = "";

DEBUG_LEVEL = 0;

ALIAS {

}

CUDF_SOLVER = "";

SAT_SOLVER = "";

RUN_SCRIPTS = true;

CASE_SENSITIVE_MATCH = false;

LOCK_WAIT = 1;

LOCK_RETRIES = 5;

SQLITE_PROFILE = false;

WORKERS_COUNT = 0;

READ_LOCK = false;

PLIST_ACCEPT_DIRECTORIES = false;

IP_VERSION = 0;

AUTOMERGE = true;

VERSION_SOURCE = "";

CONSERVATIVE_UPGRADE = true;

PKG_CREATE_VERBOSE = false;

AUTOCLEAN = false;

DOT_FILE = "";

REPOSITORIES {

}

VALID_URL_SCHEME [

    "pkg+http",

    "pkg+https",

    "https",

    "http",

    "file",

    "ssh",

    "ftp",

    "ftps",

    "pkg+ssh",

    "pkg+ftp",

    "pkg+ftps",

]



Repositories:

  FreeBSD: { 

    url             : "pkg+http://pkg.FreeBSD.org/freebsd:9:x86:64/latest",

    enabled         : yes,

    priority        : 0,

    mirror_type     : "SRV",

    signature_type  : "FINGERPRINTS",

    fingerprints    : "/usr/share/keys/pkg"

  }
 

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
Ooh, I didn't think about that, I did so many troubleshooting steps. I must have remade my Owncloud jail 8 times trying to update from 9.3 to 10.3. Yes, I had changed mine to http://download.freenas.org/jails/10/x64/
pkg -vv is showing the same thing still. This is getting annoying. I've deleted my jails dataset 4 times now.

Code:
url             : "pkg+http://pkg.FreeBSD.org/freebsd:9:x86:64/latest"
 

wondercow

Dabbler
Joined
Dec 20, 2015
Messages
15
Are you rebooting after deleting /jails and before making your first jail? Might try that or not try that...I can't remember which worked for me. Once you make a new first jail, the only thing in your /jails folder should be .warden-template-standard. If you see something in there about .warden-9.3 (can't remember the exact name) then it's definitely not going to work for you.
 

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
Are you rebooting after deleting /jails and before making your first jail? Might try that or not try that...I can't remember which worked for me. Once you make a new first jail, the only thing in your /jails folder should be .warden-template-standard. If you see something in there about .warden-9.3 (can't remember the exact name) then it's definitely not going to work for you.
Yes I reboot after deleting the jails dataset. There are no .warden-9.3 anything anywhere.

I took a look in .warden-template-standard/usr/local/etc/pkg/repos and the FreeBSD.conf in there has ${ABI} in place of the 9. The one in any jail I create has a 9 for some reason. This is making absolutely no sense whatsoever.
 

wondercow

Dabbler
Joined
Dec 20, 2015
Messages
15
Try not rebooting after deleting jails. Especially if you have a snapshot existing, Freenas might be "helping" you by restoring it when you reboot.
 

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
Try not rebooting after deleting jails. Especially if you have a snapshot existing, Freenas might be "helping" you by restoring it when you reboot.
I've tried that too.

Here is my jail dataset:
Code:
storage/jails                                             1.61G  1.13T    96K  /mnt/storage/jails
storage/jails/.warden-template-standard                   1.61G  1.13T  1.61G  /mnt/storage/jails/.warden-template-standard



jails/.warden-template-standard/usr/local/etc/pkg/repos# cat FreeBSD.conf
Code:
FreeBSD: {

    url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",

    mirror_type: "srv",

    enabled: yes

}


Now lets add a new jail called deluge

Code:
[root@freenas] /mnt/storage/jails/deluge# cat usr/local/etc/pkg/repos/FreeBSD.conf 

FreeBSD: {

  url: "pkg+http://pkg.FreeBSD.org/freebsd:9:x86:64/latest",

  mirror_type: "srv",

  enabled: yes

}


MAKES NO SENSE. I'm tempted to just edit the file by hand and go with that.
 

wondercow

Dabbler
Joined
Dec 20, 2015
Messages
15
Hmm, sorry, everything you described sounds correct to me. You could try nuking your jails on the command line, THEN destroying the dataset in the GUI. This was one of my intermediate steps during troubleshooting so perhaps it had an effect?

Code:
cd /mnt/pool/jails
chflags -R noschg *
ls
umount .warden-whateveryoursarecalled
***repeat for all ***
rm -R ./*

Make sure not to typo that last line.

I'd be careful with the ABI edit. It seemed to work for me when I posted earlier, and then an hour later attempting to install or update packages kept throwing a package size mismatch error. Hence why I edited my post. You may dig yourself an even deeper hole doing that.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Worked fine for me.. Even created a 10x template to fix TS3..
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
If I do purchase new hardware (C236 chipset, E3 Xeon v5 CPU, Unbuffered ECC) and get FN 9.10 working / booting on a USB stick.
Can I just import my old ZFS2 volume / array into it? That was under 9.3.1?
 

Mattias Larsson

Dabbler
Joined
Mar 5, 2016
Messages
14
I'm having the same issue that /usr/local/etc/pkg/FreeBSD.conf points to the freebsd:9 repo instead of 10. I did as suggested and deleted all my jains and plugins and deleted the jails-dataset before installing new plugins and jails.

I just replaced the 9 in the conf-files to get on with it.

I upgraded from 9.3.1 -> 9.10 through a bunch of 9.10-nightlies if that might have done something...
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
If I do purchase new hardware (C236 chipset, E3 Xeon v5 CPU, Unbuffered ECC) and get FN 9.10 working / booting on a USB stick.
Can I just import my old ZFS2 volume / array into it? That was under 9.3.1?
Yes, and it's RAIDZ2 - there's no such thing as ZFS2.
 

Middling

Dabbler
Joined
Mar 3, 2012
Messages
40
I'm having the same issue that /usr/local/etc/pkg/FreeBSD.conf points to the freebsd:9 repo instead of 10. I did as suggested and deleted all my jains and plugins and deleted the jails-dataset before installing new plugins and jails.

When FreeNAS creates a new jail it must be modifying the jail's /usr/local/etc/pkg/repos/FreeBSD.conf to use the old 9.3 repos because the 10.3 template used to create jails has the correct path in its own FreeBSD.conf file.

Replacing

Code:
url: "pkg+http://pkg.FreeBSD.org/freebsd:9:x86:64/latest",

with
Code:
   url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",


gets pkg working properly.
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
Thanks for adding the jed editor to FreeNAS 9.10!
 

mccann73

Dabbler
Joined
Dec 11, 2013
Messages
41
Having the same problem as well, i have uninstalled all jails and deleted the dataset and reboot, created a new jails dataset (no files in it), installing a new plugin or jail still causes the error

The new jail templates contain the correct line and its downloading the correct jail templates, confirmed all the jails are freebsd v10...

FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
enabled: yes
}

on each each Jail or plugin I create it has this line, the rest of freebsd.conf is corret including the ABI = "FreeBSD:10:amd64"; & ALTABI = "freebsd:10:x86:64", so something must be modifying it at install??

FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/freebsd:9:x86:64/latest",
mirror_type: "srv",
enabled: yes
}
 

Middling

Dabbler
Joined
Mar 3, 2012
Messages
40
I'm no programmer but i think the problem is in https://github.com/freenas/freenas/blob/9.10/src/pcbsd/warden/scripts/backend/functions.sh

Reversing the process that occurs in functions.sh you can see what's happening:

The jail's /usr/local/etc/pkg/repos/FreeBSD.conf file is generated using the pkgsite variable (line 1204).
The pkgsite variable is created from the FREEBSD_MAJOR variable (line 1195).
The FREEBSD_MAJOR variable is created from the FREEBSD_RELEASE variable (line 52).
The FREEBSD_RELEASE variable is set either in /usr/local/etc/warden.conf (line 46) or uname (line 48).

Despite having upgraded to 9.10 my FreeNAS /usr/local/etc/warden.conf still has a FREEBSD_RELEASE value of 9.1-RELEASE so the major version ends up getting set to FreeBSD 9 in the jail's /usr/local/etc/pkg/repos/FreeBSD.conf file and pkg doesn't work.
 

kjp4756

Contributor
Joined
Feb 11, 2014
Messages
102
I'm no programmer but i think the problem is in https://github.com/freenas/freenas/blob/9.10/src/pcbsd/warden/scripts/backend/functions.sh

Reversing the process that occurs in functions.sh you can see what's happening:

The jail's /usr/local/etc/pkg/repos/FreeBSD.conf file is generated using the pkgsite variable (line 1204).
The pkgsite variable is created from the FREEBSD_MAJOR variable (line 1195).
The FREEBSD_MAJOR variable is created from the FREEBSD_RELEASE variable (line 52).
The FREEBSD_RELEASE variable is set either in /usr/local/etc/warden.conf (line 46) or uname (line 48).

Despite having upgraded to 9.10 my FreeNAS /usr/local/etc/warden.conf still has a FREEBSD_RELEASE value of 9.1-RELEASE so the major version ends up getting set to FreeBSD 9 in the jail's /usr/local/etc/pkg/repos/FreeBSD.conf file and pkg doesn't work.
Good job. I was beginning to lose my mind over the issue.

My install was a clean 9.10 install then I restored my 9.3 config over top. I had to do that because my flash drive died during the upgrade process.
 
Status
Not open for further replies.
Top