[
https://issues.apache.org/jira/browse/RANGER-5146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dineshkumar Yadav updated RANGER-5146:
--------------------------------------
Summary: 500 API Error When Deleting TagDef with a Linked Tag (was: While
trying to delete tagDef having a linked tag, we get 500 api response)
> 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
>
> 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)