Post upgrade – checking the jails

Stuff goes wrong. I like to check. Trust. But. Verify.

Skip to the end for the list of useful commands.

Here’s some of that verification, as briefly mentioned in FreeBSD 14 upgrade – files not removed by delete-old and Excluding some jails from upgrade.

After upgrading all the jails on r730-01, I wanted to make sure that all the binaries had been updated from FreeBSD 13. Here’s what I did.

This tells me foo had not yet been updated.

[19:54 r730-01 dvl /jails] % file /jails/*/bin/sh | grep '13.2'
/jails/foo/bin/sh:               ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 13.2, FreeBSD-style, stripped

I updated it.

Now, let’s check sbin

[20:00 r730-01 dvl /jails] % file */sbin/* | grep '13.2'
pkg01/sbin/iscontrol:                   ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 13.2, FreeBSD-style, stripped
pkg01/sbin/spppcontrol:                 ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 13.2, FreeBSD-style, stripped

Ahh, pkg01 was the first jail I updated. It has the same problem delete-old problem I blogged about earlier. I fixed the problem by using the steps shown there.

Next, I looked at /usr/local/sbin:

[20:07 r730-01 dvl /jails] % file */usr/local/sbin/* | grep '13.2'
bacula-sd-02/usr/local/sbin/pkg-static.pkgsave:                  ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
bacula-sd-03/usr/local/sbin/pkg-static.pkgsave:                  ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
besser/usr/local/sbin/pkg-static.pkgsave:                        ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
certs-rsync/usr/local/sbin/pkg-static.pkgsave:                   ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
certs/usr/local/sbin/pkg-static.pkgsave:                         ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
dev-ingress01/usr/local/sbin/pkg-static.pkgsave:                 ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
dev-nginx01/usr/local/sbin/pkg-static.pkgsave:                   ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
dev-pgeu/usr/local/sbin/pkg-static.pkgsave:                      ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
dns-hidden-master/usr/local/sbin/pkg-static.pkgsave:             ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
dns1/usr/local/sbin/pkg-static.pkgsave:                          ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
fileserver/usr/local/sbin/pkg-static.pkgsave:                    ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
git/usr/local/sbin/pkg-static.pkgsave:                           ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
jail-testing/usr/local/sbin/pkg-static.pkgsave:                  ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
jail_within_jail/usr/local/sbin/pkg-static.pkgsave:              ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
mqtt01/usr/local/sbin/pkg-static.pkgsave:                        ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
mydev/usr/local/sbin/dns-notify.8113.2018-04-07@21:25:11~:       POSIX shell script, ASCII text executable
mydev/usr/local/sbin/pkg-static.pkgsave:                         ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
mysql01/usr/local/sbin/pkg-static.pkgsave:                       ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
nsnotify/usr/local/sbin/pkg-static.pkgsave:                      ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
pg01/usr/local/sbin/pkg-static.pkgsave:                          ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
pg02/usr/local/sbin/pkg-static.pkgsave:                          ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
samdrucker/usr/local/sbin/pkg-static.pkgsave:                    ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
serpico/usr/local/sbin/pkg-static.pkgsave:                       ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
stage-ingress01/usr/local/sbin/pkg-static.pkgsave:               ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
stage-nginx01/usr/local/sbin/pkg-static.pkgsave:                 ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
svn/usr/local/sbin/pkg-static.pkgsave:                           ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
talos/usr/local/sbin/pkg-static.pkgsave:                         ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
test-ingress01/usr/local/sbin/pkg-static.pkgsave:                ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
test-nginx01/usr/local/sbin/pkg-static.pkgsave:                  ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped
webserver/usr/local/sbin/pkg-static.pkgsave:                     ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 13.2, FreeBSD-style, with debug_info, not stripped

I deleted this with this:

[20:09 r730-01 dvl /jails] % file */usr/local/sbin/* | grep '13.2' | grep pkgsave | cut -f 1 -d ':' | xargs sudo rm 

[20:09 r730-01 dvl /jails] % file */usr/local/sbin/* | grep '13.2'                                                  
mydev/usr/local/sbin/dns-notify.8113.2018-04-07@21:25:11~:       POSIX shell script, ASCII text executable

[20:12 r730-01 dvl /jails] % sudo rm mydev/usr/local/sbin/dns-notify.8113.2018-04-07@21:25:11~

More checks, including the host:

[20:09 r730-01 dvl /jails] % file */usr/local/bin/* | grep '13.2'  
[20:09 r730-01 dvl /jails] % file /usr/local/bin/* | grep '13.2'  
[20:12 r730-01 dvl /jails] % file /usr/local/sbin/* | grep '13.2' 
[20:12 r730-01 dvl /jails] % file /sbin/* | grep '13.2'  

The summary

Here’s the short version of the commands, first for the jails (more likely to have issues) and then for the host (less likely):

[20:22 r730-01 dvl /jails] % file */bin */sbin */usr/local/bin/* */usr/local/sbin/* | grep 13.2
[20:22 r730-01 dvl /jails] % file  /bin  /sbin  /usr/local/bin/*  /usr/local/sbin/* | grep 13.2
[20:23 r730-01 dvl /jails] % 

Thank you for coming to my TED talk.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top