You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Matt <mi...@gmail.com> on 2015/11/25 02:08:38 UTC

Review Request 40686: HAWQ gives ownership of hawq parent directory to hawq_user

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40686/
-----------------------------------------------------------

Review request for Ambari.


Bugs: AMBARI-14054
    https://issues.apache.org/jira/browse/AMBARI-14054


Repository: ambari


Description
-------

HAWQ service gives the ownership of parent directories of hawq_master_dir and hawq_segment_dir to hawq_user.

This is not ideal because the parent directory might be / (root directory), and root directory ownership should not be given to hawq_user


Diffs
-----

  ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py 0e349d2 
  ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py fdfd7c9 

Diff: https://reviews.apache.org/r/40686/diff/


Testing
-------

Manually tested 

After changes were made, HAWQ was deployed on a cluster, and the directory ownership and permissions were verified for hawq_master_dir and hawq_segment_dir


Thanks,

Matt


Re: Review Request 40686: HAWQ gives ownership of hawq parent directory to hawq_user

Posted by jun aoki <ju...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40686/#review108721
-----------------------------------------------------------

Ship it!


Ship It!

- jun aoki


On Nov. 25, 2015, 1:08 a.m., Matt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40686/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2015, 1:08 a.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-14054
>     https://issues.apache.org/jira/browse/AMBARI-14054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> HAWQ service gives the ownership of parent directories of hawq_master_dir and hawq_segment_dir to hawq_user.
> 
> This is not ideal because the parent directory might be / (root directory), and root directory ownership should not be given to hawq_user
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py 0e349d2 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py fdfd7c9 
> 
> Diff: https://reviews.apache.org/r/40686/diff/
> 
> 
> Testing
> -------
> 
> Manually tested 
> 
> After changes were made, HAWQ was deployed on a cluster, and the directory ownership and permissions were verified for hawq_master_dir and hawq_segment_dir
> 
> 
> Thanks,
> 
> Matt
> 
>


Re: Review Request 40686: HAWQ gives ownership of hawq parent directory to hawq_user

Posted by bhuvnesh chaudhary <bc...@pivotal.io>.

> On Dec. 2, 2015, 5:48 a.m., jun aoki wrote:
> > ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py, line 87
> > <https://reviews.apache.org/r/40686/diff/1/?file=1139420#file1139420line87>
> >
> >     I'm probably missing something here and educate me.
> >     If the chown execution at the parent directory  is deleted completely, how chmod actually occurs at the actual directory (segment_dir in this particular case) which has the right permission?

chmod is executed by root to make the segment or master dir non readable to users other than gpadmin. 
these directories when created are given gpadmin as the ownership. so now they hve gpadmin as the owner and 700 as the permission.
parent directories of segment / master dir were earlier given gpadmin ownership as init db logs were created under the parent directory which is now fixed at hawq and thus step is removed.


- bhuvnesh


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40686/#review108608
-----------------------------------------------------------


On Nov. 25, 2015, 1:08 a.m., Matt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40686/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2015, 1:08 a.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-14054
>     https://issues.apache.org/jira/browse/AMBARI-14054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> HAWQ service gives the ownership of parent directories of hawq_master_dir and hawq_segment_dir to hawq_user.
> 
> This is not ideal because the parent directory might be / (root directory), and root directory ownership should not be given to hawq_user
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py 0e349d2 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py fdfd7c9 
> 
> Diff: https://reviews.apache.org/r/40686/diff/
> 
> 
> Testing
> -------
> 
> Manually tested 
> 
> After changes were made, HAWQ was deployed on a cluster, and the directory ownership and permissions were verified for hawq_master_dir and hawq_segment_dir
> 
> 
> Thanks,
> 
> Matt
> 
>


Re: Review Request 40686: HAWQ gives ownership of hawq parent directory to hawq_user

Posted by jun aoki <ju...@gmail.com>.

> On Dec. 2, 2015, 5:48 a.m., jun aoki wrote:
> > ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py, line 87
> > <https://reviews.apache.org/r/40686/diff/1/?file=1139420#file1139420line87>
> >
> >     I'm probably missing something here and educate me.
> >     If the chown execution at the parent directory  is deleted completely, how chmod actually occurs at the actual directory (segment_dir in this particular case) which has the right permission?
> 
> bhuvnesh chaudhary wrote:
>     chmod is executed by root to make the segment or master dir non readable to users other than gpadmin. 
>     these directories when created are given gpadmin as the ownership. so now they hve gpadmin as the owner and 700 as the permission.
>     parent directories of segment / master dir were earlier given gpadmin ownership as init db logs were created under the parent directory which is now fixed at hawq and thus step is removed.

