You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Dmitro Lisnichenko <dl...@hortonworks.com> on 2016/04/27 11:49:05 UTC

Review Request 46729: [preview] Force running service checks for services before upgrade

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

Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.


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


Repository: ambari


Description
-------

Just checking for service checks that were run within the last hour does not seem to be a warranty of anything. For example, user could install cluster, run service checks once, and then enable security/LDAP/change configuration as required by some pre-upgrade check/whatever, and still have Health Check passing.

So the current idea is to check configuration change history and compare config change timestamps with last time the service check for related service was run.

Also log to Ambari log timestamps of latest service checks for services, and timestamps of latest service config changes (INFO level)


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java d701bdc 
  ambari-server/src/main/java/org/apache/ambari/server/checks/HealthCheck.java a1ab1eb 
  ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java PRE-CREATION 

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


Testing
-------

mvn clean test


Thanks,

Dmitro Lisnichenko


Re: Review Request 46729: Force running service checks for services before upgrade

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.

> On April 27, 2016, 8:04 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java, line 61
> > <https://reviews.apache.org/r/46729/diff/1/?file=1363146#file1363146line61>
> >
> >     Change "rerun" to "run again". Rerun is this guy:
> >     https://en.wikipedia.org/wiki/Fred_Berry

I did not mean him :). Fixed


- Dmitro


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


