You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Mehul Parikh <me...@freestoneinfotech.com> on 2016/10/24 12:22:59 UTC

Review Request 53130: RANGER-1192 : Ranger PID file not being read if a custom location is provided

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

Review request for ranger, Ankita Sinha, Gautam Borad, Madhan Neethiraj, Pradeep Agrawal, and Velmurugan Periasamy.


Bugs: RANGER-1192
    https://issues.apache.org/jira/browse/RANGER-1192


Repository: ranger


Description
-------

Problem : 
If user provides a custom location for pid file and have a non-standard service account running the service, during upgrade default path is considered and due to that Ambari keeps marking the service as stopped even though it is up and running on the server.

Solution : 
The PID filename and path are hard coded in Ranger's stop / start script. It should take the pid dir path from the configs and use that to generate PID.


Diffs
-----

  embeddedwebserver/scripts/ranger-admin-services.sh f672236 
  kms/scripts/install.properties 0516269 
  kms/scripts/ranger-kms d2937aa 
  kms/scripts/setup.sh 4f2e320 
  security-admin/scripts/install.properties 46a0091 
  security-admin/scripts/setup.sh 40c8584 
  tagsync/scripts/install.properties 2b40a17 
  tagsync/scripts/ranger-tagsync-services.sh e81a6b2 
  tagsync/scripts/setup.py ea47de7 
  unixauthservice/scripts/install.properties 76d3b2e 
  unixauthservice/scripts/ranger-usersync-services.sh 4f57fdc 
  unixauthservice/scripts/setup.py eb7e8f8 

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


Testing
-------

Verified : 

1) Manual install of Ranger services with custom PID dir
2) Ambari based install of Ranger services with custom PID dir
3) Manual install of Ranger services with custom PID dir and custom service user 
4) Ambari based install of Ranger services with custom PID dir and custom service user


Thanks,

Mehul Parikh


Re: Review Request 53130: RANGER-1192 : Ranger PID file not being read if a custom location is provided

Posted by Mehul Parikh <me...@freestoneinfotech.com>.

> On Oct. 24, 2016, 1:12 p.m., Gautam Borad wrote:
> > kms/scripts/ranger-kms, line 99
> > <https://reviews.apache.org/r/53130/diff/1/?file=1543990#file1543990line99>
> >
> >     Is it ok to change from the previous 'ranger' user to 'kms' user (as introduced in this patch?)

Earlier implementation was wrong and current implementation corrects that. 
I have verified Upgrades as well as fresh installs of Ranger KMS. We do create kms user in setup.sh as well as from Ambari.


- Mehul


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


On Oct. 24, 2016, 12:22 p.m., Mehul Parikh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53130/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2016, 12:22 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Madhan Neethiraj, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1192
>     https://issues.apache.org/jira/browse/RANGER-1192
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Problem : 
> If user provides a custom location for pid file and have a non-standard service account running the service, during upgrade default path is considered and due to that Ambari keeps marking the service as stopped even though it is up and running on the server.
> 
> Solution : 
> The PID filename and path are hard coded in Ranger's stop / start script. It should take the pid dir path from the configs and use that to generate PID.
> 
> 
> Diffs
> -----
> 
>   embeddedwebserver/scripts/ranger-admin-services.sh f672236 
>   kms/scripts/install.properties 0516269 
>   kms/scripts/ranger-kms d2937aa 
>   kms/scripts/setup.sh 4f2e320 
>   security-admin/scripts/install.properties 46a0091 
>   security-admin/scripts/setup.sh 40c8584 
>   tagsync/scripts/install.properties 2b40a17 
>   tagsync/scripts/ranger-tagsync-services.sh e81a6b2 
>   tagsync/scripts/setup.py ea47de7 
>   unixauthservice/scripts/install.properties 76d3b2e 
>   unixauthservice/scripts/ranger-usersync-services.sh 4f57fdc 
>   unixauthservice/scripts/setup.py eb7e8f8 
> 
> Diff: https://reviews.apache.org/r/53130/diff/
> 
> 
> Testing
> -------
> 
> Verified : 
> 
> 1) Manual install of Ranger services with custom PID dir
> 2) Ambari based install of Ranger services with custom PID dir
> 3) Manual install of Ranger services with custom PID dir and custom service user 
> 4) Ambari based install of Ranger services with custom PID dir and custom service user
> 
> 
> Thanks,
> 
> Mehul Parikh
> 
>


