Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1171737 - mock --orphanskills does not work with systemd-nspawn
Summary: mock --orphanskills does not work with systemd-nspawn
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 22
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-08 13:58 UTC by Mikhail Campos
Modified: 2015-10-07 04:06 UTC (History)
6 users (show)

Fixed In Version: 1.2.13-2.fc22 mock-1.2.13-2.fc21 mock-1.2.13-2.el7 mock-1.2.13-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-23 04:10:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
correct orphanskill() when systemd-nspawn used (2.76 KB, patch)
2015-01-14 16:16 UTC, Mikhail Campos
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1142105 0 unspecified CLOSED systemd-nspawn: Container failed with error code 251 2022-05-16 11:32:56 UTC
Red Hat Bugzilla 1267161 0 unspecified CLOSED TypeError: 'str' does not support the buffer interface 2022-05-16 11:32:56 UTC

Internal Links: 1142105 1267161

Description Mikhail Campos 2014-12-08 13:58:16 UTC
Description of problem:
mock --orphanskill does nothing when mock --new-chroot used 

Version-Release number of selected component:
1.2.3-1

How reproducible:
always

Steps to Reproduce:
1. First terminal: mock --no-clean --shell --new-chroot "/usr/bin/sleep 100"
2. Second terminal: mock --orphanskill

Actual results:
Nothing happens

Expected results:
Killing of running processes in chroot

Comment 1 Miroslav Suchý 2015-01-12 23:28:56 UTC
Hmm with NSPAWN we should call
  machinectl terminate UUID
which should kill all processes in that container.

Comment 2 Mikhail Campos 2015-01-14 10:28:01 UTC
Yes, I tried to implement this in such way, but there was systemd-nspawn bug (systemd-208). When you terminate machine, next time you run systemd-nspawn with the same UUID it will result in error 251.

Comment 3 Miroslav Suchý 2015-01-14 14:06:00 UTC
We know use generated uuid, so it pretty low chance to hit bug 1142105. And we can work independently. So we fix it on our side and then wait till systemd guys fix their side.

Mikhail if you have patch with such fix, I would be happy to review and accept it.

Comment 4 Mikhail Campos 2015-01-14 16:16:22 UTC
Created attachment 980100 [details]
correct orphanskill() when systemd-nspawn used

Actually, I have patch, but I am not sure whether it's quite good implementation...

Comment 5 Jaroslav Reznik 2015-03-03 17:06:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 6 Miroslav Suchý 2015-09-15 11:38:44 UTC
Hmm this does not work. When you use reproducer from #0 then 1) will have different UUID from 2).

Comment 7 Mikhail Campos 2015-09-15 12:29:45 UTC
Yes, sorry for this, that was absolutely wrong.

Should we use some prefix (for ex. "mock-" + uuid) in order to find running containers with machinectl?

Comment 8 Miroslav Suchý 2015-09-15 22:30:32 UTC
I enhanced your original patch and I use 
  machinectl list
and
  machinectl show -pRootDirectory UUID
to get UUID of machine, which has the same chrootpath.

Fixed in commits:
* 674d894 (HEAD -> devel, origin/devel) actually verify chroot path of systemd-nspawn VM [RHBZ#1171737]
* 3d04132 for orphanskill() get UUID of systemd-nspawn VM for our chroot [RHBZ#1171737]
* 38b10c5 Use 'machinectl terminate' inside orphanskill() when systemd-nspawn used [RHBZ#1171737]

Thank you for the initial work.

Comment 9 Fedora Update System 2015-09-16 20:02:19 UTC
mock-1.2.13-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053

Comment 10 Fedora Update System 2015-09-16 20:05:14 UTC
mock-1.2.13-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054

Comment 11 Fedora Update System 2015-09-16 20:07:18 UTC
mock-1.2.13-2.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056

Comment 12 Fedora Update System 2015-09-16 20:08:56 UTC
mock-1.2.13-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114

Comment 13 Fedora Update System 2015-09-16 20:10:04 UTC
mock-1.2.13-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115

Comment 14 Fedora Update System 2015-09-17 21:30:27 UTC
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054

Comment 15 Fedora Update System 2015-09-18 05:21:18 UTC
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056

Comment 16 Fedora Update System 2015-09-18 16:24:47 UTC
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053

Comment 17 Fedora Update System 2015-09-19 03:20:13 UTC
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115

Comment 18 Fedora Update System 2015-09-19 03:22:01 UTC
mock-1.2.13-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114

Comment 19 Fedora Update System 2015-09-23 04:09:30 UTC
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2015-09-24 08:22:36 UTC
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2015-10-05 22:51:05 UTC
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2015-10-07 03:05:32 UTC
mock-1.2.13-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2015-10-07 04:05:50 UTC
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.