9.10 with old jails defaulting to new jail template

Status
Not open for further replies.

spamminator

Cadet
Joined
Apr 3, 2016
Messages
6
From release notes:

Jails:
FreeBSD Jails now default to a FreeBSD 10.3-RC2 based template.
Old jails, or systems on which jails have been installed, will still
default to the previous FreeBSD 9.3 based template.

I have existing 9.3 jails, so I figured the second line applied to me. However, when I tried to create a new jail today, it appears that one was created using the new 10.3-RC2 template:

root@test_1:/ # freebsd-version -u
10.3-RC2
root@test_1:/ # uname -U
1003000

The same is true of the plugin template. I re-installed the transmission plugin today:

root@transmission_1:/ # freebsd-version -u
10.3-RC2
root@transmission_1:/ # uname -U
1003000

On an old jail, I get (freebsd-version doesn't exist):

root@gogs_1 ~# uname -U
903000

Is this expected? Is there a way to create a jail using the old template on 9.10?


System:
FreeNAS-9.10-STABLE-201603252134 (412fb1c)
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
A note on jails for 9.10: As you will see in the release notes, the FreeNAS jail templates have also been updated to FreeBSD 10.3. Due to the way templates are cached, however, anyone currently using jails (including plugins) will continue to use the cached (already fetched) 9.3 jail templates. This is not really a problem since FreeBSD 10 is backwards compatible with 9.3 and all existing plugins and jails should continue to function normally after the upgrade, but should you create any new jails or plugins, you may be surprised to note that they're also using the 9.3 templates. This is a limitation of the jails architecture in FreeNAS which is being addressed differently in 10, and for now the only way around this is, unfortunately, to nuke your jails dataset completely (to delete all cached templates) along with any jails in it, and start over with a new jails dataset.

http://lists.freenas.org/pipermail/freenas-announce/2016-March/000028.html
 

spamminator

Cadet
Joined
Apr 3, 2016
Messages
6
but should you create any new jails or plugins, you may be surprised to note that they're also using the 9.3 templates.

As stated in the original post, I'm surprised that this ISN'T happening. I WANT to create a new jail using the OLD, cached template, but any jails or plugins I create are using the NEW 10.3 template.
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
They are. What you're seeing is the host kernel, which is FreeBSD 10.3-RC2. If you look at the packages, they're from 9.3. 10.3 is backwards compatible with 9.3 binaries.
 

spamminator

Cadet
Joined
Apr 3, 2016
Messages
6
From one of my old jails:

root@gogs_1 ~> uname -K <host kernel version>
1003000
root@gogs_1 ~> uname -U <userland version>
903000
root@gogs_1 ~> pkg query "%v %q" sqlite3 <version and architecture of the sqlite3 package>
3.11.1 freebsd:9:x86:64

From a freshly created jail:

root@test_1:/ # uname -K <host kernel version>
1003000
root@test_1:/ # uname -U <userland version>
1003000
root@test_1:/ # pkg query "%v %q" sqlite3 <version and architecture of the sqlite3 package>
3.11.1 freebsd:10:x86:64

Moreover, here are the templates I have on my system:

[root@nas ~]# warden template list
Jail Templates:
------------------------------
VirtualBox-4.3.12 - FreeBSD (amd64)
pluginjail - FreeBSD (amd64)
pluginjail-9.3-x64 - FreeBSD (amd64)
standard - FreeBSD (amd64)
standard-9.3-x64 - FreeBSD (amd64)

If I delete the standard template and try to create a new jail, FreeNAS re-downloads the 10.3 jail template and saves it as "standard". If I then try to delete the standard template:

[root@nas ~]# warden template delete standard
cannot destroy 'rz1_4x1tb/jails/.warden-template-standard': filesystem has depen
dent clones
use '-R' to destroy the following datasets:
rz1_4x1tb/jails/test_1 <this is the jail I just created>

I've tried changing the Collections URL to http://download.freenas.org/jails/9.3/x64/ -- no dice. I think I might be able to work around this by creating a new custom template and pointing it at http://download.freenas.org/jails/9.3/x64/freenas-standard-9.3-RELEASE.tgz, but that doesn't solve the issue for plugins.
 
Last edited:

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
As per the announcement, you must re-create your jail root if you want the 10.3-RC2 template.
 

spamminator

Cadet
Joined
Apr 3, 2016
Messages
6
Again, I know, I can read. But I DON'T want the 10.3-RC2 template. I want the OLD 9.3 template, but FreeNAS seems hell-bent on giving me the new one.
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
If I delete the standard template and try to create a new jail, FreeNAS re-downloads the 10.3 jail template and saves it as "standard".
I think you have your answer. You deleted the standard jail, so any templates it downloads from there will match the current version of the base OS you're running.

If you need 9.3, you should roll back FreeNAS to 9.3.
 
Joined
Dec 2, 2015
Messages
730
I get the same behaviour on my FreeNAS, updated from 9.3.1 to 9.10. The existing jails still work fine. A new jail used a FreeBSD 10.3-RC2 based template.

pkg would not work in the new jail. I had to edit /usr/local/etc/pkg/repos/FreeBSD.conf in the new jail, replacing "freebsd:9:x86:64" with "${ABI}". Now the new jail works.

This may be related to bug #14293, which is supposed to be fixed in the next update.
 
Status
Not open for further replies.
Top