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 1419501
Summary: | "machinectl" fails when virtual machine/container is running | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vít Ondruch <vondruch> | ||||
Component: | systemd | Assignee: | systemd-maint | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 26 | CC: | Frodox, jdisnard, johannbg, jsynacek, lnykryn, mebrown, msekleta, msimacek, msuchy, muadda, praiskup, riehecky, ssahani, s, systemd-maint, williams, zbyszek | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | systemd-232-14.fc26 systemd-233-3.fc26 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-04-01 17:09:21 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Vít Ondruch
2017-02-06 11:15:46 UTC
So here is the log I got with "debug" on kernel cmdline running plain "machinectl": ~~~ $ LANG=C.utf-8 journalctl -u systemd-machined -b -f -x ... snip ... Feb 10 16:40:28 localhost.localdomain systemd-machined[3304]: Got message type=method_call sender=:1.106 destination=org.freedesktop.machine1 object=/org/freedesktop/machine1 interface=org.freedesktop.machine1.Manager member=ListMachines cookie=2 reply_cookie=0 error=n/a Feb 10 16:40:28 localhost.localdomain systemd-machined[3304]: Sent message type=method_return sender=n/a destination=:1.106 object=n/a interface=n/a member=n/a cookie=20 reply_cookie=2 error=n/a Feb 10 16:40:28 localhost.localdomain systemd-machined[3304]: Got message type=method_call sender=:1.106 destination=org.freedesktop.machine1 object=/org/freedesktop/machine1 interface=org.freedesktop.machine1.Manager member=GetMachineOSRelease cookie=3 reply_cookie=0 error=n/a Feb 10 16:40:28 localhost.localdomain systemd-machined[3304]: Sent message type=error sender=n/a destination=:1.106 object=n/a interface=n/a member=n/a cookie=21 reply_cookie=3 error=Requesting OS release data is only supported on container machines. Feb 10 16:40:28 localhost.localdomain systemd-machined[3304]: Failed to process message [type=method_call sender=:1.106 path=/org/freedesktop/machine1 interface=org.freedesktop.machine1.Manager member=GetMachineOSRelease signature=s]: Requesting OS release data is only supported on container machines. Feb 10 16:40:28 localhost.localdomain systemd[1]: systemd-machined.service: Got notification message from PID 3304 (WATCHDOG=1) ~~~ I don't understand why machinectl does not report this error and why is this error at all. I cannot reproduce it. On my machine: $ machinectl MACHINE CLASS SERVICE qemu-1-coprfrontend vm libvirt-qemu qemu-2-coprdistgit vm libvirt-qemu qemu-3-coprbackend vm libvirt-qemu 3 machines listed. (This is on F25 thou). Anyway this seems to be problem of machinectl and not mock. systemd-232-14.fc26 seems to fex the issues for me. Thx. I faced exactly same issue. On F26 (rawhide), systemd-232-12.fc26.x86_64 [builder@f26-kvm ~]$ mock -r epel-7-x86_64 --init --resultdir test-fm2 INFO: mock.py version 1.3.3 starting (python version = 3.6.0)... Start: init plugins INFO: selinux disabled Finish: init plugins Start: run Start: clean chroot ERROR: Command '['/usr/bin/machinectl', 'list', '--no-pager']' returned non-zero exit status 1. Traceback (most recent call last): File "/usr/libexec/mock/mock", line 701, in main run_command(options, args, config_opts, commands, buildroot, state) [builder@niger-f26-kvm ~]$ mock -r epel-7-x86_64 --init --resultdir test-fm2 INFO: mock.py version 1.3.3 starting (python version = 3.6.0)... Start: init plugins INFO: selinux disabled Finish: init plugins Start: run Start: clean chroot ERROR: Command '['/usr/bin/machinectl', 'list', '--no-pager']' returned non-zero exit status 1. Traceback (most recent call last): File "/usr/libexec/mock/mock", line 701, in main run_command(options, args, config_opts, commands, buildroot, state) File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 89, in trace result = func(*args, **kw) File "/usr/libexec/mock/mock", line 725, in run_command commands.clean() File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 89, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/backend.py", line 74, in clean self.buildroot.delete() File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 89, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/buildroot.py", line 560, in delete util.orphansKill(p) File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 89, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 198, in orphansKill vm_list = subprocess.check_output(["/usr/bin/machinectl", "list", "--no-pager"]) File "/usr/lib64/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib64/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['/usr/bin/machinectl', 'list', '--no-pager']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/libexec/mock/mock", line 885, in <module> main() File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 89, in trace result = func(*args, **kw) File "/usr/libexec/mock/mock", line 704, in main buildroot.finalize() File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 89, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/buildroot.py", line 544, in finalize util.orphansKill(self.make_chroot_path()) File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 89, in trace result = func(*args, **kw) File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 198, in orphansKill vm_list = subprocess.check_output(["/usr/bin/machinectl", "list", "--no-pager"]) File "/usr/lib64/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib64/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['/usr/bin/machinectl', 'list', '--no-pager']' returned non-zero exit status 1. --- $ /usr/bin/machinectl list --no-pager $ echo $? 1 and stopping qemu-kvm machine - solves the issue. $ /usr/bin/machinectl list --no-pager No machines. $ echo $? 0 --- I haven't systemd-232-14.fc26 in my rawhide repo =\ And /dev/sda3 on /var/lib/mock/epel-7-x86_64/root/var/cache/yum type xfs (rw,relatime,seclabel,attr2,inode64,noquota) still mounted after this fail =\ Actually, I was too quick to judge :/ This appears to work (and did not worked previously): ~~~ $ /usr/bin/machinectl 'list' '--no-pager' MACHINE CLASS SERVICE OS VERSION ADDRESSES qemu-6-rawhide vm libvirt-qemu - - - 1 machines listed. ~~~ as long as nobody checks the return code: ~~~ $ echo $? 1 ~~~ Please note that the error message in journal is different this time: ~~~ Feb 16 13:01:53 unused-4-134.brq.redhat.com systemd-machined[3789]: Got message type=method_call sender=:1.133 destination=org.freedesktop.machine1 object=/org/freedesktop/machine1 interface=org.freedesktop.machine1.Manager member=ListMachines cookie=2 reply_cookie=0 error=n/a Feb 16 13:01:53 unused-4-134.brq.redhat.com systemd-machined[3789]: Sent message type=method_return sender=n/a destination=:1.133 object=n/a interface=n/a member=n/a cookie=29 reply_cookie=2 error=n/a Feb 16 13:01:53 unused-4-134.brq.redhat.com systemd[1]: systemd-machined.service: Got notification message from PID 3789 (WATCHDOG=1) Feb 16 13:01:53 unused-4-134.brq.redhat.com systemd-machined[3789]: Got message type=method_call sender=:1.133 destination=org.freedesktop.machine1 object=/org/freedesktop/machine1 interface=org.freedesktop.machine1.Manager member=GetMachineOSRelease cookie=3 reply_cookie=0 error=n/a Feb 16 13:01:53 unused-4-134.brq.redhat.com systemd-machined[3789]: Sent message type=error sender=n/a destination=:1.133 object=n/a interface=n/a member=n/a cookie=30 reply_cookie=3 error=Requesting OS release data is only supported on container machines. Feb 16 13:01:53 unused-4-134.brq.redhat.com systemd-machined[3789]: Failed to process message [type=method_call sender=:1.133 path=/org/freedesktop/machine1 interface=org.freedesktop.machine1.Manager member=GetMachineOSRelease signature=s]: Requesting OS release data is only supported on container machines. Feb 16 13:01:53 unused-4-134.brq.redhat.com systemd-machined[3789]: Got message type=method_call sender=:1.133 destination=org.freedesktop.machine1 object=/org/freedesktop/machine1 interface=org.freedesktop.machine1.Manager member=GetMachineAddresses cookie=4 reply_cookie=0 error=n/a Feb 16 13:01:53 unused-4-134.brq.redhat.com systemd-machined[3789]: Sent message type=error sender=n/a destination=:1.133 object=n/a interface=n/a member=n/a cookie=31 reply_cookie=4 error=Requesting IP address data is only supported on container machines. Feb 16 13:01:53 unused-4-134.brq.redhat.com systemd-machined[3789]: Failed to process message [type=method_call sender=:1.133 path=/org/freedesktop/machine1 interface=org.freedesktop.machine1.Manager member=GetMachineAddresses signature=s]: Requesting IP address data is only supported on container machines. ~~~ (In reply to Vit Ry from comment #5) > I haven't systemd-232-14.fc26 in my rawhide repo =\ It is not yet in Rawhide compose ... You need to take it from Koji. BTW not it fails even when other container (mock) is running :/ This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'. This is still issue with recent systemd: $ rpm -q systemd systemd-233-2.fc27.x86_64 Therefore I reported it upstream. Created attachment 1262463 [details]
$ strace -f -s 128 -o strace.log machinectl list
This was resovled upstream. Would it be possible to backport this, please? https://github.com/systemd/systemd/pull/5587 (In reply to Vít Ondruch from comment #13) > This was resovled upstream. Would it be possible to backport this, please? > > https://github.com/systemd/systemd/pull/5587 I've backported the fix to F26 alongside with other bugfixes from upstream. systemd-233-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-27d711e213 systemd-233-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-27d711e213 systemd-233-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report. |