BastilleBSD / bastille

Bastille is an open-source system for automating deployment and management of containerized applications on FreeBSD.
https://bastillebsd.org
BSD 3-Clause "New" or "Revised" License
858 stars 140 forks source link

[BUG] Upgrading jail from 13.2 -> 14.0 fails when trying to upgrade packages #652

Closed tobybryans closed 11 months ago

tobybryans commented 11 months ago

[MANDATORY] Describe the bug [MANDATORY] Hi @cedwards ,

I've tried the latest jail upgrade instructions for a 13.2 -> 14.0 upgrade, but when I try to do the pkg upgrade it fails:

doas bastille pkg web-bryans upgrade -f
Password:
[web-bryans]:
ld-elf.so.1: Shared object "libssl.so.111" not found, required by "pkg"

and attempting to get a console also fails (although somewhat more silently):

┌──(builder㉿buur06)-[~]
└─$ doas bastille console web-bryans
Password:
[web-bryans]:

┌──(builder㉿buur06)-[~]
└─$

The edit I do to the jail fstab is from: /usr/local/bastille/releases/13.2-RELEASE /usr/local/bastille/jails/web-bryans/root/.bastille nullfs ro 0 0 to: /usr/local/bastille/releases/14.0-RELEASE /usr/local/bastille/jails/web-bryans/root/.bastille nullfs ro 0 0

[MANDATORY] Bastille and FreeBSD version (paste bastille -v && freebsd-version -kru output) 0.9.20220714 14.0-RELEASE-p3 14.0-RELEASE-p3 14.0-RELEASE-p4

[MANDATORY] How did you install bastille? (port/pkg/git) pkg

[optional] Steps to reproduce? Have a 13.2 jail, do the major release upgrade to 14.0 as described here: https://bastille.readthedocs.io/en/latest/chapters/upgrading.html

[optional] Expected behavior A bastille jail running with 14.0.

[optional] Additional context This jail was relatively recently created from a standard 13.2-RELEASE template which has been upgraded to -p9 from the initial 13.2 release. The host has just been upgraded to 14.0-RELEASE-p4 from 13.2-RELEASE-p9.

louwe commented 11 months ago

libssl has been upgraded in FreeBSD 14.0-RELEASE. I think you need to bootstrap it first.

Try bastille cmd web-bryans pkg-static bootstrap -f then upgrade your packages again after that.

jamesoff commented 11 months ago

Not sure I have it all figured out yet, but I had to comment out the two opie releated lines in /etc/pam.d/system in my jail, as the libraries for that seem to be gone, and there was output complaining about them in messages. The opie lines aren't present on another 14.0 host so that seems like the right action.

(Edit: this is in addition to redoing pkg bootstrap - to fix the failure of console to work. You can get a shell in the jail with bastille cmd JAIL /bin/sh)

jamesoff commented 11 months ago

This entry from UPDATING is related: https://cgit.freebsd.org/src/tree/UPDATING?h=releng%2F14.0#n271

tobybryans commented 11 months ago

Thank you @louwe, @jamesoff that fixes everything, and some good tips for my notes. Appreciated.