{"action":"created","issue":{"url":"https://api.github.com/repos/rancher/rancher/issues/1997","labels_url":"https://api.github.com/repos/rancher/rancher/issues/1997/labels{/name}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/1997/comments","events_url":"https://api.github.com/repos/rancher/rancher/issues/1997/events","html_url":"https://github.com/rancher/rancher/issues/1997","id":105489180,"number":1997,"title":"rancher-compose confusion with environment creation","user":{"login":"ndarilek","id":1172,"avatar_url":"https://avatars.githubusercontent.com/u/1172?v=3","gravatar_id":"","url":"https://api.github.com/users/ndarilek","html_url":"https://github.com/ndarilek","followers_url":"https://api.github.com/users/ndarilek/followers","following_url":"https://api.github.com/users/ndarilek/following{/other_user}","gists_url":"https://api.github.com/users/ndarilek/gists{/gist_id}","starred_url":"https://api.github.com/users/ndarilek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndarilek/subscriptions","organizations_url":"https://api.github.com/users/ndarilek/orgs","repos_url":"https://api.github.com/users/ndarilek/repos","events_url":"https://api.github.com/users/ndarilek/events{/privacy}","received_events_url":"https://api.github.com/users/ndarilek/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rancher/rancher/labels/area/rancher-compose","name":"area/rancher-compose","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-08T23:37:07Z","updated_at":"2015-09-09T19:04:55Z","closed_at":null,"body":"I set up my Rancher environment via the web interface, then downloaded the Compose config with the intent to perform everything via the command line. I then generated an access key and secret as per the docs and set up my environment variables accordingly.\r\n\r\nI'm using the Default environment and Default stack to run a bunch of assorted, simple services with no links. I have my compose files in a Default/Default directory on my laptop. I know the higher-level path isn't important but assume Default will be the stack that rancher-compose manipulates.\r\n\r\nI then run `rancher-compose logs VPN` to, in theory, retrieve the logs of my VPN service in the Default stack. Instead I see:\r\n\r\n```\r\n←[34mINFO←[0m[0002] Creating environment default\r\n←[31mERRO←[0m[0002] Failed to open project default: Bad response from [https://rancher.example.com/v1/environments], sta\r\ntusCode [422]. Status [422 status code 422]. Body: [{\"id\":\"1e0ed811-edae-44f9-91bd-46ec3847ffc7\",\"type\":\"error\",\"links\":{},\"a\r\nctions\":{},\"status\":422,\"code\":\"NotUnique\",\"message\":null,\"detail\":null,\"fieldName\":\"name\"}]\r\n2015/09/08 18:30:00 Failed to read project: Bad response from [https://rancher.example.com/v1/environments], statusCode\r\n[422]. Status [422 status code 422]. Body: [{\"id\":\"1e0ed811-edae-44f9-91bd-46ec3847ffc7\",\"type\":\"error\",\"links\":{},\"actions\":\r\n{},\"status\":422,\"code\":\"NotUnique\",\"message\":null,\"detail\":null,\"fieldName\":\"name\"}]\r\n```\r\n\r\nFirst, should my endpoint be https://rancher.example.com and not the endpoint URL displayed above my API key? That's a little different, but the docs seem to use an example to the root of a Rancher server, and indicate that the key itself determines the environment. It might be wise to remove or repurpose the displayed endpoint since it was a point of confusion for me. For reference I'm referring to https://rancher.example.com/v1/projects/xxx.\r\n\r\nNext, why is rancher-compose creating *anything* here? I would assume that `logs` is a read-only command and that no new environments will be created. Further, I'd assume it would try to modify existing environments rather than creating new ones, so that this is failing is a bit odd to me. IOW, if I tweaked the docker-compose.yml and ran `restart`, it wouldn't create a new environment/project but would instead update the container definition, recreating if necessary.\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/rancher/rancher/issues/comments/139011305","html_url":"https://github.com/rancher/rancher/issues/1997#issuecomment-139011305","issue_url":"https://api.github.com/repos/rancher/rancher/issues/1997","id":139011305,"user":{"login":"deniseschannon","id":11410997,"avatar_url":"https://avatars.githubusercontent.com/u/11410997?v=3","gravatar_id":"","url":"https://api.github.com/users/deniseschannon","html_url":"https://github.com/deniseschannon","followers_url":"https://api.github.com/users/deniseschannon/followers","following_url":"https://api.github.com/users/deniseschannon/following{/other_user}","gists_url":"https://api.github.com/users/deniseschannon/gists{/gist_id}","starred_url":"https://api.github.com/users/deniseschannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deniseschannon/subscriptions","organizations_url":"https://api.github.com/users/deniseschannon/orgs","repos_url":"https://api.github.com/users/deniseschannon/repos","events_url":"https://api.github.com/users/deniseschannon/events{/privacy}","received_events_url":"https://api.github.com/users/deniseschannon/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T19:04:55Z","updated_at":"2015-09-09T19:04:55Z","body":"Can you let me know what version of rancher-compose you are running? There was a bug on case insensitivity with stack names that will be in the next release. "}}