You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Dmytro Sen <ds...@hortonworks.com> on 2015/08/18 15:13:31 UTC
Review Request 37579: Ambari should not reset UIDs for existing users
in a cluster
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37579/
-----------------------------------------------------------
Review request for Ambari, Myroslav Papirkovskyy and Vitalyi Brodetskyi.
Bugs: AMBARI-12808
https://issues.apache.org/jira/browse/AMBARI-12808
Repository: ambari
Description
-------
If a user wishes to set the UIDs for the users in an HDP cluster, due to some internal security requirements or standards, problems with rolling upgrades can occur, since the upgrade process will create files and directories with a UID of "1001" for "ambari-qa", even if the user had already set the UID for this user to a different value.
The setup_users() method in the following stack script:
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
will always override the UID of a given cluster user, even if the customer has already customized this.
The shared initialization scripts should check to see if a user has already been created with a separate UID, and provide a way to skip the process of setting the new UID. The Ambari scripts set the UID in order to comply with Hadoop and Kerberos standards, so any attempt to override this behavior should provide some config logging
Diffs
-----
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml 213b95f
ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml 41140ab
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py 17c748c
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py 35db022
ambari-server/src/test/python/stacks/2.0.6/configs/default.json 12cc74d
ambari-web/app/data/HDP2/site_properties.js 16182b1
ambari-web/app/utils/config.js ff20568
Diff: https://reviews.apache.org/r/37579/diff/
Testing
-------
Unit tests passed
Thanks,
Dmytro Sen
Re: Review Request 37579: Ambari should not reset UIDs for existing
users in a cluster
Posted by Dmytro Grinenko <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37579/#review96037
-----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java (line 180)
<https://reviews.apache.org/r/37579/#comment151227>
hbase-end?
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java (line 183)
<https://reviews.apache.org/r/37579/#comment151225>
Why we use singletonMap? in most cases we use "HashMap"
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java (line 184)
<https://reviews.apache.org/r/37579/#comment151226>
Why we use singletonMap? in most cases we use "HashMap"
- Dmytro Grinenko
On Aug. 21, 2015, 9:29 a.m., Dmytro Sen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37579/
> -----------------------------------------------------------
>
> (Updated Aug. 21, 2015, 9:29 a.m.)
>
>
> Review request for Ambari, Myroslav Papirkovskyy and Vitalyi Brodetskyi.
>
>
> Bugs: AMBARI-12808
> https://issues.apache.org/jira/browse/AMBARI-12808
>
>
> Repository: ambari
>
>
> Description
> -------
>
> If a user wishes to set the UIDs for the users in an HDP cluster, due to some internal security requirements or standards, problems with rolling upgrades can occur, since the upgrade process will create files and directories with a UID of "1001" for "ambari-qa", even if the user had already set the UID for this user to a different value.
> The setup_users() method in the following stack script:
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
> will always override the UID of a given cluster user, even if the customer has already customized this.
> The shared initialization scripts should check to see if a user has already been created with a separate UID, and provide a way to skip the process of setting the new UID. The Ambari scripts set the UID in order to comply with Hadoop and Kerberos standards, so any attempt to override this behavior should provide some config logging
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java 6f20423
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml 213b95f
> ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml 41140ab
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py 17c748c
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py 35db022
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java fae8985
> ambari-server/src/test/python/stacks/2.0.6/configs/default.json 12cc74d
> ambari-web/app/data/HDP2/site_properties.js 060e3b5
> ambari-web/app/utils/config.js abd1e08
>
> Diff: https://reviews.apache.org/r/37579/diff/
>
>
> Testing
> -------
>
> Unit tests passed
>
>
> Thanks,
>
> Dmytro Sen
>
>
Re: Review Request 37579: Ambari should not reset UIDs for existing
users in a cluster
Posted by Dmytro Grinenko <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37579/#review96039
-----------------------------------------------------------
Ship it!
Ship It!
- Dmytro Grinenko
On Aug. 21, 2015, 10:50 a.m., Dmytro Sen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37579/
> -----------------------------------------------------------
>
> (Updated Aug. 21, 2015, 10:50 a.m.)
>
>
> Review request for Ambari, Myroslav Papirkovskyy and Vitalyi Brodetskyi.
>
>
> Bugs: AMBARI-12808
> https://issues.apache.org/jira/browse/AMBARI-12808
>
>
> Repository: ambari
>
>
> Description
> -------
>
> If a user wishes to set the UIDs for the users in an HDP cluster, due to some internal security requirements or standards, problems with rolling upgrades can occur, since the upgrade process will create files and directories with a UID of "1001" for "ambari-qa", even if the user had already set the UID for this user to a different value.
> The setup_users() method in the following stack script:
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
> will always override the UID of a given cluster user, even if the customer has already customized this.
> The shared initialization scripts should check to see if a user has already been created with a separate UID, and provide a way to skip the process of setting the new UID. The Ambari scripts set the UID in order to comply with Hadoop and Kerberos standards, so any attempt to override this behavior should provide some config logging
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java 6f20423
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml 213b95f
> ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml 41140ab
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py 17c748c
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py 35db022
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java fae8985
> ambari-server/src/test/python/stacks/2.0.6/configs/default.json 12cc74d
> ambari-web/app/data/HDP2/site_properties.js 060e3b5
> ambari-web/app/utils/config.js abd1e08
>
> Diff: https://reviews.apache.org/r/37579/diff/
>
>
> Testing
> -------
>
> Unit tests passed
>
>
> Thanks,
>
> Dmytro Sen
>
>
Re: Review Request 37579: Ambari should not reset UIDs for existing
users in a cluster
Posted by Dmytro Sen <ds...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37579/
-----------------------------------------------------------
(Updated Авг. 21, 2015, 10:50 д.п.)
Review request for Ambari, Myroslav Papirkovskyy and Vitalyi Brodetskyi.
Bugs: AMBARI-12808
https://issues.apache.org/jira/browse/AMBARI-12808
Repository: ambari
Description
-------
If a user wishes to set the UIDs for the users in an HDP cluster, due to some internal security requirements or standards, problems with rolling upgrades can occur, since the upgrade process will create files and directories with a UID of "1001" for "ambari-qa", even if the user had already set the UID for this user to a different value.
The setup_users() method in the following stack script:
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
will always override the UID of a given cluster user, even if the customer has already customized this.
The shared initialization scripts should check to see if a user has already been created with a separate UID, and provide a way to skip the process of setting the new UID. The Ambari scripts set the UID in order to comply with Hadoop and Kerberos standards, so any attempt to override this behavior should provide some config logging
Diffs (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java 6f20423
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml 213b95f
ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml 41140ab
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py 17c748c
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py 35db022
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java fae8985
ambari-server/src/test/python/stacks/2.0.6/configs/default.json 12cc74d
ambari-web/app/data/HDP2/site_properties.js 060e3b5
ambari-web/app/utils/config.js abd1e08
Diff: https://reviews.apache.org/r/37579/diff/
Testing
-------
Unit tests passed
Thanks,
Dmytro Sen
Re: Review Request 37579: Ambari should not reset UIDs for existing
users in a cluster
Posted by Dmytro Grinenko <ha...@gmail.com>.
> On Aug. 21, 2015, 9:56 a.m., Dmytro Grinenko wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java, line 181
> > <https://reviews.apache.org/r/37579/diff/2/?file=1046588#file1046588line181>
> >
> > config.getProperties() could return null, in that case we get here NPE
According to us code, we assume that if config catalog exist, then properties should be present(at least empty map)
- Dmytro
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37579/#review96036
-----------------------------------------------------------
On Aug. 21, 2015, 9:29 a.m., Dmytro Sen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37579/
> -----------------------------------------------------------
>
> (Updated Aug. 21, 2015, 9:29 a.m.)
>
>
> Review request for Ambari, Myroslav Papirkovskyy and Vitalyi Brodetskyi.
>
>
> Bugs: AMBARI-12808
> https://issues.apache.org/jira/browse/AMBARI-12808
>
>
> Repository: ambari
>
>
> Description
> -------
>
> If a user wishes to set the UIDs for the users in an HDP cluster, due to some internal security requirements or standards, problems with rolling upgrades can occur, since the upgrade process will create files and directories with a UID of "1001" for "ambari-qa", even if the user had already set the UID for this user to a different value.
> The setup_users() method in the following stack script:
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
> will always override the UID of a given cluster user, even if the customer has already customized this.
> The shared initialization scripts should check to see if a user has already been created with a separate UID, and provide a way to skip the process of setting the new UID. The Ambari scripts set the UID in order to comply with Hadoop and Kerberos standards, so any attempt to override this behavior should provide some config logging
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java 6f20423
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml 213b95f
> ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml 41140ab
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py 17c748c
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py 35db022
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java fae8985
> ambari-server/src/test/python/stacks/2.0.6/configs/default.json 12cc74d
> ambari-web/app/data/HDP2/site_properties.js 060e3b5
> ambari-web/app/utils/config.js abd1e08
>
> Diff: https://reviews.apache.org/r/37579/diff/
>
>
> Testing
> -------
>
> Unit tests passed
>
>
> Thanks,
>
> Dmytro Sen
>
>
Re: Review Request 37579: Ambari should not reset UIDs for existing
users in a cluster
Posted by Dmytro Grinenko <ha...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37579/#review96036
-----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java (line 181)
<https://reviews.apache.org/r/37579/#comment151224>
config.getProperties() could return null, in that case we get here NPE
- Dmytro Grinenko
On Aug. 21, 2015, 9:29 a.m., Dmytro Sen wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37579/
> -----------------------------------------------------------
>
> (Updated Aug. 21, 2015, 9:29 a.m.)
>
>
> Review request for Ambari, Myroslav Papirkovskyy and Vitalyi Brodetskyi.
>
>
> Bugs: AMBARI-12808
> https://issues.apache.org/jira/browse/AMBARI-12808
>
>
> Repository: ambari
>
>
> Description
> -------
>
> If a user wishes to set the UIDs for the users in an HDP cluster, due to some internal security requirements or standards, problems with rolling upgrades can occur, since the upgrade process will create files and directories with a UID of "1001" for "ambari-qa", even if the user had already set the UID for this user to a different value.
> The setup_users() method in the following stack script:
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
> will always override the UID of a given cluster user, even if the customer has already customized this.
> The shared initialization scripts should check to see if a user has already been created with a separate UID, and provide a way to skip the process of setting the new UID. The Ambari scripts set the UID in order to comply with Hadoop and Kerberos standards, so any attempt to override this behavior should provide some config logging
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java 6f20423
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml 213b95f
> ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml 41140ab
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py 17c748c
> ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py 35db022
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java fae8985
> ambari-server/src/test/python/stacks/2.0.6/configs/default.json 12cc74d
> ambari-web/app/data/HDP2/site_properties.js 060e3b5
> ambari-web/app/utils/config.js abd1e08
>
> Diff: https://reviews.apache.org/r/37579/diff/
>
>
> Testing
> -------
>
> Unit tests passed
>
>
> Thanks,
>
> Dmytro Sen
>
>
Re: Review Request 37579: Ambari should not reset UIDs for existing
users in a cluster
Posted by Dmytro Sen <ds...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37579/
-----------------------------------------------------------
(Updated Авг. 21, 2015, 9:29 д.п.)
Review request for Ambari, Myroslav Papirkovskyy and Vitalyi Brodetskyi.
Bugs: AMBARI-12808
https://issues.apache.org/jira/browse/AMBARI-12808
Repository: ambari
Description
-------
If a user wishes to set the UIDs for the users in an HDP cluster, due to some internal security requirements or standards, problems with rolling upgrades can occur, since the upgrade process will create files and directories with a UID of "1001" for "ambari-qa", even if the user had already set the UID for this user to a different value.
The setup_users() method in the following stack script:
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
will always override the UID of a given cluster user, even if the customer has already customized this.
The shared initialization scripts should check to see if a user has already been created with a separate UID, and provide a way to skip the process of setting the new UID. The Ambari scripts set the UID in order to comply with Hadoop and Kerberos standards, so any attempt to override this behavior should provide some config logging
Diffs (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog212.java 6f20423
ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-env.xml 213b95f
ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml 41140ab
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py 17c748c
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py 35db022
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog212Test.java fae8985
ambari-server/src/test/python/stacks/2.0.6/configs/default.json 12cc74d
ambari-web/app/data/HDP2/site_properties.js 060e3b5
ambari-web/app/utils/config.js abd1e08
Diff: https://reviews.apache.org/r/37579/diff/
Testing
-------
Unit tests passed
Thanks,
Dmytro Sen