Solved freebsd-version and uname report different versions of FreeBSD

We have an iocage administered jail that was recently updated to 13.2 from 13.1. However, we see this:

Code:
[root@vhost02 ~ (master)]# iocage list
+-----+--------+-------+--------------+--------------------------------+
| JID |  NAME  | STATE |   RELEASE    |              IP4               |
+=====+========+=======+==============+================================+
| 1   |  xx    | up    | 13.2-RELEASE | aaa.bbb.ccc.nnn                |
+-----+--------+-------+--------------+--------------------------------+
| 4   | imap-3 | up    | 12.3-RELEASE | aaa.bbb.ccc.nnn                |
+-----+--------+-------+--------------+--------------------------------+
| 2   |  zz    | up    | 13.2-RELEASE | aaa.bbb.ccc.nnn                |
+-----+--------+-------+--------------+--------------------------------+

[root@vhost02 ~ (master)]# iocage console imap-3

root@imap-3:~ # freebsd-version ; uname -a
13.1-RELEASE
FreeBSD imap-3.windsor.harte-lyne.ca 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64

[root@vhost02 ~ (master)]# iocage console imap-3

root@imap-3:~ # bash

[root@imap-3 ~ (master)]# freebsd-version ; uname -a
13.1-RELEASE
FreeBSD imap-3.windsor.harte-lyne.ca 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64

uname reports 13.2 in both cases, but freebsd-version does not.

The jail imap-3 was previously upgraded to 13.1, but evidently the jail's config.jason file was not updated. Likewise it was not updated after the most recent upgrade.

The problem with freebsd-version appears to be that the script itself was not updated so: `USERLAND_VERSION="13.1-RELEASE"`. Why not is the question.

There are two other jails running on this host. Both have been upgraded to 13.2 using the same command as was used for imap-3. Neither displays this anomaly.
 
uname reports 13.2 in both cases, but freebsd-version does not.
freebsd-version(1) shows the version of the userland, uname(8) shows the version of the running kernel. Jails run on the host's kernel.

Code:
     If	several	of the above options are specified, freebsd-version will print
     the installed kernel version first, then the running kernel version, next
     the userland version, and finally the userland version of the specified
     jails, on separate	lines.	If neither is specified, it will print the
     userland version only.
 
Back
Top