You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Christopher Jackson <ja...@gmail.com> on 2015/07/22 06:22:01 UTC
beforeANY hook interfering with user and group configuration for custom service.
I have defined a custom service and as part of its configuration I have the following:
<property>
<name>custom_service.user</name>
<value>myservice</value>
<description>The custom service user</description>
<property-type>USER</property-type>
</property>
<property>
<name>custom_service.group</name>
<value> myservice </value>
<description>The custom service group</description>
<property-type>GROUP</property-type>
</property>
During installation of the CLIENT component of my service this user and group both get created. What I cannot figure out is how do I add the user ‘ myservice’ to the following groups: ‘hdfs’ and ‘ myservice’. I tried handling this as part of the configure task in my CLIENT however every time an action is taken the scripts in the ‘beforeANY’ hook get executed recreating the user and removing it from the additional groups I had added it to resulting in the ‘myservice’ user only being in the ‘hadoop’ group.
Is there a way to handle this without modifying the hook?
Regards,
Christopher Jackson
jackson.christopher.lee@gmail.com <ma...@gmail.com>