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 2123927 - Enabling a service with Alias fails with "Invalid cross-device link"
Summary: Enabling a service with Alias fails with "Invalid cross-device link"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: systemd
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Jacek Migacz
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-03 06:22 UTC by Takashi Kajinami
Modified: 2023-05-09 10:32 UTC (History)
6 users (show)

Fixed In Version: systemd-252-2.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 08:21:58 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redhat-plumbers systemd-rhel8 pull 347 0 None open (#2123927) core: give a nicer error message on invalid aliases 2022-12-20 16:55:23 UTC
Gitlab redhat/centos-stream/rpms systemd merge_requests 57 0 None opened core: give a nicer error message on invalid aliases #2123927 2022-11-30 12:20:16 UTC
Red Hat Issue Tracker RHELPLAN-133182 0 None None None 2022-09-03 06:35:29 UTC
Red Hat Product Errata RHBA-2023:2531 0 None None None 2023-05-09 08:23:17 UTC

Internal Links: 2123742

Description Takashi Kajinami 2022-09-03 06:22:35 UTC
Description of problem:

This was initially reported in bz 2123742 .

Since systemd-250-11.el9 was released, enabling a service with Alias fails with the "Invalid cross-device link" error.
The command fails but the service is actually enabled.

The problem is not reproduced when systemd-250-07.el9 is used.

```
[vagrant@localhost ~]$ sudo systemctl status neutron-ovn-metadata-agent.service --no-pager
○ neutron-ovn-metadata-agent.service - OpenStack Neutron OVN Metadata Agent
     Loaded: loaded (/usr/lib/systemd/system/neutron-ovn-metadata-agent.service; disabled; vendor preset: disabled)
     Active: inactive (dead)

Sep 03 06:06:09 localhost.localdomain systemd[1]: Stopping OpenStack Neutron OVN Metadata Agent...
Sep 03 06:06:09 localhost.localdomain systemd[1]: neutron-ovn-metadata-agent.service: Deactivated successfully.
Sep 03 06:06:09 localhost.localdomain systemd[1]: Stopped OpenStack Neutron OVN Metadata Agent.
Sep 03 06:06:09 localhost.localdomain systemd[1]: neutron-ovn-metadata-agent.service: Consumed 1.951s CPU time.
Sep 03 06:06:09 localhost.localdomain systemd[1]: Started OpenStack Neutron OVN Metadata Agent.
Sep 03 06:06:11 localhost.localdomain sudo[31446]:  neutron : PWD=/ ; USER=root ; COMMAND=/usr/bin/neutron-rootwrap /…
Sep 03 06:06:21 localhost.localdomain systemd[1]: Stopping OpenStack Neutron OVN Metadata Agent...
Sep 03 06:06:22 localhost.localdomain systemd[1]: neutron-ovn-metadata-agent.service: Deactivated successfully.
Sep 03 06:06:22 localhost.localdomain systemd[1]: Stopped OpenStack Neutron OVN Metadata Agent.
Sep 03 06:06:22 localhost.localdomain systemd[1]: neutron-ovn-metadata-agent.service: Consumed 1.955s CPU time.
Hint: Some lines were ellipsized, use -l to show in full.

[vagrant@localhost ~]$ sudo cat /usr/lib/systemd/system/neutron-ovn-metadata-agent.service 
[Unit]
Description=OpenStack Neutron OVN Metadata Agent
After=syslog.target network.target openvswitch.service
Requires=openvswitch.service

[Service]
Type=simple
User=neutron
PermissionsStartOnly=true
ExecStart=/usr/bin/neutron-ovn-metadata-agent --config-file /etc/neutron/neutron_ovn_metadata_agent.ini --config-dir /etc/neutron/conf.d/neutron-ovn-metadata-agent --log-file /var/log/neutron/neutron-ovn-metadata-agent.log
PrivateTmp=false
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target
# (TODO) - Backwards compatibility in systemd service
Alias=networking-ovn-metadata-agent
[vagrant@localhost ~]$ sudo ls -lah /usr/lib/systemd/system/neutron-ovn-metadata-agent.service 
-rw-r--r--. 1 root root 606 Oct 12  2021 /usr/lib/systemd/system/neutron-ovn-metadata-agent.service                     
[vagrant@localhost ~]$ sudo ls -lah /usr/lib/systemd/system/networking-ovn-metadata-agent.service 
lrwxrwxrwx. 1 root root 58 Aug 30 17:14 /usr/lib/systemd/system/networking-ovn-metadata-agent.service -> /usr/lib/systemd/system/neutron-ovn-metadata-agent.service
[vagrant@localhost ~]$ sudo systemctl enable neutron-ovn-metadata-agent.service
Failed to enable unit: File networking-ovn-metadata-agent: Invalid cross-device link
[vagrant@localhost ~]$ echo $?
1
[vagrant@localhost ~]$ sudo systemctl status neutron-ovn-metadata-agent.service --no-pager
○ neutron-ovn-metadata-agent.service - OpenStack Neutron OVN Metadata Agent
     Loaded: loaded (/usr/lib/systemd/system/neutron-ovn-metadata-agent.service; enabled; vendor preset: disabled)
     Active: inactive (dead)

Sep 03 06:06:09 localhost.localdomain systemd[1]: Stopping OpenStack Neutron OVN Metadata Agent...
Sep 03 06:06:09 localhost.localdomain systemd[1]: neutron-ovn-metadata-agent.service: Deactivated successfully.
Sep 03 06:06:09 localhost.localdomain systemd[1]: Stopped OpenStack Neutron OVN Metadata Agent.
Sep 03 06:06:09 localhost.localdomain systemd[1]: neutron-ovn-metadata-agent.service: Consumed 1.951s CPU time.
Sep 03 06:06:09 localhost.localdomain systemd[1]: Started OpenStack Neutron OVN Metadata Agent.
Sep 03 06:06:11 localhost.localdomain sudo[31446]:  neutron : PWD=/ ; USER=root ; COMMAND=/usr/bin/neutron-rootwrap /…
Sep 03 06:06:21 localhost.localdomain systemd[1]: Stopping OpenStack Neutron OVN Metadata Agent...
Sep 03 06:06:22 localhost.localdomain systemd[1]: neutron-ovn-metadata-agent.service: Deactivated successfully.
Sep 03 06:06:22 localhost.localdomain systemd[1]: Stopped OpenStack Neutron OVN Metadata Agent.
Sep 03 06:06:22 localhost.localdomain systemd[1]: neutron-ovn-metadata-agent.service: Consumed 1.955s CPU time.
Hint: Some lines were ellipsized, use -l to show in full.
```


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create a service with Alias
2. Enable the service by
 $ systemctl enable <service name>.service

Actual results:
systemctl command fails

Expected results:
systemctl command does not fail

Additional info:

Comment 1 David Tardon 2022-09-05 11:52:35 UTC
(In reply to Takashi Kajinami from comment #0)
> [Install]
> WantedBy=multi-user.target
> # (TODO) - Backwards compatibility in systemd service
> Alias=networking-ovn-metadata-agent

Add .service suffix and it will work as expected. I'm not even sure this is a bug--and if it is, what the correct behavior should be...

Comment 2 Takashi Kajinami 2022-09-05 12:25:55 UTC
Thanks David. I totally missed that and I don't know how it has been working until now...

I've locally tested the edit and confirmed it resolves the error. I'll fix the service file in the package accordingly.

Thanks for your quick help !

Comment 8 errata-xmlrpc 2023-05-09 08:21:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (systemd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2531


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