{"action":"created","issue":{"url":"https://api.github.com/repos/StackStorm/st2/issues/2848","repository_url":"https://api.github.com/repos/StackStorm/st2","labels_url":"https://api.github.com/repos/StackStorm/st2/issues/2848/labels{/name}","comments_url":"https://api.github.com/repos/StackStorm/st2/issues/2848/comments","events_url":"https://api.github.com/repos/StackStorm/st2/issues/2848/events","html_url":"https://github.com/StackStorm/st2/issues/2848","id":169425582,"number":2848,"title":"Policy names can collide across packs.","user":{"login":"tim-ireland","id":1231260,"avatar_url":"https://avatars.githubusercontent.com/u/1231260?v=3","gravatar_id":"","url":"https://api.github.com/users/tim-ireland","html_url":"https://github.com/tim-ireland","followers_url":"https://api.github.com/users/tim-ireland/followers","following_url":"https://api.github.com/users/tim-ireland/following{/other_user}","gists_url":"https://api.github.com/users/tim-ireland/gists{/gist_id}","starred_url":"https://api.github.com/users/tim-ireland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tim-ireland/subscriptions","organizations_url":"https://api.github.com/users/tim-ireland/orgs","repos_url":"https://api.github.com/users/tim-ireland/repos","events_url":"https://api.github.com/users/tim-ireland/events{/privacy}","received_events_url":"https://api.github.com/users/tim-ireland/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/StackStorm/st2/labels/SUPPORT","name":"SUPPORT","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-08-04T17:09:31Z","updated_at":"2016-08-11T14:07:57Z","closed_at":null,"body":"We have a situation where there are 2 custom packs, each of which have concurrency policies in place.  One pack has a concurrency policy on a workflow, the other on an action.  In addition, we happen to have given the policies the same name.  \r\n\r\nThis error was found in the logs.,\r\n\r\n```python\r\nStackStormDBObjectConflictError: Tried to save duplicate unique keys (E11000 duplicate key error collection: st2.policy_d_b index: policy_type_1_resource_ref_1 dup key: { : \"action.concurrency\", : \"<pack>.<workflow>\" })\r\n```\r\n\r\n It was not immediately apparent that the second policy was not being loaded.  Upon further inspection, it was not listed in the output of `st2 policy list`.\r\n\r\nIt seems problematic that collisions can occur between policies of separate packs.  Perhaps the policy names should be augmented to include the pack when stored in the backend? \r\n"},"comment":{"url":"https://api.github.com/repos/StackStorm/st2/issues/comments/239171409","html_url":"https://github.com/StackStorm/st2/issues/2848#issuecomment-239171409","issue_url":"https://api.github.com/repos/StackStorm/st2/issues/2848","id":239171409,"user":{"login":"andrew-regan","id":13903094,"avatar_url":"https://avatars.githubusercontent.com/u/13903094?v=3","gravatar_id":"","url":"https://api.github.com/users/andrew-regan","html_url":"https://github.com/andrew-regan","followers_url":"https://api.github.com/users/andrew-regan/followers","following_url":"https://api.github.com/users/andrew-regan/following{/other_user}","gists_url":"https://api.github.com/users/andrew-regan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-regan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-regan/subscriptions","organizations_url":"https://api.github.com/users/andrew-regan/orgs","repos_url":"https://api.github.com/users/andrew-regan/repos","events_url":"https://api.github.com/users/andrew-regan/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-regan/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T14:07:57Z","updated_at":"2016-08-11T14:07:57Z","body":"We updated to 1.6. Will be retesting this soon."}}
{"actor":{"display_login":"andrew-regan"}}