Sean, In Ambari:
Ranger > Configs > Advanced > Custom ranger-tagsync-site Add property ranger.tagsync.atlas.hive.instance.cluster_hive.ranger.service with value 'ranger_hive' (assuming, that 'cluster_hive' is name of cluster in Atlas, and 'ranger_hive' is name of hive service in Ranger. Then restart ranger-tagsync. Thanks, -Abhay From: Sean Roberts <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Monday, April 3, 2017 at 11:44 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: Tag based policies not functioning (tagsync gives 400) Abhay - That could explain it. Ambari set the Hive service name in Ranger to 'hive' not 'cluster_hive'. Where can TAGSYNC_ATLAS_TO_RANGER_SERVICE_MAPPINGbe configured? I don't see it in any of the config files. [cid:[email protected]] -- Sean Roberts Partner Engineering, EMEA @seano From: Abhay Kulkarni <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Monday, 3 April 2017 at 19:48 To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: Tag based policies not functioning (tagsync gives 400) Sean, No. If you are tagging a hive table in Atlas, then that Atlas entity is identified within Atlas with the cluster it belongs to (say 'Atlas_hive') and the table-name. Ranger, when processing this tag, tried to locate Ranger hive service with the same name ('Atlas_hive'). If Ranger does not have such service, then the processing will fail. The debug logs I requested will confirm if this is the case. If it is, then there is a tag-sync custom configuration parameter named 'TAGSYNC_ATLAS_TO_RANGER_SERVICE_MAPPING' which may be used to map Atlas cluster name to Ranger service name. This is explained here<https://cwiki.apache.org/confluence/display/RANGER/Tag+Synchronizer+Installation+and+Configuration>. Hope this helps, -Abhay From: Sean Roberts <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Monday, April 3, 2017 at 10:31 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: Tag based policies not functioning (tagsync gives 400) Abhay - I'm not sure I understand which settings you mean. Are you saying this should be the same as "application.properties" "atlas.cluster.name"? [cid:[email protected]] -- Sean Roberts Partner Engineering, EMEA @seano From: Abhay Kulkarni <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Monday, 3 April 2017 at 19:19 To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: Tag based policies not functioning (tagsync gives 400) Sean, One of the possible reasons for this type of error when Atlas is used in conjunction with Ranger to tag entities, is that there is a mismatch between entity's Atlas cluster-name and corresponding Ranger Service-Name. Can you please check if they are identical? Thanks, -Abhay From: Abhay Kulkarni <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Monday, April 3, 2017 at 10:01 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: Tag based policies not functioning (tagsync gives 400) Hi Sean, What is the scenario when you run into this error? Can you please attach debug logs ranger-tagsync and ranger-admin (after setting logging level to DEBUG)? Thanks, -Abhay From: Sean Roberts <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Monday, April 3, 2017 at 9:56 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Tag based policies not functioning (tagsync gives 400) Ranger folks - I'm getting the following error in tagsync.log: 03 Apr 2017 16:44:12 ERROR TagAdminRESTSink [Thread-8] - 177 Upload of service-tags failed with message HTTP 400 And tag based policies are not working. -- Sean Roberts Partner Engineering, EMEA @seano
