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.
Bug 1067422 - Mark loop devices with no file attached as SYSTEMD_READY=0
Summary: Mark loop devices with no file attached as SYSTEMD_READY=0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: 1063813
TreeView+ depends on / blocked
 
Reported: 2014-02-20 12:42 UTC by Peter Rajnoha
Modified: 2014-06-18 00:37 UTC (History)
6 users (show)

Fixed In Version: systemd-208-8.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:54:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to use SYSTEMD_READY=0 for uninitialized loop devices (845 bytes, patch)
2014-02-20 12:42 UTC, Peter Rajnoha
no flags Details | Diff

Description Peter Rajnoha 2014-02-20 12:42:22 UTC
Created attachment 865494 [details]
Patch to use SYSTEMD_READY=0 for uninitialized loop devices

Based on man 5 systemd.device:

SYSTEMD_READY=
           If set to 0, systemd will consider this device unplugged even if it shows up in the udev tree. If this property is unset or set to 1, the device will be considered plugged the
           moment it shows up in the udev tree. This property has no influence on the behavior when a device disappears from the udev tree. This option is useful to support devices that
           initially show up in an uninitialized state in the tree, and for which a "changed" event is generated the moment they are fully set up. Note that SYSTEMD_WANTS= (see above) is
           not acted on as long as SYSTEMD_READY=0 is set for a device.


I think we should use SYSTEMD_READY=0 for loop devices that have no file attached yet and hence they're not ready for use until some file is attached.

Otherwise, we can get into a problem when we try to bind a service to *usable* loop device (e.g. bug #1063813).

(patch attached)

Comment 2 Peter Rajnoha 2014-03-05 09:49:18 UTC
If possible, please try to squeeze this patch into RHEL 7.0. Thanks!

Comment 3 Peter Rajnoha 2014-03-05 13:48:52 UTC
Requesting a blocker for this one since this makes LVM on loop devices unusable when detaching and attaching again a file to a loop device.

Also, based on the definition of SYSTEMD_READY that systemd uses to declare a device as properly initialized or not, clearly, the loop device without its backing file is not initialized.

The patch is simple one-liner - it's checking the existence of loop/backing_file sysfs file existence which exists only if the loop device has a file attached and it sets SYSTEMD_READY based on this information.

Comment 4 Harald Hoyer 2014-03-05 16:09:13 UTC
Looks good to me. Care to send that patch upstream?

Comment 5 Peter Rajnoha 2014-03-06 08:17:36 UTC
(In reply to Harald Hoyer from comment #4)
> Looks good to me. Care to send that patch upstream?

Sent: http://lists.freedesktop.org/archives/systemd-devel/2014-March/017647.html

Comment 8 Ludek Smid 2014-06-13 11:54:26 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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