Page MenuHomeDevCentral

/etc/os-release isn't up-to-date on FreeBSD servers
Closed, ResolvedPublic

Description

Still document FreeBSD 13.2 but we're at 14.0 on Complector for example.

Perhaps /etc wasn't properly updated, we should check important files.

Event Timeline

dereckson created this task.
dereckson updated the task description. (Show Details)
salt '*' cmd.run "cat /etc/os-release | grep VERSION"
windriver:
    VERSION="14.0-RELEASE-p8"
    VERSION_ID="14.0"
dwellers:
    VERSION="10"
    VERSION_ID="10"
    REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
docker-002:
    VERSION="9.4 (Blue Onyx)"
    VERSION_ID="9.4"
    ROCKY_SUPPORT_PRODUCT_VERSION="9.4"
    REDHAT_SUPPORT_PRODUCT_VERSION="9.4"
hervil:
    VERSION="13.2-RELEASE-p9"
    VERSION_ID="13.2"
complector:
    VERSION="13.2-RELEASE"
    VERSION_ID="13.2"
db-B-001:
    VERSION="13.2-RELEASE"
    VERSION_ID="13.2"
db-A-001:
    VERSION="13.2-RELEASE-p8"
    VERSION_ID="13.2"
router-001:
    VERSION="13.1-RELEASE-p7"
    VERSION_ID="13.1"
web-001:
    VERSION="13.2-RELEASE"
    VERSION_ID="13.2"

salt '*' cmd.run "uname -r"

windriver:
    14.1-RELEASE
docker-002:
    5.14.0-284.18.1.el9_2.x86_64
complector:
    14.0-RELEASE-p3
dwellers:
    5.14.0-319.el9.x86_64
hervil:
    14.0-RELEASE-p3
db-B-001:
    14.0-RELEASE-p3
db-A-001:
    14.0-RELEASE-p3
router-001:
    13.2-RELEASE
web-001:
    14.0-RELEASE-p3
dereckson renamed this task from /etc/os-release isn't up-to-date on Complector to /etc/os-release isn't up-to-date on FreeBSD servers.Aug 10 2024, 11:09
dereckson updated the task description. (Show Details)

Unsure how to automate this, because for me this service should be run at boot time.

I suspect the issue is this:

  1. freebsd-update fetch gets all the update material, kernel and userland
  2. The first freebsd-update install installs the kernel
  3. We reboot for the new kernel
  4. The second freebsd-update install installs the new userland

As we don't reboot after that last step, the service os-release isn't restarted.

Solution could be to include the instruction to run service os-release restart in upgrade procedure.

We could also:

  • add a monitoring check
  • contribute upstream a periodic option to regenerate os-release
  • contribute upstream /etc/rc.d/os-release restart as part of freebsd-update script
Complector
$ salt -G "os:freebsd" cmd.run "/etc/rc.d/os-release restart"

windriver:
    Updating /var/run/os-release done.
complector:
    Updating /var/run/os-release done.
hervil:
    Updating /var/run/os-release done.
db-B-001:
    Updating /var/run/os-release done.
router-001:
    Updating /var/run/os-release done.
web-001:
    Updating /var/run/os-release done.
db-A-001:
    Updating /var/run/os-release done.

$ salt -G "os:freebsd" cmd.run "uname -r"

windriver:
    14.1-RELEASE
complector:
    14.0-RELEASE-p3
hervil:
    14.0-RELEASE-p3
router-001:
    13.2-RELEASE
web-001:
    14.0-RELEASE-p3
db-A-001:
    14.0-RELEASE-p3
db-B-001:
    14.0-RELEASE-p3
dereckson claimed this task.