Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
DescriptionStuart Anderson
2023-02-27 23:52:05 UTC
Description of problem:
nvmet.service from nvmetcli starts too soon and fails.
Version-Release number of selected component (if applicable):
nvmetcli-0.7-3.el8.noarch
How reproducible:
100%
Steps to Reproduce:
1. Configure an NVMe target
2. systemctl enable nvmet.service
3. /sbin/shutdown -r now
Actual results:
[root@zfs5 ~]# systemctl status nvmet
● nvmet.service - Restore NVMe kernel target configuration
Loaded: loaded (/usr/lib/systemd/system/nvmet.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2023-02-25 17:18:30 PST; 53s ago
Process: 2559 ExecStart=/usr/sbin/nvmetcli restore (code=exited, status=1/FAILURE)
Main PID: 2559 (code=exited, status=1/FAILURE)
CPU: 65ms
Feb 25 17:18:30 zfs5 nvmetcli[2559]: Port.setup(self, t, err_func)
Feb 25 17:18:30 zfs5 nvmetcli[2559]: File "/usr/lib/python3.6/site-packages/nvmet/nvme.py", line 719, in setup
Feb 25 17:18:30 zfs5 nvmetcli[2559]: port.add_subsystem(s)
Feb 25 17:18:30 zfs5 nvmetcli[2559]: File "/usr/lib/python3.6/site-packages/nvmet/nvme.py", line 658, in add_subsystem
Feb 25 17:18:30 zfs5 nvmetcli[2559]: raise CFSError("Could not symlink %s in configFS: %s" % (nqn, e))
Feb 25 17:18:30 zfs5 nvmetcli[2559]: nvmet.nvme.CFSError: Could not symlink zfs5 in configFS: [Errno 99] Cannot assign requested address: '/sys/kernel/config/n>
Feb 25 17:18:30 zfs5 systemd[1]: nvmet.service: Main process exited, code=exited, status=1/FAILURE
Feb 25 17:18:30 zfs5 systemd[1]: nvmet.service: Failed with result 'exit-code'.
Feb 25 17:18:30 zfs5 systemd[1]: Failed to start Restore NVMe kernel target configuration.
Feb 25 17:18:30 zfs5 systemd[1]: nvmet.service: Consumed 65ms CPU time
Expected results:
[root@zfs5 ~]# systemctl status nvmet
● nvmet.service - Restore NVMe kernel target configuration
Loaded: loaded (/usr/lib/systemd/system/nvmet.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/nvmet.service.d
└─delayfornetwork.conf
Active: active (exited) since Sat 2023-02-25 17:20:37 PST; 1 day 22h ago
Main PID: 9349 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 1646336)
Memory: 0B
CPU: 0
CGroup: /system.slice/nvmet.service
Feb 25 17:20:37 zfs5 systemd[1]: Starting Restore NVMe kernel target configuration...
Feb 25 17:20:37 zfs5 systemd[1]: Started Restore NVMe kernel target configuration.
Additional info:
Work around is to configure service to start after network-online.target and not just network.target.
The nvmetcli unit file that fails,
[root@zfs5 ~]# cat /usr/lib/systemd/system/nvmet.service
[Unit]
Description=Restore NVMe kernel target configuration
Requires=sys-kernel-config.mount
After=sys-kernel-config.mount network.target local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/nvmetcli restore
ExecStop=/usr/sbin/nvmetcli clear
SyslogIdentifier=nvmetcli
[Install]
WantedBy=multi-user.target
The additional constraint that works,
[root@zfs5 ~]# cat /etc/systemd/system/nvmet.service.d/delayfornetwork.conf
[Unit]
After=network-online.target
Wants=network-online.target
Please consider updating the nvmet.service unit file from network.target to network-online.target.
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 (nvmetcli 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:7084
Description of problem: nvmet.service from nvmetcli starts too soon and fails. Version-Release number of selected component (if applicable): nvmetcli-0.7-3.el8.noarch How reproducible: 100% Steps to Reproduce: 1. Configure an NVMe target 2. systemctl enable nvmet.service 3. /sbin/shutdown -r now Actual results: [root@zfs5 ~]# systemctl status nvmet ● nvmet.service - Restore NVMe kernel target configuration Loaded: loaded (/usr/lib/systemd/system/nvmet.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sat 2023-02-25 17:18:30 PST; 53s ago Process: 2559 ExecStart=/usr/sbin/nvmetcli restore (code=exited, status=1/FAILURE) Main PID: 2559 (code=exited, status=1/FAILURE) CPU: 65ms Feb 25 17:18:30 zfs5 nvmetcli[2559]: Port.setup(self, t, err_func) Feb 25 17:18:30 zfs5 nvmetcli[2559]: File "/usr/lib/python3.6/site-packages/nvmet/nvme.py", line 719, in setup Feb 25 17:18:30 zfs5 nvmetcli[2559]: port.add_subsystem(s) Feb 25 17:18:30 zfs5 nvmetcli[2559]: File "/usr/lib/python3.6/site-packages/nvmet/nvme.py", line 658, in add_subsystem Feb 25 17:18:30 zfs5 nvmetcli[2559]: raise CFSError("Could not symlink %s in configFS: %s" % (nqn, e)) Feb 25 17:18:30 zfs5 nvmetcli[2559]: nvmet.nvme.CFSError: Could not symlink zfs5 in configFS: [Errno 99] Cannot assign requested address: '/sys/kernel/config/n> Feb 25 17:18:30 zfs5 systemd[1]: nvmet.service: Main process exited, code=exited, status=1/FAILURE Feb 25 17:18:30 zfs5 systemd[1]: nvmet.service: Failed with result 'exit-code'. Feb 25 17:18:30 zfs5 systemd[1]: Failed to start Restore NVMe kernel target configuration. Feb 25 17:18:30 zfs5 systemd[1]: nvmet.service: Consumed 65ms CPU time Expected results: [root@zfs5 ~]# systemctl status nvmet ● nvmet.service - Restore NVMe kernel target configuration Loaded: loaded (/usr/lib/systemd/system/nvmet.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/nvmet.service.d └─delayfornetwork.conf Active: active (exited) since Sat 2023-02-25 17:20:37 PST; 1 day 22h ago Main PID: 9349 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 1646336) Memory: 0B CPU: 0 CGroup: /system.slice/nvmet.service Feb 25 17:20:37 zfs5 systemd[1]: Starting Restore NVMe kernel target configuration... Feb 25 17:20:37 zfs5 systemd[1]: Started Restore NVMe kernel target configuration. Additional info: Work around is to configure service to start after network-online.target and not just network.target. The nvmetcli unit file that fails, [root@zfs5 ~]# cat /usr/lib/systemd/system/nvmet.service [Unit] Description=Restore NVMe kernel target configuration Requires=sys-kernel-config.mount After=sys-kernel-config.mount network.target local-fs.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/nvmetcli restore ExecStop=/usr/sbin/nvmetcli clear SyslogIdentifier=nvmetcli [Install] WantedBy=multi-user.target The additional constraint that works, [root@zfs5 ~]# cat /etc/systemd/system/nvmet.service.d/delayfornetwork.conf [Unit] After=network-online.target Wants=network-online.target Please consider updating the nvmet.service unit file from network.target to network-online.target.