----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/46126/#review128707 -----------------------------------------------------------
ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py (line 60) <https://reviews.apache.org/r/46126/#comment192174> should this be using hawq_constants.SEGMENT ? ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstatus.py (line 37) <https://reviews.apache.org/r/46126/#comment192175> if you raise ComponentIsNotRunning exception here, there will be no need to use try / catch in the methods that call it. Might also rename get_component_status() to assert_component_running() as technically the function returns no value, but rather asserts if the component is running. - Alexander Denissov On April 13, 2016, 12:50 a.m., bhuvnesh chaudhary wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/46126/ > ----------------------------------------------------------- > > (Updated April 13, 2016, 12:50 a.m.) > > > Review request for Ambari, Alexander Denissov, Alejandro Fernandez, jun aoki, > Jayush Luniya, Matt, and Oleksandr Diachenko. > > > Bugs: AMBARI-15849 > https://issues.apache.org/jira/browse/AMBARI-15849 > > > Repository: ambari > > > Description > ------- > > Activate HAWQ standby wizard fails to delete previous hawq standby master. > Currently, HAWQ standby status check is done based on the pid available in a > directory. This directory is same for HAWQ master and HAWQ standby, thus if > standby has been activated to active master, status of HAWQ Standby component > still relies on the file and states it as running, and when an attempt is > made to remove the standby component, it fails. > Fixed the hawq component status derivation logic in this patch. > > > Diffs > ----- > > > ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqmaster.py > 98dedf1 > > ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqsegment.py > 8a5ad16 > > ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstandby.py > fb677ee > > ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/hawqstatus.py > a1b6dd9 > > Diff: https://reviews.apache.org/r/46126/diff/ > > > Testing > ------- > > yes. > bhuvneshchaudhary@bhuviMac:HAWQ$ python -m discover -v > test_hawq_master_critical > (test_alert_component_status.TestAlertComponentStatus) ... ok > test_hawq_master_ok (test_alert_component_status.TestAlertComponentStatus) > ... ok > test_hawq_segment_critical > (test_alert_component_status.TestAlertComponentStatus) ... ok > test_hawq_segment_ok (test_alert_component_status.TestAlertComponentStatus) > ... ok > test_hawq_standby_critical > (test_alert_component_status.TestAlertComponentStatus) ... ok > test_hawq_standby_ok (test_alert_component_status.TestAlertComponentStatus) > ... ok > test_missing_configs (test_alert_component_status.TestAlertComponentStatus) > ... ok > test_exception_registration_status > (test_alert_segment_registration_status.TestAlertRegistrationStatus) ... No > handlers could be found for logger "ambari_alerts" > ok > test_missing_configs > (test_alert_segment_registration_status.TestAlertRegistrationStatus) ... ok > test_missing_slave_file > (test_alert_segment_registration_status.TestAlertRegistrationStatus) ... ok > test_successful_registration_status > (test_alert_segment_registration_status.TestAlertRegistrationStatus) ... ok > test_unsuccessful_empty_db_registration_status > (test_alert_segment_registration_status.TestAlertRegistrationStatus) ... ok > test_unsuccessful_registration_status > (test_alert_segment_registration_status.TestAlertRegistrationStatus) ... ok > test_unsuccessful_registration_status_plural > (test_alert_segment_registration_status.TestAlertRegistrationStatus) ... ok > test_missing_configs (test_alert_sync_status.TestAlertSyncStatus) ... ok > test_no_standby_state (test_alert_sync_status.TestAlertSyncStatus) ... ok > test_none_state (test_alert_sync_status.TestAlertSyncStatus) ... ok > test_not_configured_state (test_alert_sync_status.TestAlertSyncStatus) ... ok > test_not_synchronized_state (test_alert_sync_status.TestAlertSyncStatus) ... > ok > test_synchronized_state (test_alert_sync_status.TestAlertSyncStatus) ... ok > test_synchronizing_state (test_alert_sync_status.TestAlertSyncStatus) ... ok > test_unknown_state (test_alert_sync_status.TestAlertSyncStatus) ... ok > test_configure_default (test_hawqmaster.TestHawqMaster) ... ok > test_install_default (test_hawqmaster.TestHawqMaster) ... ok > test_start_default (test_hawqmaster.TestHawqMaster) ... 2016-04-12 > 17:51:26,025 - Skipping ssh key exchange with HAWQ hosts as hawq_ssh_exkeys > is either set to false or is not available in hawq-env.xml > ok > test_stop_default (test_hawqmaster.TestHawqMaster) ... ok > test_configure_default (test_hawqsegment.TestHawqSegment) ... ok > test_install_default (test_hawqsegment.TestHawqSegment) ... ok > test_start_default (test_hawqsegment.TestHawqSegment) ... ok > test_stop_default (test_hawqsegment.TestHawqSegment) ... ok > test_configure_default (test_hawqstandby.TestHawqStandby) ... ok > test_install_default (test_hawqstandby.TestHawqStandby) ... ok > test_start_default (test_hawqstandby.TestHawqStandby) ... ok > test_stop_default (test_hawqstandby.TestHawqStandby) ... ok > > ---------------------------------------------------------------------- > Ran 34 tests in 0.149s > > OK > > > Thanks, > > bhuvnesh chaudhary > >