{"action":"created","issue":{"url":"https://api.github.com/repos/rancher/rancher/issues/9501","repository_url":"https://api.github.com/repos/rancher/rancher","labels_url":"https://api.github.com/repos/rancher/rancher/issues/9501/labels{/name}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/9501/comments","events_url":"https://api.github.com/repos/rancher/rancher/issues/9501/events","html_url":"https://github.com/rancher/rancher/issues/9501","id":246192080,"number":9501,"title":"Stack export for secrets in long syntax is not successful","user":{"login":"soumyalj","id":18536626,"avatar_url":"https://avatars1.githubusercontent.com/u/18536626?v=4","gravatar_id":"","url":"https://api.github.com/users/soumyalj","html_url":"https://github.com/soumyalj","followers_url":"https://api.github.com/users/soumyalj/followers","following_url":"https://api.github.com/users/soumyalj/following{/other_user}","gists_url":"https://api.github.com/users/soumyalj/gists{/gist_id}","starred_url":"https://api.github.com/users/soumyalj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soumyalj/subscriptions","organizations_url":"https://api.github.com/users/soumyalj/orgs","repos_url":"https://api.github.com/users/soumyalj/repos","events_url":"https://api.github.com/users/soumyalj/events{/privacy}","received_events_url":"https://api.github.com/users/soumyalj/received_events","type":"User","site_admin":false},"labels":[{"id":145695744,"url":"https://api.github.com/repos/rancher/rancher/labels/kind/bug","name":"kind/bug","color":"fc2929","default":false},{"id":189155298,"url":"https://api.github.com/repos/rancher/rancher/labels/status/resolved","name":"status/resolved","color":"0052cc","default":false},{"id":203009589,"url":"https://api.github.com/repos/rancher/rancher/labels/status/to-test","name":"status/to-test","color":"66aa66","default":false}],"state":"open","locked":false,"assignee":{"login":"alena1108","id":1562176,"avatar_url":"https://avatars0.githubusercontent.com/u/1562176?v=4","gravatar_id":"","url":"https://api.github.com/users/alena1108","html_url":"https://github.com/alena1108","followers_url":"https://api.github.com/users/alena1108/followers","following_url":"https://api.github.com/users/alena1108/following{/other_user}","gists_url":"https://api.github.com/users/alena1108/gists{/gist_id}","starred_url":"https://api.github.com/users/alena1108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena1108/subscriptions","organizations_url":"https://api.github.com/users/alena1108/orgs","repos_url":"https://api.github.com/users/alena1108/repos","events_url":"https://api.github.com/users/alena1108/events{/privacy}","received_events_url":"https://api.github.com/users/alena1108/received_events","type":"User","site_admin":false},"assignees":[{"login":"alena1108","id":1562176,"avatar_url":"https://avatars0.githubusercontent.com/u/1562176?v=4","gravatar_id":"","url":"https://api.github.com/users/alena1108","html_url":"https://github.com/alena1108","followers_url":"https://api.github.com/users/alena1108/followers","following_url":"https://api.github.com/users/alena1108/following{/other_user}","gists_url":"https://api.github.com/users/alena1108/gists{/gist_id}","starred_url":"https://api.github.com/users/alena1108/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alena1108/subscriptions","organizations_url":"https://api.github.com/users/alena1108/orgs","repos_url":"https://api.github.com/users/alena1108/repos","events_url":"https://api.github.com/users/alena1108/events{/privacy}","received_events_url":"https://api.github.com/users/alena1108/received_events","type":"User","site_admin":false},{"login":"StrongMonkey","id":9203378,"avatar_url":"https://avatars0.githubusercontent.com/u/9203378?v=4","gravatar_id":"","url":"https://api.github.com/users/StrongMonkey","html_url":"https://github.com/StrongMonkey","followers_url":"https://api.github.com/users/StrongMonkey/followers","following_url":"https://api.github.com/users/StrongMonkey/following{/other_user}","gists_url":"https://api.github.com/users/StrongMonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/StrongMonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StrongMonkey/subscriptions","organizations_url":"https://api.github.com/users/StrongMonkey/orgs","repos_url":"https://api.github.com/users/StrongMonkey/repos","events_url":"https://api.github.com/users/StrongMonkey/events{/privacy}","received_events_url":"https://api.github.com/users/StrongMonkey/received_events","type":"User","site_admin":false},{"login":"soumyalj","id":18536626,"avatar_url":"https://avatars1.githubusercontent.com/u/18536626?v=4","gravatar_id":"","url":"https://api.github.com/users/soumyalj","html_url":"https://github.com/soumyalj","followers_url":"https://api.github.com/users/soumyalj/followers","following_url":"https://api.github.com/users/soumyalj/following{/other_user}","gists_url":"https://api.github.com/users/soumyalj/gists{/gist_id}","starred_url":"https://api.github.com/users/soumyalj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soumyalj/subscriptions","organizations_url":"https://api.github.com/users/soumyalj/orgs","repos_url":"https://api.github.com/users/soumyalj/repos","events_url":"https://api.github.com/users/soumyalj/events{/privacy}","received_events_url":"https://api.github.com/users/soumyalj/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/rancher/rancher/milestones/101","html_url":"https://github.com/rancher/rancher/milestone/101","labels_url":"https://api.github.com/repos/rancher/rancher/milestones/101/labels","id":2557640,"number":101,"title":"July 2017","description":"","creator":{"login":"deniseschannon","id":11410997,"avatar_url":"https://avatars1.githubusercontent.com/u/11410997?v=4","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},"open_issues":13,"closed_issues":61,"state":"open","created_at":"2017-06-02T04:23:30Z","updated_at":"2017-07-28T22:13:17Z","due_on":"2017-07-31T07:00:00Z","closed_at":null},"comments":0,"created_at":"2017-07-27T22:52:30Z","updated_at":"2017-07-28T22:13:55Z","closed_at":null,"body":"**Rancher versions:**\r\nrancher/server:v1.6.6-rc4\r\n\r\n**Docker version: (`docker version`,`docker info` preferred)**1.12.6\r\n\r\n**Operating system and kernel: (`cat /etc/os-release`, `uname -r` preferred)**Ubuntu\r\n\r\n**Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)**GCE\r\n\r\n**Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)**Single node\r\n\r\n**Environment Template: (Cattle/Kubernetes/Swarm/Mesos)**Cattle\r\n\r\n**Steps to Reproduce:**\r\n1. Create a stack using CLI with secrets in long syntax as below. File secretvalue should contain the secret\r\n```\r\nversion: '2'\r\nservices:\r\n  test:\r\n    image: nginx\r\n    stdin_open: true\r\n    tty: true\r\n    secrets:\r\n      - source: mylongsecret\r\n        target: mylongsecretincontainer\r\n        uid: '104'\r\n        gid: '103'\r\n        mode: 444\r\nsecrets:\r\n  mylongsecret:\r\n    file: ./secretvalue\r\n```\r\nOR Precreate a secret in UI and use it in the yml file to create a new stack. Example below:\r\n```\r\nversion: '2'\r\nservices:\r\n  newtest:\r\n    image: nginx\r\n    stdin_open: true\r\n    tty: true\r\n    secrets:\r\n      - source: mysecret\r\n        target: mysecretincontainer\r\n        uid: '0'\r\n        gid: '0'\r\n        mode: 444\r\n        name: mysecret\r\n        secretId: 1\r\nsecrets:\r\n  mysecret:\r\n    external: true\r\n```\r\n\r\n2. After the stack creation succeeds,  create another stack using the exported config\r\nExported config below:\r\ndocker-compose.yml\r\n\r\n```\r\nversion: '2'\r\nservices:\r\n  test:\r\n    image: nginx\r\n    stdin_open: true\r\n    tty: true\r\n    secrets:\r\n    - mode: '444'\r\n      uid: '104'\r\n      gid: '103'\r\n      source: mylongsecret\r\n      target: mylongsecretincontainer\r\nsecrets:\r\n  mylongsecret:\r\n    external: 'true'\r\n```\r\nRancher-compose.yml\r\n```\r\nversion: '2'\r\nservices:\r\n  test:\r\n    scale: 1\r\n    start_on_create: true\r\n\r\n```\r\n3. Stack creation using the exported config fails. Logs from the server below:\r\n```\r\ntime=\"2017-07-27T22:46:08Z\" level=info msg=\"Starting rancher-compose-executor\" version=v0.14.12 \r\ntime=\"2017-07-27T22:46:09Z\" level=info msg=\"Initializing event router\" workerCount=250 \r\ntime=\"2017-07-27T22:46:09Z\" level=info msg=\"Connection established\" \r\ntime=\"2017-07-27T22:46:09Z\" level=info msg=\"Starting websocket pings\" \r\ntime=\"2017-07-27T22:47:21Z\" level=info msg=\"Stack Create Event Received\" eventId=8073c77e-f1a7-415e-973b-c4f69388bc39 resourceId=1st11 \r\npanic: interface conversion: interface {} is nil, not map[string]interface {}\r\n\r\ngoroutine 49 [running]:\r\ngithub.com/rancher/rancher-compose-executor/config.parseValidTypesFromSchema(0xc4204b0c90, 0xc42000a4c0, 0x15, 0x0, 0xc42000a4c0, 0x15)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/config/schema_helpers.go:72 +0x73e\r\ngithub.com/rancher/rancher-compose-executor/config.oneOfMessage(0xc4201a3950, 0xc4204b0c90, 0xd3dea0, 0xc42046cfc0, 0xd3d920, 0xc42046cf80, 0x0, 0x4f28bf)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/config/validation.go:162 +0x5d6\r\ngithub.com/rancher/rancher-compose-executor/config.generateErrorMessages(0xc4201a3950, 0xc4204b0c90, 0xc4204a9960, 0xc420101d90, 0xc4204a9960)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/config/validation.go:258 +0x1069\r\ngithub.com/rancher/rancher-compose-executor/config.validateV2(0xc4204b0b10, 0x0, 0xc4204b0c60)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/config/validation.go:222 +0x13f\r\ngithub.com/rancher/rancher-compose-executor/config.MergeServicesV2(0xc4204dede0, 0xd34420, 0xc42000c308, 0xd343e0, 0xd8b908, 0x0, 0x0, 0xc4204b0b10, 0xc, 0xc4204b0240, ...)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/config/merge_v2.go:13 +0x43\r\ngithub.com/rancher/rancher-compose-executor/config.Merge(0xc4204dede0, 0xd34420, 0xc42000c308, 0xd343e0, 0xd8b908, 0x0, 0x0, 0x0, 0x0, 0xc4204c9f20, ...)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/config/merge.go:167 +0x116b\r\ngithub.com/rancher/rancher-compose-executor/project.(*Project).load(0xc4201be2d0, 0x0, 0x0, 0xc4204d38c0, 0x102, 0x120, 0xc420014ba0, 0xc4204b01e0)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/project/project.go:166 +0x156\r\ngithub.com/rancher/rancher-compose-executor/project.(*Project).Parse(0xc4201be2d0, 0xc4201be2d0, 0x30)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/project/project.go:97 +0x15b\r\ngithub.com/rancher/rancher-compose-executor/rancher.NewProject(0xc4204dda00, 0xc4204b0060, 0xc420395a38, 0x2)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/rancher/project.go:35 +0x26d\r\ngithub.com/rancher/rancher-compose-executor/executor/handlers.constructProject(0xc4200185c0, 0xc42007c000, 0xc4201eff60, 0x1d, 0xc420016012, 0x14, 0xc420018092, 0x28, 0xc4204de5c0, 0xc4200c80c0, ...)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/executor/handlers/project.go:91 +0x4d2\r\ngithub.com/rancher/rancher-compose-executor/executor/handlers.createStack(0xc4200185c0, 0xc4204d9e10, 0xc4202fa000, 0x1, 0xc4204d52f0)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/executor/handlers/create_handler.go:46 +0x166\r\ngithub.com/rancher/rancher-compose-executor/executor/handlers.CreateStack(0xc4204d9e10, 0xc4202fa000, 0xc4204d0101, 0xc420045de8)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/executor/handlers/create_handler.go:22 +0x269\r\ngithub.com/rancher/rancher-compose-executor/executor/handlers.WithTimeout.func1(0xc4204d9e10, 0xc4202fa000, 0xc4204d5050, 0x2d)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/executor/handlers/common.go:54 +0x46\r\ngithub.com/rancher/rancher-compose-executor/vendor/github.com/rancher/event-subscriber/events.doWork(0xc4204d9e10, 0xc420355b00, 0xc4202fa000, 0xd31560, 0xc4204c87d0)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/vendor/github.com/rancher/event-subscriber/events/worker.go:94 +0x28d\r\ngithub.com/rancher/rancher-compose-executor/vendor/github.com/rancher/event-subscriber/events.(*skippingWorkerPool).HandleWork.func1(0xc42037b330, 0xe, 0xc4204d9e10, 0xc420355b00, 0xc4202fa000)\r\n\t/go/src/github.com/rancher/rancher-compose-executor/vendor/github.com/rancher/event-subscriber/events/worker.go:47 +0x9e\r\ncreated by github.com/rancher/rancher-compose-executor/vendor/github.com/rancher/event-subscriber/events.(*skippingWorkerPool).HandleWork\r\n\t/go/src/github.com/rancher/rancher-compose-executor/vendor/github.com/rancher/event-subscriber/events/worker.go:48 +0x18d\r\n\r\n\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rancher/rancher/issues/comments/318774292","html_url":"https://github.com/rancher/rancher/issues/9501#issuecomment-318774292","issue_url":"https://api.github.com/repos/rancher/rancher/issues/9501","id":318774292,"user":{"login":"deniseschannon","id":11410997,"avatar_url":"https://avatars1.githubusercontent.com/u/11410997?v=4","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":"2017-07-28T22:13:55Z","updated_at":"2017-07-28T22:13:55Z","body":"In master, but not RC5. It will be in RC6. "}}
{"actor":{"display_login":"deniseschannon"}}