Bug 1779813

Summary: Allow mount and device units with very long paths
Product: Red Hat Enterprise Linux 7 Reporter: Anthony Zone <azone>
Component: systemdAssignee: Michal Sekletar <msekleta>
Status: CLOSED WONTFIX QA Contact: Frantisek Sumsal <fsumsal>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.8CC: abetkike, akaiser, bbreard, d.abad, dhellard, dtardon, fkrska, gvaughn, jbastian, jdolling, jomiller, jsafrane, kcleveng, kpfleming, kwalker, msekleta, pchavan, rmetrich, rpinto, rsahoo, rupatel, sbalasub, scorreia, simonv, systemd-maint-list, tcrider
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-20 19:30:37 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:
Bug Depends On:    
Bug Blocks: 1801675    

Description Anthony Zone 2019-12-04 19:12:07 UTC
Description of problem:

A customer has a SAS Expander that expands their devices out to a name longer than 256 characters when the path is exploded.

    # systemd-escape /devices/pci0000:00/0000:00:02.0/0000:02:00.0/host10/port-10:0/expander-10:0/port-10:0:0/expander-10:1/port-10:1:0/expander-10:2/port-10:2:0/expander-10:3/port-10:3:13/end_device-10:3:13/target10:0:89/10:0:89:0/scsi_device/10:0:89:0 | wc
	  1       1     263

This causes the systemd to fail on the device with:

    systemd: Failed to set up device unit: Invalid argument

And then the systemd job times out and the mounts fail.

This value appears to be arbitrarily increased over time.  We gave the customer a test patch that raised UNIT_NAME_MAX in shared/unit-name.h to 512 and it resolved their issue.

Requesting that this value be raised to 512.


Version-Release number of selected component (if applicable):
systemd-219-62.el7_6.5.x86_64

How reproducible:
Every time if the device name is over 256 characters.


Steps to Reproduce:
1.  Attach a device with a path over 256 characters.
2.  Boot the server
3.  Check the logs for errors.

Actual results:

systemd errors with:

    systemd: Failed to set up device unit: Invalid argument

And times out the device.

Expected results:

System boots without any issues.

Additional info:

Comment 2 Jan Synacek 2019-12-09 11:00:24 UTC
https://github.com/systemd/systemd/pull/14294

Comment 3 Jan Synacek 2019-12-10 11:06:14 UTC
I'm removing the devel_ack+ for this one, see the upstream discussion.

Comment 4 RHEL Program Management 2019-12-10 11:06:22 UTC
Development Management has reviewed and declined this request. You may appeal this decision by using your Red Hat support channels, who will make certain  the issue receives the proper prioritization with product and development management.

https://www.redhat.com/support/process/production/#howto

Comment 5 Jan Synacek 2019-12-10 11:12:28 UTC
Didn't mean to set devel_ack-...

Comment 6 David Tardon 2020-03-26 11:55:53 UTC
*** Bug 1793434 has been marked as a duplicate of this bug. ***

Comment 13 Anthony Zone 2020-06-17 11:53:03 UTC
Just to let folks know that this is a known limitation, not only with systemd, but with lengths of filenames as well in general.  We have created a Red Hat article around telling udev to prevent systemd from mounting these devices, but this is only helpful in the case of devices that don't need to be managed by the OS.

"systemd: Failed to set up device unit: Invalid argument" errors are seen in /var/log/messages - Red Hat Customer Portal
https://access.redhat.com/solutions/5130541

Comment 22 Chris Williams 2020-11-11 21:41:04 UTC
Red Hat Enterprise Linux 7 shipped it's final minor release on September 29th, 2020. 7.9 was the last minor releases scheduled for RHEL 7.
From intial triage it does not appear the remaining Bugzillas meet the inclusion criteria for Maintenance Phase 2 and will now be closed. 

From the RHEL life cycle page:
https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase
"During Maintenance Support 2 Phase for Red Hat Enterprise Linux version 7,Red Hat defined Critical and Important impact Security Advisories (RHSAs) and selected (at Red Hat discretion) Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available."

If this BZ was closed in error and meets the above criteria please re-open it flag for 7.9.z, provide suitable business and technical justifications, and follow the process for Accelerated Fixes:
https://source.redhat.com/groups/public/pnt-cxno/pnt_customer_experience_and_operations_wiki/support_delivery_accelerated_fix_release_handbook  

Feature Requests can re-opened and moved to RHEL 8 if the desired functionality is not already present in the product. 

Please reach out to the applicable Product Experience Engineer[0] if you have any questions or concerns.  

[0] https://bugzilla.redhat.com/page.cgi?id=agile_component_mapping.html&product=Red+Hat+Enterprise+Linux+7

Comment 23 Chris Williams 2020-11-11 23:18:35 UTC
Apologies for the inadvertent closure.