Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
If transient unit don't terminate itself in timeout and is killed, it remained in units list and cannot be started again.
Version-Release number of selected component (if applicable):
systemd-219-9.el7.x86_64
How reproducible:
systemd-219-9.el7.x86_64
Steps to Reproduce:
1.systemd-run --unit foo ./daemon.sh
2.systemctl stop foo.service
3.systemctl -l status foo.service
3.systemctl stop foo.service
4.systemd-run --unit foo ./daemon.sh
Actual results:
● foo.service - /mnt/testarea/test/./daemon.sh
Loaded: loaded (/run/systemd/system/foo.service; static; vendor preset: disabled)
Drop-In: /run/systemd/system/foo.service.d
└─50-Description.conf, 50-ExecStart.conf
Active: failed (Result: signal) since Thu 2015-08-20 10:31:59 EDT; 9s ago
Process: 2567 ExecStart=/mnt/testarea/test/./daemon.sh (code=killed, signal=KILL)
Main PID: 2567 (code=killed, signal=KILL)
Aug 20 10:29:35 qeos-50.lab.eng.rdu2.redhat.com daemon.sh[2567]: trap -- 'catchSignal TERM' SIGTERM
Aug 20 10:29:35 qeos-50.lab.eng.rdu2.redhat.com daemon.sh[2567]: trap -- 'catchSignal ALRM' SIGVTALRM
Aug 20 10:30:29 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: Stopping /mnt/testarea/test/./daemon.sh...
Aug 20 10:30:29 qeos-50.lab.eng.rdu2.redhat.com daemon.sh[2567]: Terminated
Aug 20 10:30:29 qeos-50.lab.eng.rdu2.redhat.com daemon.sh[2567]: TERM cought
Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: foo.service stop-sigterm timed out. Killing.
Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: foo.service: main process exited, code=killed, status=9/KILL
Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: Stopped /mnt/testarea/test/./daemon.sh.
Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: Unit foo.service entered failed state.
Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: foo.service failed.
Failed to start transient service unit: Unit foo.service already exists.
Expected results:
some way to vaporize transient unit and have chance to use same name again.
Additional info:
[0 root@qeos-50 test]# cat ./daemon.sh
#!/bin/bash
function catchSignal() {
echo "$@ cought" >&2;
}
trap "catchSignal HUP" SIGHUP;
trap "catchSignal TERM" SIGTERM;
trap "catchSignal KILL" SIGKILL;
trap "catchSignal ALRM" SIGVTALRM;
trap -p;
while true; do
sleep 60;
done;
> Expected results:
> some way to vaporize transient unit and have chance to use same name again.
reset-failed?
[root@notas ~]# systemd-run --unit test false
Running as unit test.service.
[root@notas ~]#
[root@notas ~]# systemd-run --unit test false
Failed to start transient service unit: Unit test.service already exists.
[root@notas ~]# systemctl reset-failed test
[root@notas ~]# systemd-run --unit test false
Running as unit test.service.
Description of problem: If transient unit don't terminate itself in timeout and is killed, it remained in units list and cannot be started again. Version-Release number of selected component (if applicable): systemd-219-9.el7.x86_64 How reproducible: systemd-219-9.el7.x86_64 Steps to Reproduce: 1.systemd-run --unit foo ./daemon.sh 2.systemctl stop foo.service 3.systemctl -l status foo.service 3.systemctl stop foo.service 4.systemd-run --unit foo ./daemon.sh Actual results: ● foo.service - /mnt/testarea/test/./daemon.sh Loaded: loaded (/run/systemd/system/foo.service; static; vendor preset: disabled) Drop-In: /run/systemd/system/foo.service.d └─50-Description.conf, 50-ExecStart.conf Active: failed (Result: signal) since Thu 2015-08-20 10:31:59 EDT; 9s ago Process: 2567 ExecStart=/mnt/testarea/test/./daemon.sh (code=killed, signal=KILL) Main PID: 2567 (code=killed, signal=KILL) Aug 20 10:29:35 qeos-50.lab.eng.rdu2.redhat.com daemon.sh[2567]: trap -- 'catchSignal TERM' SIGTERM Aug 20 10:29:35 qeos-50.lab.eng.rdu2.redhat.com daemon.sh[2567]: trap -- 'catchSignal ALRM' SIGVTALRM Aug 20 10:30:29 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: Stopping /mnt/testarea/test/./daemon.sh... Aug 20 10:30:29 qeos-50.lab.eng.rdu2.redhat.com daemon.sh[2567]: Terminated Aug 20 10:30:29 qeos-50.lab.eng.rdu2.redhat.com daemon.sh[2567]: TERM cought Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: foo.service stop-sigterm timed out. Killing. Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: foo.service: main process exited, code=killed, status=9/KILL Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: Stopped /mnt/testarea/test/./daemon.sh. Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: Unit foo.service entered failed state. Aug 20 10:31:59 qeos-50.lab.eng.rdu2.redhat.com systemd[1]: foo.service failed. Failed to start transient service unit: Unit foo.service already exists. Expected results: some way to vaporize transient unit and have chance to use same name again. Additional info: [0 root@qeos-50 test]# cat ./daemon.sh #!/bin/bash function catchSignal() { echo "$@ cought" >&2; } trap "catchSignal HUP" SIGHUP; trap "catchSignal TERM" SIGTERM; trap "catchSignal KILL" SIGKILL; trap "catchSignal ALRM" SIGVTALRM; trap -p; while true; do sleep 60; done;