代码拉取完成,页面将自动刷新
【标题描述】能够简要描述问题:说明什么场景下,做了什么操作,出现什么问题(尽量使用正向表达方式)
【环境信息】
【问题复现步骤】
执行如下脚本可复现,若脚本卡住,可执行systemctl list-jobs查看已存在nop 状态的服务,这会导致sytemctl动作卡住
必现
cat > /etc/systemd/system/test1.service << EOF
[Unit]
Description=whorweTEST1
[Service]
Type=oneshot
ExecStart=/bin/bash /etc/systemd/system/test1.sh
[Install]
WantedBy=test.target
EOF
cat > /etc/systemd/system/test1.sh << EOF
systemctl daemon-reload &
systemctl try-restart test3.service
EOF
chmod +x /etc/systemd/system/test1.sh
cat > /etc/systemd/system/test2.service << EOF
[Unit]
Description=whorweTEST2
After=test1.service
[Service]
ExecStart=/usr/bin/true
[Install]
WantedBy=test.target
EOF
cat > /etc/systemd/system/test3.service << EOF
[Unit]
Description=whorweTEST3
After=test2.service
[Service]
ExecStart=/usr/bin/true
[Install]
WantedBy=test.target
EOF
cat > /etc/systemd/system/test.target << EOF
[Unit]
Description=whorweTEST_TARGET
EOF
systemctl daemon-reload
systemctl enable test1 test2 test3
cp /etc/systemd/system.conf /etc/systemd/system.conf.back
sed -i 's/#DefaultStartLimitBurst=5/DefaultStartLimitBurst=500/g' /etc/systemd/system.conf
systemctl daemon-reload
for i in `seq 1 100`; do
systemctl stop test1 test2 test3 test.target;
systemctl restart test.target;
if [ $(($i%10)) = "0" ]; then
echo $i;
fi
done
mv /etc/systemd/system.conf.back /etc/systemd/system.conf
rm -rf /etc/systemd/system/test*
systemctl daemon-reload
【预期结果】
nop 状态进程会被清理,不会影响systemctl动作
【实际结果】
卡住
nop 状态的任务一直存在,未被清理
【附件信息】
Hi likechiguoguo, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Base-service, and any of the maintainers: @hanxinke , @Monday , @BigSkySea , @syyhao , @chenjialong , @谢志鹏 , @yanan-rock , @zhujianwei001 , @hexiaowen , @朱春意
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论