Duplicate entry for Environment: ['name']] error happens when trying to create a plan via the CLI:
2016-09-06 17:29:30.762 2034 INFO mistral.api.controllers.v2.environment [-] Create environment [env=Environment [id='Unset', name='overcloud', description='Unset', variables='{u'template': u'overcloud.yaml', u'environments': [{u'path': u'overcloud-resource-registry-puppet.yaml'}]}', scope='Unset', created_at='Unset', updated_at='Unset']]
2016-09-06 17:29:30.773 1136 INFO mistral.engine.rpc_backend.rpc [-] Received RPC request 'on_action_complete'[rpc_ctx=MistralContext {u'project_name': u'admin', u'user_id': u'4121cb1a51084d888f5f476c8d00e520', u'roles': [u'admin'], u'auth_uri': u'http://192.0.2.1:5000/v3', u'auth_cacert': None, u'auth_token': u'c31ee7510b0f4b7cbf627dafce85b2cb', u'is_trust_scoped': False, u'service_catalog': u'[{"endpoints": [{"adminURL": "http://192.0.2.1:5050", "region": "regionOne", "internalURL": "http://192.0.2.1:5050", "publicURL": "http://192.0.2.1:5050"}], "type": "baremetal-introspection", "name": "ironic-inspector"}, {"endpoints": [{"adminURL": "http://192.0.2.1:8080", "region": "regionOne", "internalURL": "http://192.0.2.1:8080/v1/AUTH_36c25109478c4b5a9a159f45bb5edf00", "publicURL": "http://192.0.2.1:8080/v1/AUTH_36c25109478c4b5a9a159f45bb5edf00"}], "type": "object-store", "name": "swift"}, {"endpoints": [{"adminURL": "http://192.0.2.1:9292", "region": "regionOne", "internalURL": "http://192.0.2.1:9292", "publicURL": "http://192.0.2.1:9292"}], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "ws://192.0.2.1:9000/", "region": "regionOne", "internalURL": "ws://192.0.2.1:9000/", "publicURL": "ws://192.0.2.1:9000/"}], "type": "messaging-websocket", "name": "zaqar-websocket"}, {"endpoints": [{"adminURL": "http://192.0.2.1:8774/v2.1", "region": "regionOne", "internalURL": "http://192.0.2.1:8774/v2.1", "publicURL": "http://192.0.2.1:8774/v2.1"}], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://192.0.2.1:6385", "region": "regionOne", "internalURL": "http://192.0.2.1:6385", "publicURL": "http://192.0.2.1:6385"}], "type": "baremetal", "name": "ironic"}, {"endpoints": [{"adminURL": "http://192.0.2.1:8888", "region": "regionOne", "internalURL": "http://192.0.2.1:8888", "publicURL": "http://192.0.2.1:8888"}], "type": "messaging", "name": "zaqar"}, {"endpoints": [{"adminURL": "http://192.0.2.1:8004/v1/36c25109478c4b5a9a159f45bb5edf00", "region": "regionOne", "internalURL": "http://192.0.2.1:8004/v1/36c25109478c4b5a9a159f45bb5edf00", "publicURL": "http://192.0.2.1:8004/v1/36c25109478c4b5a9a159f45bb5edf00"}], "type": "orchestration", "name": "heat"}, {"endpoints": [{"adminURL": "http://192.0.2.1:8989/v2", "region": "regionOne", "internalURL": "http://192.0.2.1:8989/v2", "publicURL": "http://192.0.2.1:8989/v2"}], "type": "workflowv2", "name": "mistral"}, {"endpoints": [{"adminURL": "http://192.0.2.1:9696", "region": "regionOne", "internalURL": "http://192.0.2.1:9696", "publicURL": "http://192.0.2.1:9696"}], "type": "network", "name": "neutron"}, {"endpoints": [{"adminURL": "http://192.0.2.1:35357/v2.0", "region": "regionOne", "internalURL": "http://192.0.2.1:5000/v2.0", "publicURL": "http://192.0.2.1:5000/v2.0"}], "type": "identity", "name": "keystone"}]', u'project_id': u'36c25109478c4b5a9a159f45bb5edf00', u'user_name': u'admin'}, action_ex_id=468faff9-23ad-45ed-8f7f-d8118765dd23, result=Result [data=None, error=u"Error occurred creating plan: Duplicate entry for Environment: ['name']", cancel=False]]
2016-09-06 17:29:30.892 1136 INFO workflow_trace [-] Action 'tripleo.create_plan' (468faff9-23ad-45ed-8f7f-d8118765dd23) [RUNNING -> ERROR, error = Error occurred creating plan: Duplicate entry for Environment: ['name']]
2016-09-06 17:29:30.915 1136 INFO workflow_trace [-] Task 'create_plan' (5f701f56-cf3a-4f1a-97af-aaa414cba87e) [RUNNING -> ERROR, msg=Error occurred creating plan: Duplicate entry for Environment: ['name']] (execution_id=95e8e090-cc76-4a08-98ea-90936d29a1c5)
Ok, so I think this happens when you delete the plan stored in swift but forget to delete the mistral environment. Something of a corner case perhaps now we have overcloud plan delete, but I think the error needs to be clearer.