Matt, bhuvnesh, thank you for clarification!


- jun


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40686/#review108608
-----------------------------------------------------------


On Nov. 25, 2015, 1:08 a.m., Matt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40686/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2015, 1:08 a.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-14054
>     https://issues.apache.org/jira/browse/AMBARI-14054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> HAWQ service gives the ownership of parent directories of hawq_master_dir and hawq_segment_dir to hawq_user.
> 
> This is not ideal because the parent directory might be / (root directory), and root directory ownership should not be given to hawq_user
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py 0e349d2 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py fdfd7c9 
> 
> Diff: https://reviews.apache.org/r/40686/diff/
> 
> 
> Testing
> -------
> 
> Manually tested 
> 
> After changes were made, HAWQ was deployed on a cluster, and the directory ownership and permissions were verified for hawq_master_dir and hawq_segment_dir
> 
> 
> Thanks,
> 
> Matt
> 
>


Re: Review Request 40686: HAWQ gives ownership of hawq parent directory to hawq_user

Posted by Matt <mi...@gmail.com>.

> On Dec. 1, 2015, 9:48 p.m., jun aoki wrote:
> >

More information regarding this change:
- Location of initdb has been moved to logs directory as a result of https://issues.apache.org/jira/browse/HAWQ-33
- Please refer https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/utils.py#L34-#L38 which creates the hawq_segment_dir as hawq_user. The call to this function is made here https://github.com/Pivotal-Hadoop/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py#L84


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40686/#review108608
-----------------------------------------------------------


On Nov. 24, 2015, 5:08 p.m., Matt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40686/
> -----------------------------------------------------------
> 
> (Updated Nov. 24, 2015, 5:08 p.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-14054
>     https://issues.apache.org/jira/browse/AMBARI-14054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> HAWQ service gives the ownership of parent directories of hawq_master_dir and hawq_segment_dir to hawq_user.
> 
> This is not ideal because the parent directory might be / (root directory), and root directory ownership should not be given to hawq_user
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py 0e349d2 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py fdfd7c9 
> 
> Diff: https://reviews.apache.org/r/40686/diff/
> 
> 
> Testing
> -------
> 
> Manually tested 
> 
> After changes were made, HAWQ was deployed on a cluster, and the directory ownership and permissions were verified for hawq_master_dir and hawq_segment_dir
> 
> 
> Thanks,
> 
> Matt
> 
>


Re: Review Request 40686: HAWQ gives ownership of hawq parent directory to hawq_user

Posted by jun aoki <ju...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40686/#review108608
-----------------------------------------------------------



ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py 
<https://reviews.apache.org/r/40686/#comment168067>

    I'm probably missing something here and educate me.
    If the chown execution at the parent directory  is deleted completely, how chmod actually occurs at the actual directory (segment_dir in this particular case) which has the right permission?


- jun aoki


On Nov. 25, 2015, 1:08 a.m., Matt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40686/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2015, 1:08 a.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-14054
>     https://issues.apache.org/jira/browse/AMBARI-14054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> HAWQ service gives the ownership of parent directories of hawq_master_dir and hawq_segment_dir to hawq_user.
> 
> This is not ideal because the parent directory might be / (root directory), and root directory ownership should not be given to hawq_user
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py 0e349d2 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py fdfd7c9 
> 
> Diff: https://reviews.apache.org/r/40686/diff/
> 
> 
> Testing
> -------
> 
> Manually tested 
> 
> After changes were made, HAWQ was deployed on a cluster, and the directory ownership and permissions were verified for hawq_master_dir and hawq_segment_dir
> 
> 
> Thanks,
> 
> Matt
> 
>


Re: Review Request 40686: HAWQ gives ownership of hawq parent directory to hawq_user

Posted by bhuvnesh chaudhary <bc...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40686/#review107885
-----------------------------------------------------------

Ship it!


Ship It!

- bhuvnesh chaudhary


On Nov. 25, 2015, 1:08 a.m., Matt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40686/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2015, 1:08 a.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-14054
>     https://issues.apache.org/jira/browse/AMBARI-14054
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> HAWQ service gives the ownership of parent directories of hawq_master_dir and hawq_segment_dir to hawq_user.
> 
> This is not ideal because the parent directory might be / (root directory), and root directory ownership should not be given to hawq_user
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py 0e349d2 
>   ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/master_helper.py fdfd7c9 
> 
> Diff: https://reviews.apache.org/r/40686/diff/
> 
> 
> Testing
> -------
> 
> Manually tested 
> 
> After changes were made, HAWQ was deployed on a cluster, and the directory ownership and permissions were verified for hawq_master_dir and hawq_segment_dir
> 
> 
> Thanks,
> 
> Matt
> 
>