[
https://issues.apache.org/jira/browse/RANGER-5146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Madhan Neethiraj updated RANGER-5146:
-------------------------------------
Fix Version/s: 2.7.0
> 500 API Error When Deleting TagDef with a Linked Tag
> ----------------------------------------------------
>
> Key: RANGER-5146
> URL: https://issues.apache.org/jira/browse/RANGER-5146
> Project: Ranger
> Issue Type: Bug
> Components: Ranger
> Affects Versions: 2.6.0
> Reporter: Vishal Bhavsar
> Assignee: Dineshkumar Yadav
> Priority: Major
> Fix For: 3.0.0, 2.7.0
>
> Attachments:
> 0001-RANGER-5146-500-API-Error-When-Deleting-TagDef-with-.patch
>
>
> When tagDef and a linked tag is created, and delete of the tagDef is
> attempted with DELETE API - /service/tags/tagdef/\{tagDefId}, it fails with
> 500 status.
> Steps to reproduce:
> 1) Create an tagdef & linked tag by hitting below api.
> PUT API: http://<ranger-host>:6080/service/tags/importservicetags
> json body used:
> {code:java}
> {
> "op": "add_or_update",
> "serviceName": "hive1",
> "tagVersion": 0,
> "tagDefinitions": {
> "0": {
> "name": "PII_LOCATION",
> "source": "Atlas",
> "attributeDefs": [
> {
> "name": "names",
> "type": "String"
> }
> ],
> "id": 0,
> "isEnabled": true
> }
> },
> "tags": {
> "0": {
> "type": "PII_LOCATION",
> "owner": 0,
> "attributes": {
> "location": "mumbai"
> },
> "id": 0,
> "isEnabled": true
> }
> },
> "serviceResources": [
> {
> "serviceName": "hive1",
> "resourceElements": {
> "database": {
> "values": [
> "temp_db"
> ],
> "isExcludes": false,
> "isRecursive": false
> },
> "table": {
> "values": [
> "employee"
> ],
> "isExcludes": false,
> "isRecursive": false
> },
> "column": {
> "values": [
> "location"
> ],
> "isExcludes": false,
> "isRecursive": false
> }
> },
> "id": 0,
> "isEnabled": true
> }
> ],
> "resourceToTagIds": {
> "0": [
> 0
> ]
> }
> } {code}
> 2) Tried to delete the tagdef via below DELETE api, observed api status as
> 500.
> http://<ranger-host>:6080/service/tags/tagdef/\{tagDefId}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)