Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 680748 - [RFE] Named resource agent should run named as the named user, not root.
[RFE] Named resource agent should run named as the named user, not root.
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: resource-agents (Show other bugs)
6.0
Unspecified Unspecified
medium Severity low
: rc
: ---
Assigned To: Chris Feist
Cluster QE
: FutureFeature, Triaged
Depends On:
Blocks: 693781 711586 987587
  Show dependency treegraph
 
Reported: 2011-02-27 08:56 EST by Colin.Simpson
Modified: 2016-04-26 12:41 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 711586 (view as bug list)
Environment:
Last Closed: 2011-06-24 16:34:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Colin.Simpson 2011-02-27 08:56:02 EST
The resource agent for named could do with enhancement.

(my testing here is based on adding in the missing /usr/share/cluster/utils/named-parse-config.pl which has a bug entry that is being actioned already)

This agent is great but could benefit from a few changes. 

1/ It runs the daemon as root. This isn't desirable. There isn't much required to change this. Passing named daemon launch line a "-u named" and chowning the directory that holds the pid file seems to be enough (I did this with a chown named:named `dirname $NAMED_pid_file`, after the creation routine there is probably a cleaner way, it may even be better to chgrp and chmod g+w, haven't checked).

2/ Even though this agent changes the listen address to match the IP address of passed to the service. Zone Transfers etc always come from the main IP of the node running the service. This isn't perfect as these are often secured by source IP (on the up level boxes) (and this is a hassle if a large number of nodes in the cluster) and it is confusing that it isn't the cluster service IP. 

The resource script should probably (even if by an option) change not just listen-on but set "transfer-source", "query-source", "notify-source". There maybe others.

I have looked at Fedora 14's named resource agent and it doesn't seem to have these features so this query maybe an upstream one. But I'm not sure what the the upstream is for this?
Comment 2 Perry Myers 2011-02-27 09:49:15 EST
(In reply to comment #0)
> I have looked at Fedora 14's named resource agent and it doesn't seem to have
> these features so this query maybe an upstream one. But I'm not sure what the
> the upstream is for this?

@Colin: resource agents are used in a variety of upstream distros, but if you're interested in getting this fixed upstream best place to file a bug would be Fedora against the resource-agents package.  When Fedora has this fixed, we can look at pulling the fixes into RHEL.
Comment 3 Colin.Simpson 2011-02-27 12:19:57 EST
That's cool, I have added a Bug #680775 for Fedora to hopefully action. 

And I have opened a SR#428006 with support pointing at this bug report.

Thanks
Comment 6 Chris Feist 2011-06-07 16:00:40 EDT
Updating bz to refer to issue #1.  Making sure the named daemon runs as the user "named" instead of root.  Issue #2 has been moved to bz#711586.
Comment 8 Chris Feist 2011-06-24 16:34:05 EDT
After digging deeper into getting the agent to run as named, there can potentially be issues if named has already been run as the root user.  It's possible that some of the bind configuration files will not have the correct permissions which would break an upgrade.

However, there is a simple workaround.  Add the option 'named_options="-u named"' to the named service in your cluster.conf file and the service will be run as the user 'named'.

Closing this as WONTFIX for now as an upgrade will likely break current installs, and there is a simple workaround.

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