Ranger issue while HDP upgrade
ISSUE: While upgrading HDP, Ranger service failed. Below was the error -
Failed to apply patch 020-datamask-policy.sql” with error “Not able to drop table ‘x_datamast_type_’def” Foreign constraints fails Error Code 1217
ERROR:

ROOT CAUSE: Issue was with foreign_key_checks
RESOLUTION:
“SET foreign_key_checks = 0;” in mysql ranger DB and dropped the table manually and re-created and again “SET foreign_key_checks = 1;”

