Bug 18852 - 自定义镜像安装一开始就报yum.Errors.RepoError: SQLite objects created in a thread can only be used in that same thread,导致安装不能进行,不能安装成功;但是有时又没报这个错误,可以安装成功。
Summary: 自定义镜像安装一开始就报yum.Errors.RepoError: SQLite objects created in a thread can only...
Status: NEW
Alias: None
Product: Anolis OS 7
Classification: Anolis OS
Component: Images&Installations (show other bugs) Images&Installations
Version: 7.9
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: yunqi-zwt
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-17 17:00 UTC by LxDarway888
Modified: 2025-02-17 18:38 UTC (History)
1 user (show)

See Also:


Attachments
安装报错的截图 (138.58 KB, image/png)
2025-02-17 17:00 UTC, LxDarway888
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LxDarway888 2025-02-17 17:00:23 UTC
Created attachment 1300 [details]
安装报错的截图

Description of problem:
基于龙蜥anolis7.9版本做了一个自定义镜像,有时安装一开始就报yum.Errors.RepoError: SQLite objects created in a thread can only be used in that same thread,导致安装不能进行,不能安装成功;但是有时又没报这个错误,可以安装成功。

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.配置vSphere 虚拟机,2核、4G内存、26G磁盘空间
2.选择自定义镜像
3.开始安装

Actual results:
有时安装一开始就报yum.Errors.RepoError: SQLite objects created in a thread can only be used in that same thread,导致安装不能进行,不能安装成功。
附件有错误截图“龙蜥7.9自定义镜像安装报错.png”。

Expected results:
每次都安装成功

Additional info:

kickstart文件内容:

#version=DEVEL
# System authorization information
reboot --eject
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
text
# Run the Setup Agent on first boot
#firstboot --enable
firewall --disabled
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
#network  --bootproto=dhcp --device=ens32 --onboot=off --ipv6=auto --no-activate
#network  --hostname=localhost.localdomain
network --onboot=yes --device=ens32 --bootproto=static --ip=192.168.1.1 --netmask=255.255.255.0 --gateway=192.168.1.1 --ipv6=auto --nameserver=192.168.1.1 --activate
network  --hostname=UCP


# Root password
rootpw --iscrypted $6$i4GMnhbuxEHyfaE3$x/tUZ7QK.SaUATcz24MZl4fTyG/To/Qhyplu481coO26b2mj/IM3anCT8y6XoIE9E5vDwtr.KnLIOAjseRcEA0
# System services
services --disabled="chronyd"
# System timezone
timezone Asia/Shanghai --isUtc --nontp
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
#autopart --type=lvm
%include /tmp/partlist
# Partition clearing information
#clearpart --none --initlabel

%packages
@^virtualization-host-environment
@core
bpftool-3.10.0-1160.an7
kernel-3.10.0-1160.an7
kernel-devel-3.10.0-1160.an7
kernel-headers-3.10.0-1160.an7
kernel-tools-3.10.0-1160.an7
kexec-tools
perf-3.10.0-1160.an7
python-perf-3.10.0-1160.an7
-bpftool-4.19.91-25.3.an7
-kernel-4.19.91-25.3.an7
-kernel-devel-4.19.91-25.3.an7
-kernel-headers-4.19.91-25.3.an7
-kernel-tools-4.19.91-25.3.an7
-perf-4.19.91-25.3.an7
-python-perf-4.19.91-25.3.an7
dos2unix
vim
rsync
wget
memcached
telnet
unzip
zip
usbutils
xinetd
lrzsz
psmisc
net-tools
libaio
ntpdate
tigervnc-server
freeglut
nfs-utils

%end

%pre
#!/bin/sh
disk_device=`fdisk -l|grep Disk| grep dev | grep -v loop | sed -n 1p|awk '{print $2}'|awk -F '/' '{print $3}'|sed s/://g`
echo "clearpart --all" >>/tmp/partlist
echo "part /boot --fstype="xfs" --size=300 --ondisk=$disk_device --asprimary" >>/tmp/partlist
echo "part swap --size 2048 --ondisk=$disk_device --asprimary" >>/tmp/partlist
echo "part /    --fstype=xfs --grow --size=1 --ondisk=$disk_device --asprimary" >>/tmp/partlist
%end


%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

%anaconda
pwpolicy root --minlen=6 --minquality=50 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=50 --notstrict --nochanges --notempty
pwpolicy luks --minlen=6 --minquality=50 --notstrict --nochanges --notempty
%end

%post --nochroot
mkdir -p /mnt/source
mount -o loop /dev/cdrom /mnt/source
cp -a /mnt/source/Conference /mnt/sysimage/root/
cp -a /mnt/source/appxt.zip /mnt/sysimage/root/
unzip /mnt/sysimage/root/application.zip -d /mnt/sysimage/ >/mnt/sysimage/root/.install_unzip
 1>>/mnt/sysimage/root/post_install-nochroot.log 2>post_install-nochroot.err
/usr/bin/eject -r -v /dev/cdrom
sleep 1
 1>>/mnt/sysimage/root/post_install-nochroot.log 2>post_install-nochroot.err
%end

%post
echo "max_parallel_downloads=1" >> /etc/yum.conf
(
/bin/sh /root/Conference/xtInstallation.sh
/bin/rm -rf /root/Conference
/bin/rm -rf /root/appxt.zip
) 1>>/root/post_install-chroot.log 2>post_install-chroot.err
%end
Comment 1 LxDarway888 2025-02-17 18:38:38 UTC
以上kickstart文件
unzip /mnt/sysimage/root/application.zip -d /mnt/sysimage/
这行,正确是
unzip /mnt/sysimage/root/appxt.zip -d /mnt/sysimage/ 

另外
%post后的
echo "max_parallel_downloads=1" >> /etc/yum.conf
这行是查网上资源后加上的,限制并行下载线程数为 1。

这行加不加上,安装自定义镜像时有时都会报
yum.Errors.RepoError: SQLite objects created in a thread can only be used in that same thread