Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpm-ostree: wireshark post scriptlet fails due to udevadm trigger #703

Open
akshayshah1 opened this issue Dec 21, 2020 · 5 comments
Open

Comments

@akshayshah1
Copy link

akshayshah1 commented Dec 21, 2020

Describe the bug
An update from version 32.20201104.3.0 (stable) to 33.20201201.3.0 (stable) with overlay package wireshark-cli fails

Reproduction steps
Steps to reproduce the behavior:

  1. Boot up 32.20201104.3.0 (stable) with ignition attached below
  2. rpm-ostree install wireshark-cli
  3. systemctl reboot
  4. rpm-ostree deploy 33.20201201.3.0 (to update)

Expected behavior
ostree deployment successful

Actual behavior

[root@linux ~]# rpm-ostree deploy 33.20201201.3.0 
Resolving version '33.20201201.3.0'
1 metadata, 0 content objects fetched; 592 B transferred in 1 seconds; 0 bytes content written
1 metadata, 0 content objects fetched; 592 B transferred in 0 seconds; 0 bytes content written
Checking out tree cad8008... done
Enabled rpm-md repositories: updates fedora
rpm-md repo 'updates' (cached); generated: 2020-12-21T01:20:13Z
rpm-md repo 'fedora' (cached); generated: 2020-10-19T23:27:19Z
Importing rpm-md... done
Resolving dependencies... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
error: Running %post for wireshark-cli: Executing bwrap(/bin/sh): Child process killed by signal 1; run `journalctl -t 'rpm-ostree(wireshark-cli.post)'` for more information
[root@linux ~]# journalctl -t 'rpm-ostree(wireshark-cli.post)'
-- Logs begin at Fri 2020-10-02 06:59:09 UTC, end at Mon 2020-12-21 05:18:00 UTC. --
Dec 21 05:13:11 linux rpm-ostree(wireshark-cli.post)[6993]: Failed to write 'change' to '/sys/devices/virtual/usbmon/usbmon0/uevent': Read-only file system

System details

  • VMware ESXi virtual machine.
NAME=Fedora
VERSION="32.20201104.3.0 (CoreOS)"
ID=fedora
VERSION_ID=32
VERSION_CODENAME=""
PLATFORM_ID="platform:f32"
PRETTY_NAME="Fedora CoreOS 32.20201104.3.0"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:32"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/"
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=32
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=32
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='32.20201104.3.0'

Ignition config

{"ignition": {"version": "3.1.0"}, "passwd": {"users": [{"name": "root", "sshAuthorizedKeys": [<keys>]}]}, "storage": {"files": [{"overwrite": true, "path": "/etc/zincati/config.d/90-disable-feature.toml", "contents": {"source": "data:,%23%20Disable%20auto-updates.%0A%5Bupdates%5D%0A%0Aenabled%20%3D%20false%0A"}, "mode": 420}, {"overwrite": true, "path": "/etc/NetworkManager/system-connections/eth0.nmconnection", "contents": {"source": "data:,%5Bconnection%5D%0Aid%3DWired%20Connection%0Atype%3Dethernet%0A%0A%5Bipv4%5D%0Amethod%3Dauto"}, "mode": 384}]}}
@akshayshah1 akshayshah1 changed the title Update from 32.20200907.3.0 to 33.20201201.3.0 with overlay package fails Update from 32.20201104.3.0 to 33.20201201.3.0 with overlay package fails Dec 21, 2020
@lucab
Copy link
Contributor

lucab commented Dec 21, 2020

Thanks for the report!
This seems to be due to the /usr/bin/udevadm trigger --subsystem-match=usbmon performed by the scriplet, however I'm not sure why this started failing only recently.

@dustymabe
Copy link
Member

Thanks for the report!
This seems to be due to the /usr/bin/udevadm trigger --subsystem-match=usbmon performed by the scriplet, however I'm not sure why this started failing only recently.

Maybe rpm-ostree started executing scriptlets more confined?

@jlebon
Copy link
Member

jlebon commented Dec 21, 2020

Hmm, yeah I've seen this before in other RPMs which use udevadm. IIRC, this is likely due to a change in udevadm which now treats these errors as fatal. Anyway, I think what we need here is for Wireshark to not do that if udevd isn't available: https://src.fedoraproject.org/rpms/wireshark/pull-request/5

@lucab lucab changed the title Update from 32.20201104.3.0 to 33.20201201.3.0 with overlay package fails wireshark: post scriptlet fails due to udevadm trigger Dec 22, 2020
@lucab lucab changed the title wireshark: post scriptlet fails due to udevadm trigger rpm-ostree: wireshark post scriptlet fails due to udevadm trigger Dec 22, 2020
@akshayshah1
Copy link
Author

Hi!
Thanks for the PR on the wireshark rpm

Is there any way meanwhile I can get around this problem by maybe ignoring the error or excluding wireshark from the Fedora CoreOS update? Basically want to update the OS even if it means wireshark doesn't get updated.

@jlebon
Copy link
Member

jlebon commented Jan 7, 2021

Can you use Wireshark from a privileged container instead? Then you can rpm-ostree uninstall wireshark-cli and update.

jlebon added a commit to jlebon/rdma-core that referenced this issue Jan 27, 2021
On rpm-ostree systems, we don't want scriptlets to affect the running
system because a major part of the value is "background updates".
Scriptlets are run in a containerized environment where e.g. udev is not
available.

Add a check for the udev socket before triggering it to handle this.
This also helps the container use case.

This doesn't break rpm-ostree strictly, because it uses `|| true`, but
it still spams error messages during the compose. I kept the `|| true`
to be safe, but it's likely fine to remove them now.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=1352154
See also: https://src.fedoraproject.org/rpms/udisks2/pull-request/3
See also: coreos/fedora-coreos-tracker#703

Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
stewartsmith pushed a commit to stewartsmith/pkg-fedora-NetworkManager that referenced this issue Oct 25, 2021
On rpm-ostree systems, we don't want scriptlets to affect the running
system because a major part of the value is "background updates".
Scriptlets are run in a containerized environment where e.g. udev is not
available.

Add a check for the udev socket before triggering it to handle this.
This also helps the container use case.

This doesn't break rpm-ostree strictly, because it uses `|| :`, but it
still spams error messages during the compose. I kept the `|| :` to be
safe, but it's likely fine to remove them now.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=1352154
See also: https://src.fedoraproject.org/rpms/udisks2/pull-request/3
See also: coreos/fedora-coreos-tracker#703

https://src.fedoraproject.org/rpms/NetworkManager/pull-request/6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants