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 1177821 - Init script: Does not export sysconfig environment variables before starting daemon
Summary: Init script: Does not export sysconfig environment variables before starting ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pacemaker
Version: 6.6
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Andrew Beekhof
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-30 16:59 UTC by John Ruemker
Modified: 2016-09-26 22:08 UTC (History)
10 users (show)

Fixed In Version: pacemaker-1.1.12-8.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-22 07:43:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Export environment variables from sysconfig before starting daemon (1.14 KB, patch)
2014-12-30 17:03 UTC, John Ruemker
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1309223 0 None None None Never
Red Hat Product Errata RHSA-2015:1424 0 normal SHIPPED_LIVE Moderate: pacemaker security and bug fix update 2015-07-20 18:06:24 UTC

Description John Ruemker 2014-12-30 16:59:23 UTC
Description of problem: Any variables modified in /etc/sysconfig/pacemaker have no effect because the init script that reads this file does not subsequently export those variables before starting the daemon.  So, if you were to say enable a PCMK_debugfile, it will not be used.  In RHEL 7 this is handled for us automagically by systemd via the service unit file's 

  EnvironmentFile=-/etc/sysconfig/pacemaker

but in RHEL 6, our init script takes care of setting everything up, and so it needs to ensure that the daemon will be able to read the configured variables from the environment.  



Version-Release number of selected component (if applicable): pacemaker-1.1.12-4.el6


How reproducible: Always


Steps to Reproduce:
1. Configure PCMK_debugfile=/var/log/pacemaker1.log in /etc/sysconfig/pacemaker
2. Start pacemaker
3. Check whether /var/log/pacemaker1.log was created and is being logged to

Actual results: File is not created and logging goes to default location


Expected results: Settings from /etc/sysconfig/pacemaker are honored


Additional info:

Comment 1 John Ruemker 2014-12-30 17:03:21 UTC
Created attachment 974504 [details]
Export environment variables from sysconfig before starting daemon

Comment 2 Andrew Beekhof 2015-01-05 02:48:45 UTC
First line of /etc/sysconfig/pacemaker:

# For non-systemd based systems, prefix export to each enabled line

I like the patch though, even nicer :-)

Comment 3 John Ruemker 2015-01-05 15:08:00 UTC
D'oh! Looked right past that.  Thanks for pointing it out.

Comment 5 Andrew Beekhof 2015-03-01 20:40:35 UTC
No capacity for 6.7, acking for 6.8

Comment 8 Andrew Beekhof 2015-05-06 22:43:19 UTC
QE ack please (since you created the patch I'm assuming you know how to test :)

Comment 12 errata-xmlrpc 2015-07-22 07:43:56 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://rhn.redhat.com/errata/RHSA-2015-1424.html

Comment 13 Ken Gaillot 2016-02-26 21:44:00 UTC
FYI The pacemaker_remote init script is affected by this, too. Fixed upstream as of 60bf228. It may be too late to get that one into 6.8.

Comment 14 Ken Gaillot 2016-09-26 22:08:46 UTC
(In reply to Ken Gaillot from comment #13)
> FYI The pacemaker_remote init script is affected by this, too. Fixed
> upstream as of 60bf228. It may be too late to get that one into 6.8.

FYI, the pacemaker_remote equivalent did not make it into 6.8, but will be included in 6.9 via the rebase for Bug 1356727.


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