Re: Review Request 53130: RANGER-1192 : Ranger PID file not being read if a custom location is provided

Posted by Gautam Borad <gb...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53130/#review153684
-----------------------------------------------------------




kms/scripts/ranger-kms (line 99)
<https://reviews.apache.org/r/53130/#comment223107>

    Is it ok to change from the previous 'ranger' user to 'kms' user (as introduced in this patch?)



kms/scripts/setup.sh (line 770)
<https://reviews.apache.org/r/53130/#comment223108>

    Better to log it as "Creating KMS PID folder: ${RANGER_KMS_PID_DIR_PATH}"



security-admin/scripts/setup.sh (line 1137)
<https://reviews.apache.org/r/53130/#comment223109>

    Please see similar comment above for KMS


- Gautam Borad


On Oct. 24, 2016, 12:22 p.m., Mehul Parikh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53130/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2016, 12:22 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Madhan Neethiraj, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1192
>     https://issues.apache.org/jira/browse/RANGER-1192
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Problem : 
> If user provides a custom location for pid file and have a non-standard service account running the service, during upgrade default path is considered and due to that Ambari keeps marking the service as stopped even though it is up and running on the server.
> 
> Solution : 
> The PID filename and path are hard coded in Ranger's stop / start script. It should take the pid dir path from the configs and use that to generate PID.
> 
> 
> Diffs
> -----
> 
>   embeddedwebserver/scripts/ranger-admin-services.sh f672236 
>   kms/scripts/install.properties 0516269 
>   kms/scripts/ranger-kms d2937aa 
>   kms/scripts/setup.sh 4f2e320 
>   security-admin/scripts/install.properties 46a0091 
>   security-admin/scripts/setup.sh 40c8584 
>   tagsync/scripts/install.properties 2b40a17 
>   tagsync/scripts/ranger-tagsync-services.sh e81a6b2 
>   tagsync/scripts/setup.py ea47de7 
>   unixauthservice/scripts/install.properties 76d3b2e 
>   unixauthservice/scripts/ranger-usersync-services.sh 4f57fdc 
>   unixauthservice/scripts/setup.py eb7e8f8 
> 
> Diff: https://reviews.apache.org/r/53130/diff/
> 
> 
> Testing
> -------
> 
> Verified : 
> 
> 1) Manual install of Ranger services with custom PID dir
> 2) Ambari based install of Ranger services with custom PID dir
> 3) Manual install of Ranger services with custom PID dir and custom service user 
> 4) Ambari based install of Ranger services with custom PID dir and custom service user
> 
> 
> Thanks,
> 
> Mehul Parikh
> 
>


Re: Review Request 53130: RANGER-1192 : Ranger PID file not being read if a custom location is provided

Posted by Velmurugan Periasamy <vp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53130/#review155610
-----------------------------------------------------------


Ship it!




Ship It!

- Velmurugan Periasamy


On Nov. 4, 2016, 10:27 a.m., Mehul Parikh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53130/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2016, 10:27 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Madhan Neethiraj, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1192
>     https://issues.apache.org/jira/browse/RANGER-1192
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Problem : 
> If user provides a custom location for pid file and have a non-standard service account running the service, during upgrade default path is considered and due to that Ambari keeps marking the service as stopped even though it is up and running on the server.
> 
> Solution : 
> The PID filename and path are hard coded in Ranger's stop / start script. It should take the pid dir path from the configs and use that to generate PID.
> 
> 
> Diffs
> -----
> 
>   embeddedwebserver/scripts/ranger-admin-services.sh f672236 
>   kms/scripts/install.properties 0516269 
>   kms/scripts/ranger-kms d2937aa 
>   kms/scripts/setup.sh 4f2e320 
>   security-admin/scripts/install.properties 46a0091 
>   security-admin/scripts/setup.sh 40c8584 
>   tagsync/scripts/install.properties 2b40a17 
>   tagsync/scripts/ranger-tagsync-services.sh e81a6b2 
>   tagsync/scripts/setup.py ea47de7 
>   unixauthservice/scripts/install.properties 76d3b2e 
>   unixauthservice/scripts/ranger-usersync-services.sh 4f57fdc 
>   unixauthservice/scripts/setup.py eb7e8f8 
> 
> Diff: https://reviews.apache.org/r/53130/diff/
> 
> 
> Testing
> -------
> 
> Verified : 
> 
> 1) Manual install of Ranger services with custom PID dir
> 2) Ambari based install of Ranger services with custom PID dir
> 3) Manual install of Ranger services with custom PID dir and custom service user 
> 4) Ambari based install of Ranger services with custom PID dir and custom service user
> 
> 
> Thanks,
> 
> Mehul Parikh
> 
>


