Error when updating a Jail 11.3-RELEASE-p6 to 11.3-RELEASE-p612
Description
Problem/Justification
None
Impact
None
SmartDraw Connector
Katalon Manual Tests (BETA)
Activity
Waqar
August 26, 2020 at 12:06 PM
@Florian Lederer we do not control the freebsd upgrade process itself and just initiate it. You must have had merge conflicts or some thing similar which resulted in getting an empty file.
Florian Lederer
August 21, 2020 at 9:49 PM
(edited)
After upgrading freenas from 11.2 to 11.3 I upgraded all jails using following script
#!/bin/bash
VERSION="11.3-RELEASE"
JAILS=`iocage list -h | cut -f2-3 | grep up$ | cut -f1`
for JAIL in $JAILS; do
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo Upgrading Jail $JAIL to $VERSION
iocage upgrade -r $VERSION $JAIL
echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
done
so using "iocage upgrade -r 11.3-RELEASE jail_name" for all active jails
This successfully updated all jails to 11.3-RELEASE-p6
Florian Lederer
August 21, 2020 at 9:37 PM
(edited)
The file is empty in all failed jails
root@mysql:~ # ls -lisa /etc/freebsd-update.conf
183438 1 -rw-r--r-- 1 root wheel 0 Aug 14 22:18 /etc/freebsd-update.conf
In the jail with an successfull update the content of /etc/freebsd-update.conf looks like:
root@calibre:~ # cat /etc/freebsd-update.conf
# $FreeBSD: releng/11.3/etc/freebsd-update.conf 257694 2013-11-05 09:30:06Z glebius $
# Trusted keyprint. Changing this is a Bad Idea unless you've received
# a PGP-signed email from <security-officer@FreeBSD.org> telling you to
# change it and explaining why.
KeyPrint 800651ef4b4c71c27e60786d7b487188970f4b4169cc055784e21eb71d410cc5
# Server or server pool from which to fetch updates. You can change
# this to point at a specific server if you want, but in most cases
# using a "nearby" server won't provide a measurable improvement in
# performance.
ServerName update.FreeBSD.org
# Components of the base system which should be kept updated.
Components src world
# Example for updating the userland and the kernel source code only:
# Components src/base src/sys world
# Paths which start with anything matching an entry in an IgnorePaths
# statement will be ignored.
IgnorePaths
# Paths which start with anything matching an entry in an IDSIgnorePaths
# statement will be ignored by "freebsd-update IDS".
IDSIgnorePaths /usr/share/man/cat
IDSIgnorePaths /usr/share/man/whatis
IDSIgnorePaths /var/db/locate.database
IDSIgnorePaths /var/log
# Paths which start with anything matching an entry in an UpdateIfUnmodified
# statement will only be updated if the contents of the file have not been
# modified by the user (unless changes are merged; see below).
UpdateIfUnmodified /etc/ /var/ /root/ /.cshrc /.profile
# When upgrading to a new FreeBSD release, files which match MergeChanges
# will have any local changes merged into the version from the new release.
MergeChanges /etc/ /boot/device.hints
### Default configuration options:
# Directory in which to store downloaded updates and temporary
# files used by FreeBSD Update.
# WorkDir /var/db/freebsd-update
# Destination to send output of "freebsd-update cron" if an error
# occurs or updates have been downloaded.
# MailTo root
# Is FreeBSD Update allowed to create new files?
# AllowAdd yes
# Is FreeBSD Update allowed to delete files?
# AllowDelete yes
# If the user has modified file ownership, permissions, or flags, should
# FreeBSD Update retain this modified metadata when installing a new version
# of that file?
# KeepModifiedMetadata yes
# When upgrading between releases, should the list of Components be
# read strictly (StrictComponents yes) or merely as a list of components
# which *might* be installed of which FreeBSD Update should figure out
# which actually are installed and upgrade those (StrictComponents no)?
# StrictComponents no
# When installing a new kernel perform a backup of the old one first
# so it is possible to boot the old kernel in case of problems.
# BackupKernel yes
# If BackupKernel is enabled, the backup kernel is saved to this
# directory.
# BackupKernelDir /boot/kernel.old
# When backing up a kernel also back up debug symbol files?
# BackupKernelSymbolFiles no
Complete
Details
Details
Assignee
Waqar
WaqarReporter
Florian Lederer
Florian LedererComponents
Fix versions
Affects versions
Priority
More fields
Time tracking
More fields
Time trackingKatalon Platform
Linked Test Cases, Katalon Defect Results, Katalon Studio Test Results
Katalon Platform
Linked Test Cases, Katalon Defect Results, Katalon Studio Test Results
Created August 14, 2020 at 9:02 PM
Updated July 1, 2022 at 4:55 PM
Resolved August 26, 2020 at 2:32 PM
When updating the Jail in the UI (screenshot 1)
the error message "Error: b'" is shown in a message box (screenshot 2)
in the middleware.log this error is logged:
[2020/08/14 22:15:12] (ERROR) middlewared.job.run():361 - Job .wrap. .nf of <middlewared
.plugins.jail.JailService object at 0x82a10a390>> failed
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_fetch.py", line 908, in fetch_update
_exec, callback=self.callback)
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 903, in consume_and_log
for output in filter(lambda o: any(v for v in o), exec_gen):
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_exec.py", line 260, in exec_jail
list(stderr_queue)
iocage_lib.ioc_exceptions.CommandFailed: [b'', b'']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 349, in run
await self.future
File "/usr/local/lib/python3.7/site-packages/middlewared/job.py", line 387, in __run_body
rv = await self.middleware.run_in_thread(self.method, *([self] + args))
File "/usr/local/lib/python3.7/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
return await self.loop.run_in_executor(self.run_in_thread_executor, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.7/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 965, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/jail.py", line 1409, in update_to_latest_patch
iocage.update(update_pkgs)
File "/usr/local/lib/python3.7/site-packages/iocage_lib/iocage.py", line 1944, in update
).fetch_update(*params)
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_fetch.py", line 917, in fetch_update
silent=self.silent
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 103, in logit
callback(content, exception)
File "/usr/local/lib/python3.7/site-packages/iocage_lib/ioc_common.py", line 76, in callback
raise callback_exception(message)
RuntimeError: b''