def post_upgrade_check(): """ Ensure all journal nodes are up and quorum is established during Rolling Upgrade. :return: """ import params Logger.info("Ensuring Journalnode quorum is established") if params.security_enabled: # We establish HDFS identity instead of JN Kerberos identity # since this is an administrative HDFS call that requires the HDFS administrator user to perform. Execute(params.hdfs_kinit_cmd, user=params.hdfs_user) time.sleep(5) hdfs_roll_edits() time.sleep(5) all_journal_node_hosts = default("/clusterHostInfo/journalnode_hosts", []) if len(all_journal_node_hosts) < 3: raise Fail("Need at least 3 Journalnodes to maintain a quorum") try: namenode_ha = namenode_ha_state.NamenodeHAState() except ValueError, err: raise Fail("Could not retrieve Namenode HA addresses. Error: " + str( err))
def post_upgrade_check(): """ Ensure all journal nodes are up and quorum is established during Rolling Upgrade. :return: """ import params Logger.info("Ensuring Journalnode quorum is established") if params.security_enabled: Execute(params.jn_kinit_cmd, user=params.hdfs_user) time.sleep(5) hdfs_roll_edits() time.sleep(5) all_journal_node_hosts = default("/clusterHostInfo/journalnode_hosts", []) if len(all_journal_node_hosts) < 3: raise Fail("Need at least 3 Journalnodes to maintain a quorum") try: namenode_ha = namenode_ha_state.NamenodeHAState() except ValueError, err: raise Fail("Could not retrieve Namenode HA addresses. Error: " + str(err))