Re: Review Request 53130: RANGER-1192 : Ranger PID file not being read if a custom location is provided

Posted by Gautam Borad <gb...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53130/#review155108
-----------------------------------------------------------


Ship it!




Ship It!

- Gautam Borad


On Nov. 4, 2016, 10:27 a.m., Mehul Parikh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53130/
> -----------------------------------------------------------
> 
> (Updated Nov. 4, 2016, 10:27 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Madhan Neethiraj, Pradeep Agrawal, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-1192
>     https://issues.apache.org/jira/browse/RANGER-1192
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Problem : 
> If user provides a custom location for pid file and have a non-standard service account running the service, during upgrade default path is considered and due to that Ambari keeps marking the service as stopped even though it is up and running on the server.
> 
> Solution : 
> The PID filename and path are hard coded in Ranger's stop / start script. It should take the pid dir path from the configs and use that to generate PID.
> 
> 
> Diffs
> -----
> 
>   embeddedwebserver/scripts/ranger-admin-services.sh f672236 
>   kms/scripts/install.properties 0516269 
>   kms/scripts/ranger-kms d2937aa 
>   kms/scripts/setup.sh 4f2e320 
>   security-admin/scripts/install.properties 46a0091 
>   security-admin/scripts/setup.sh 40c8584 
>   tagsync/scripts/install.properties 2b40a17 
>   tagsync/scripts/ranger-tagsync-services.sh e81a6b2 
>   tagsync/scripts/setup.py ea47de7 
>   unixauthservice/scripts/install.properties 76d3b2e 
>   unixauthservice/scripts/ranger-usersync-services.sh 4f57fdc 
>   unixauthservice/scripts/setup.py eb7e8f8 
> 
> Diff: https://reviews.apache.org/r/53130/diff/
> 
> 
> Testing
> -------
> 
> Verified : 
> 
> 1) Manual install of Ranger services with custom PID dir
> 2) Ambari based install of Ranger services with custom PID dir
> 3) Manual install of Ranger services with custom PID dir and custom service user 
> 4) Ambari based install of Ranger services with custom PID dir and custom service user
> 
> 
> Thanks,
> 
> Mehul Parikh
> 
>


Re: Review Request 53130: RANGER-1192 : Ranger PID file not being read if a custom location is provided

Posted by Mehul Parikh <me...@freestoneinfotech.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/53130/
-----------------------------------------------------------

(Updated Nov. 4, 2016, 10:27 a.m.)


Review request for ranger, Ankita Sinha, Gautam Borad, Madhan Neethiraj, Pradeep Agrawal, and Velmurugan Periasamy.


Changes
-------

Corrected log message as mentioned by Gautam and also verified upgrade scenarios for custom PID dir and custom service user.


Bugs: RANGER-1192
    https://issues.apache.org/jira/browse/RANGER-1192


Repository: ranger


Description
-------

Problem : 
If user provides a custom location for pid file and have a non-standard service account running the service, during upgrade default path is considered and due to that Ambari keeps marking the service as stopped even though it is up and running on the server.

Solution : 
The PID filename and path are hard coded in Ranger's stop / start script. It should take the pid dir path from the configs and use that to generate PID.


Diffs (updated)
-----

  embeddedwebserver/scripts/ranger-admin-services.sh f672236 
  kms/scripts/install.properties 0516269 
  kms/scripts/ranger-kms d2937aa 
  kms/scripts/setup.sh 4f2e320 
  security-admin/scripts/install.properties 46a0091 
  security-admin/scripts/setup.sh 40c8584 
  tagsync/scripts/install.properties 2b40a17 
  tagsync/scripts/ranger-tagsync-services.sh e81a6b2 
  tagsync/scripts/setup.py ea47de7 
  unixauthservice/scripts/install.properties 76d3b2e 
  unixauthservice/scripts/ranger-usersync-services.sh 4f57fdc 
  unixauthservice/scripts/setup.py eb7e8f8 

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


Testing
-------

Verified : 

1) Manual install of Ranger services with custom PID dir
2) Ambari based install of Ranger services with custom PID dir
3) Manual install of Ranger services with custom PID dir and custom service user 
4) Ambari based install of Ranger services with custom PID dir and custom service user


Thanks,

Mehul Parikh