{"action":"opened","issue":{"url":"https://api.github.com/repos/dokku/dokku/issues/2829","repository_url":"https://api.github.com/repos/dokku/dokku","labels_url":"https://api.github.com/repos/dokku/dokku/issues/2829/labels{/name}","comments_url":"https://api.github.com/repos/dokku/dokku/issues/2829/comments","events_url":"https://api.github.com/repos/dokku/dokku/issues/2829/events","html_url":"https://github.com/dokku/dokku/issues/2829","id":240229094,"number":2829,"title":"Container IP addresses / virtual hosts got mixed up","user":{"login":"n2liquid","id":150153,"avatar_url":"https://avatars2.githubusercontent.com/u/150153?v=3","gravatar_id":"","url":"https://api.github.com/users/n2liquid","html_url":"https://github.com/n2liquid","followers_url":"https://api.github.com/users/n2liquid/followers","following_url":"https://api.github.com/users/n2liquid/following{/other_user}","gists_url":"https://api.github.com/users/n2liquid/gists{/gist_id}","starred_url":"https://api.github.com/users/n2liquid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n2liquid/subscriptions","organizations_url":"https://api.github.com/users/n2liquid/orgs","repos_url":"https://api.github.com/users/n2liquid/repos","events_url":"https://api.github.com/users/n2liquid/events{/privacy}","received_events_url":"https://api.github.com/users/n2liquid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-03T17:19:54Z","updated_at":"2017-07-03T17:19:54Z","closed_at":null,"body":"Description of problem:\r\n\r\n2 container IPs were mixed up. We've deployed 2 completely different applications and noticed the next day that internally, their IP addresses were mixed up.\r\n\r\nCalling `docker logs` with the application names showed logs appropriate to each application, but their `IP.web.1` files had the wrong IP addresses. Application A's `IP.web.1` pointed to application B's IP address, and vice-versa. I've noticed that by calling curl on the host machine with the IPs written to those files.\r\n\r\nOutput of the following commands\r\n\r\n```\r\n$ dokku report       \r\n-----> uname: Linux app-host-1.internal 4.4.0-1022-aws #31-Ubuntu SMP Tue Jun 27 11:27:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux\r\n-----> memory:                                                \r\n              total        used        free      shared  buff/cache   available\r\nMem:           7982         810        5635          82        1535        6697\r\nSwap:             0           0           0\r\n-----> docker version:\r\nClient:\r\n Version:      17.05.0-ce\r\n API version:  1.29\r\n Go version:   go1.7.5\r\n Git commit:   89658be\r\n Built:        Thu May  4 22:10:54 2017\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      17.05.0-ce\r\n API version:  1.29 (minimum version 1.12)\r\n Go version:   go1.7.5\r\n Git commit:   89658be\r\n Built:        Thu May  4 22:10:54 2017\r\n OS/Arch:      linux/amd64\r\n Experimental: false\r\n-----> docker daemon info:\r\nContainers: 5\r\n Running: 4\r\n Paused: 0\r\n Stopped: 1                                                    \r\nImages: 70                                                   \r\nServer Version: 17.05.0-ce                                    \r\nStorage Driver: aufs                                                      \r\n Root Dir: /var/lib/docker/aufs                                       \r\n Backing Filesystem: extfs                                                                                  \r\n Dirs: 110                                                                                                   \r\n Dirperm1 Supported: true                                   \r\nLogging Driver: json-file                                     \r\nCgroup Driver: cgroupfs                                        \r\nPlugins:                                                          \r\n Volume: local                                                                                                                   \r\n Network: bridge host macvlan null overlay                    \r\nSwarm: inactive                                                                \r\nRuntimes: runc                                                                 \r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 9048e5e50717ea4497b757314bad98ea3763c145\r\nrunc version: 9c2d8d184e5da67c95d601382adf14862e4f2228\r\ninit version: 949e6fa\r\nSecurity Options:\r\n apparmor\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.4.0-1022-aws\r\nOperating System: Ubuntu 16.04.2 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 2\r\nTotal Memory: 7.795GiB\r\nName: app-host-1.internal\r\nID: USNB:2CFP:HJAE:JLQJ:NA6C:VSWM:7B6I:7FAC:UFYT:MFT6:7Q4N:VXKO\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): true\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nExperimental: false\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n\r\nWARNING: No swap limit support\r\n-----> sigil version: 0.4.0\r\n-----> herokuish version:\r\nherokuish: 0.3.29\r\nbuildpacks:\r\n  heroku-buildpack-multi     v1.0.0\r\n  heroku-buildpack-ruby      v159\r\n  heroku-buildpack-nodejs    v99\r\n  heroku-buildpack-clojure   v76\r\n  heroku-buildpack-python    v99\r\n  heroku-buildpack-java      v51\r\n  heroku-buildpack-gradle    v21\r\n  heroku-buildpack-grails    v21\r\n  heroku-buildpack-scala     v76\r\n  heroku-buildpack-play      v26\r\n  heroku-buildpack-php       v121\r\n  heroku-buildpack-go        v64\r\n  heroku-buildpack-erlang    fa17af9\r\n  buildpack-nginx            v8\r\n-----> dokku version: 0.9.4\r\n-----> dokku plugins:\r\n !     Deprecated: Please use plugin:list\r\nplugn: 0.3.0\r\n  00_dokku-standard    0.9.4 enabled    dokku core standard plugin\r\n  20_events            0.9.4 enabled    dokku core events logging plugin\r\n  apps                 0.9.4 enabled    dokku core apps plugin\r\n  build-env            0.9.4 enabled    dokku core build-env plugin\r\n  certs                0.9.4 enabled    dokku core certificate management plugin\r\n  checks               0.9.4 enabled    dokku core checks plugin\r\n  common               0.9.4 enabled    dokku core common plugin\r\n  config               0.9.4 enabled    dokku core config plugin\r\n  docker-options       0.9.4 enabled    dokku core docker-options plugin\r\n  domains              0.9.4 enabled    dokku core domains plugin\r\n  enter                0.9.4 enabled    dokku core enter plugin\r\n  git                  0.9.4 enabled    dokku core git plugin\r\n  logs                 0.9.4 enabled    dokku core logs plugin\r\n  named-containers     0.9.4 enabled    dokku core named containers plugin\r\n  nginx-vhosts         0.9.4 enabled    dokku core nginx-vhosts plugin\r\n  plugin               0.9.4 enabled    dokku core plugin plugin\r\n  proxy                0.9.4 enabled    dokku core proxy plugin\r\n  ps                   0.9.4 enabled    dokku core ps plugin\r\n  repo                 0.9.4 enabled    dokku core repo plugin\r\n  shell                0.9.4 enabled    dokku core shell plugin\r\n  ssh-keys             0.9.4 enabled    dokku core ssh-keys plugin\r\n  storage              0.9.4 enabled    dokku core storage plugin\r\n  tags                 0.9.4 enabled    dokku core tags plugin\r\n  tar                  0.9.4 enabled    dokku core tar plugin\r\n```\r\n\r\nDockerfiles of mixed up applications:\r\n\r\n```\r\nFROM ruby:2.3.0\r\n\r\nRUN curl -sL https://deb.nodesource.com/setup_4.x | sh\r\nRUN apt-get install -y nodejs\r\nRUN npm install -g bower\r\n\r\nRUN mkdir -p /usr/src/app\r\nWORKDIR /usr/src/app\r\n\r\nCOPY Gemfile /usr/src/app/Gemfile\r\nCOPY Gemfile.lock /usr/src/app/Gemfile.lock\r\nRUN bundle install --without development test\r\n\r\nCOPY . /usr/src/app\r\n\r\nEXPOSE 80\r\nENV PORT 80\r\nENV RAILS_ENV production\r\n\r\nRUN bower install --production --save-exact --allow-root\r\nRUN rake assets:precompile\r\n\r\nCMD rails server -p $PORT -b 0.0.0.0\r\n```\r\n\r\n```\r\nFROM node:7.10.0\r\n\r\nENV NODE_ENV production\r\n\r\nRUN mkdir -p /usr/src/app\r\nWORKDIR /usr/src/app\r\n\r\nCOPY package.json /usr/src/app/package.json\r\nRUN yarn global add node-gyp\r\nCOPY yarn.lock /usr/src/app/yarn.lock\r\nRUN yarn install --production && yarn check --verify-tree --production\r\nCOPY . /usr/src/app\r\n\r\nEXPOSE 80\r\nENV PORT 80\r\n\r\nCMD npm start\r\n```\r\n\r\nEnvironment details (AWS, VirtualBox, physical, etc.): AWS EC2 (t2.large).\r\n\r\nHow was Dokku installed?:\r\n\r\n```\r\nwget https://raw.githubusercontent.com/dokku/dokku/v0.9.4/bootstrap.sh;\r\nsudo DOKKU_TAG=v0.9.4 bash bootstrap.sh\r\n```\r\n\r\nHow reproducible:\r\n\r\nIt has happened just once and we're not sure how to reproduce it. The only particular is that the last deployment we made, we pushed both apps at once (from separate repositores, separate shells, but we ran `git push` more or less at the same time).\r\n\r\nSteps to Reproduce:\r\n\r\nNot sure.\r\n\r\nActual Results:\r\n\r\n`IP.web.1` for both deployed applications had the IPs of the other app's container and vice-versa. This has affected virtual host configurations and the applications were accessible from the wrong URLs (also mixed up).\r\n\r\nExpected Results:\r\n\r\nIP addresses / virtual hosts should never be mixed up.\r\n\r\nAdditional info:\r\n\r\nPlease let me know if there's any further information I could provide to make the problem more clear."}}
{"actor":{"display_login":"n2liquid"}}