On April 28, 2016, 10:36 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46729/
> -----------------------------------------------------------
> 
> (Updated April 28, 2016, 10:36 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-16134
>     https://issues.apache.org/jira/browse/AMBARI-16134
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Just checking for service checks that were run within the last hour does not seem to be a warranty of anything. For example, user could install cluster, run service checks once, and then enable security/LDAP/change configuration as required by some pre-upgrade check/whatever, and still have Health Check passing.
> 
> So the current idea is to check configuration change history and compare config change timestamps with last time the service check for related service was run.
> 
> Also log to Ambari log timestamps of latest service checks for services, and timestamps of latest service config changes (INFO level)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java d701bdc 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/HealthCheck.java a1ab1eb 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46729/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>


Re: Review Request 46729: [preview] Force running service checks for services before upgrade

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46729/#review130807
-----------------------------------------------------------




ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java (line 61)
<https://reviews.apache.org/r/46729/#comment194706>

    Change "rerun" to "run again". Rerun is this guy:
    https://en.wikipedia.org/wiki/Fred_Berry



ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java (lines 89 - 91)
<https://reviews.apache.org/r/46729/#comment194708>

    Is there no way to get the "current" configs? The ones marked enabled=1 in the DB?
    
    That would prevent you from having to iterate over all of them.



ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java (line 103)
<https://reviews.apache.org/r/46729/#comment194707>

    Uhhh ... this could be a lot. Like 300,000 a lot. Maybe you need a restriction here to the last X HRCs


- Jonathan Hurley


On April 27, 2016, 5:49 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46729/
> -----------------------------------------------------------
> 
> (Updated April 27, 2016, 5:49 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-16134
>     https://issues.apache.org/jira/browse/AMBARI-16134
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Just checking for service checks that were run within the last hour does not seem to be a warranty of anything. For example, user could install cluster, run service checks once, and then enable security/LDAP/change configuration as required by some pre-upgrade check/whatever, and still have Health Check passing.
> 
> So the current idea is to check configuration change history and compare config change timestamps with last time the service check for related service was run.
> 
> Also log to Ambari log timestamps of latest service checks for services, and timestamps of latest service config changes (INFO level)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java d701bdc 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/HealthCheck.java a1ab1eb 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46729/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>


Re: Review Request 46729: Force running service checks for services before upgrade

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46729/#review130904
-----------------------------------------------------------


Ship it!




Ship It!

- Nate Cole


On April 28, 2016, 3:36 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46729/
> -----------------------------------------------------------
> 
> (Updated April 28, 2016, 3:36 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-16134
>     https://issues.apache.org/jira/browse/AMBARI-16134
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Just checking for service checks that were run within the last hour does not seem to be a warranty of anything. For example, user could install cluster, run service checks once, and then enable security/LDAP/change configuration as required by some pre-upgrade check/whatever, and still have Health Check passing.
> 
> So the current idea is to check configuration change history and compare config change timestamps with last time the service check for related service was run.
> 
> Also log to Ambari log timestamps of latest service checks for services, and timestamps of latest service config changes (INFO level)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java d701bdc 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/HealthCheck.java a1ab1eb 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46729/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>


Re: Review Request 46729: Force running service checks for services before upgrade

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46729/#review130919
-----------------------------------------------------------


Ship it!




Ship It!

- Jonathan Hurley


On April 28, 2016, 3:36 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46729/
> -----------------------------------------------------------
> 
> (Updated April 28, 2016, 3:36 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-16134
>     https://issues.apache.org/jira/browse/AMBARI-16134
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Just checking for service checks that were run within the last hour does not seem to be a warranty of anything. For example, user could install cluster, run service checks once, and then enable security/LDAP/change configuration as required by some pre-upgrade check/whatever, and still have Health Check passing.
> 
> So the current idea is to check configuration change history and compare config change timestamps with last time the service check for related service was run.
> 
> Also log to Ambari log timestamps of latest service checks for services, and timestamps of latest service config changes (INFO level)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java d701bdc 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/HealthCheck.java a1ab1eb 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46729/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>


Re: Review Request 46729: Force running service checks for services before upgrade

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46729/
-----------------------------------------------------------

(Updated April 28, 2016, 10:36 a.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.


Changes
-------

Fixed comments


Summary (updated)
-----------------

Force running service checks for services before upgrade


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


Repository: ambari


Description
-------

Just checking for service checks that were run within the last hour does not seem to be a warranty of anything. For example, user could install cluster, run service checks once, and then enable security/LDAP/change configuration as required by some pre-upgrade check/whatever, and still have Health Check passing.

So the current idea is to check configuration change history and compare config change timestamps with last time the service check for related service was run.

Also log to Ambari log timestamps of latest service checks for services, and timestamps of latest service config changes (INFO level)


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java d701bdc 
  ambari-server/src/main/java/org/apache/ambari/server/checks/HealthCheck.java a1ab1eb 
  ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java PRE-CREATION 

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


Testing
-------

mvn clean test


Thanks,

Dmitro Lisnichenko


Re: Review Request 46729: [preview] Force running service checks for services before upgrade

Posted by Nate Cole <nc...@hortonworks.com>.

> On April 27, 2016, 12:39 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java, lines 112-123
> > <https://reviews.apache.org/r/46729/diff/1/?file=1363148#file1363148line112>
> >
> >     I don't think we want a "break;" here - we should probably collect all the SERVICE_CHECK and give them to the user.

All SERVICE_CHECKs that fail, that is


- Nate


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


On April 27, 2016, 5:49 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46729/
> -----------------------------------------------------------
> 
> (Updated April 27, 2016, 5:49 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-16134
>     https://issues.apache.org/jira/browse/AMBARI-16134
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Just checking for service checks that were run within the last hour does not seem to be a warranty of anything. For example, user could install cluster, run service checks once, and then enable security/LDAP/change configuration as required by some pre-upgrade check/whatever, and still have Health Check passing.
> 
> So the current idea is to check configuration change history and compare config change timestamps with last time the service check for related service was run.
> 
> Also log to Ambari log timestamps of latest service checks for services, and timestamps of latest service config changes (INFO level)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java d701bdc 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/HealthCheck.java a1ab1eb 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46729/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>


Re: Review Request 46729: [preview] Force running service checks for services before upgrade

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46729/#review130804
-----------------------------------------------------------




ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java (line 58)
<https://reviews.apache.org/r/46729/#comment194701>

    "Last Service Check should be more recent than the last configuration change for the given service"



ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java (line 106)
<https://reviews.apache.org/r/46729/#comment194702>

    nit: can make static, but this isn't called that much to matter



ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java (lines 112 - 123)
<https://reviews.apache.org/r/46729/#comment194703>

    I don't think we want a "break;" here - we should probably collect all the SERVICE_CHECK and give them to the user.



ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java (line 128)
<https://reviews.apache.org/r/46729/#comment194704>

    nit: Could just make failedServiceNames a LinkedHashSet<> from the beginning.


- Nate Cole


On April 27, 2016, 5:49 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46729/
> -----------------------------------------------------------
> 
> (Updated April 27, 2016, 5:49 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-16134
>     https://issues.apache.org/jira/browse/AMBARI-16134
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Just checking for service checks that were run within the last hour does not seem to be a warranty of anything. For example, user could install cluster, run service checks once, and then enable security/LDAP/change configuration as required by some pre-upgrade check/whatever, and still have Health Check passing.
> 
> So the current idea is to check configuration change history and compare config change timestamps with last time the service check for related service was run.
> 
> Also log to Ambari log timestamps of latest service checks for services, and timestamps of latest service config changes (INFO level)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java d701bdc 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/HealthCheck.java a1ab1eb 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46729/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>


Re: Review Request 46729: [preview] Force running service checks for services before upgrade

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46729/#review130810
-----------------------------------------------------------




ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java (line 92)
<https://reviews.apache.org/r/46729/#comment194710>

    This should ignore services that are not part of the upgrade pack, or, include service with at least one component that has versionAdvertised=true
    This is to exclude AMS, SmartSense


- Alejandro Fernandez


On April 27, 2016, 9:49 a.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46729/
> -----------------------------------------------------------
> 
> (Updated April 27, 2016, 9:49 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-16134
>     https://issues.apache.org/jira/browse/AMBARI-16134
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Just checking for service checks that were run within the last hour does not seem to be a warranty of anything. For example, user could install cluster, run service checks once, and then enable security/LDAP/change configuration as required by some pre-upgrade check/whatever, and still have Health Check passing.
> 
> So the current idea is to check configuration change history and compare config change timestamps with last time the service check for related service was run.
> 
> Also log to Ambari log timestamps of latest service checks for services, and timestamps of latest service config changes (INFO level)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/CheckDescription.java d701bdc 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/HealthCheck.java a1ab1eb 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/ServiceCheckValidityCheck.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/checks/ServiceCheckValidityCheckTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/46729/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>