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 1435098 - Systemd bogus "No [Install] section" warning
Summary: Systemd bogus "No [Install] section" warning
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-23 07:05 UTC by Yogita
Modified: 2020-09-10 10:22 UTC (History)
4 users (show)

Fixed In Version: systemd-219-33.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 09:14:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 3016 0 None None None 2017-03-23 07:05:13 UTC
Red Hat Product Errata RHBA-2017:2297 0 normal SHIPPED_LIVE systemd bug fix and enhancement update 2017-08-01 12:40:16 UTC

Description Yogita 2017-03-23 07:05:13 UTC
Description of problem:
Systemd bogus "No [Install] section" warning when enabling a unit with full path, like "systemctl enable /some/path/myunit.service"

Version-Release number of selected component (if applicable):
systemd-219-30.el7.x86_64

How reproducible:
By making a customised service file at location other than /etc/systemd/system and /usr/lib/systemd/system

Steps to Reproduce:

echo "
[Unit]
Description=Demo service

[Service]
User=root
ExecStart=/usr/bin/ls /tmp/ > /dev/null

[Install]
WantedBy=multi-user.target
" > /demo.service

Actual results:

systemctl enable /demo.service
Created symlink from /etc/systemd/system/multi-user.target.wants/demo.service to /demo.service.
Created symlink from /etc/systemd/system/demo.service to /demo.service.
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).


Expected results:
systemctl enable /demo.service
Created symlink from /etc/systemd/system/multi-user.target.wants/demo.service to /demo.service.
Created symlink from /etc/systemd/system/demo.service to /demo.service.

Additional info:
The misleading error is "The unit files have no [Install] section." 
The service unit is having [Install] section , still its reporting false error.

After enabling the service , we can execute - systemctl start demo.service flawlessly

see https://github.com/systemd/systemd/pull/3016 
A fix has been applied in systemd-230 and later, this is available in fedora25. When can we expect this fix in redhat?

Comment 2 Jan Synacek 2017-03-23 09:42:06 UTC
https://github.com/lnykryn/systemd-rhel/pull/101

Comment 4 Lukáš Nykrýn 2017-04-10 14:59:27 UTC
fix merged to upstream staging branch ->
https://github.com/lnykryn/systemd-rhel/commit/b5eddaf0dea35bda7b68a401119c5f9f9104fb99
-> post

Comment 7 errata-xmlrpc 2017-08-01 09:14:52 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, 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-2017:2297


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