Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running rancher with compose: "usermod: UID '0' already exists" #1972

Closed
andrefreitas opened this issue Sep 4, 2015 · 2 comments
Closed
Assignees
Labels
area/packaging kind/bug Issues that are defects reported by users or that we know have reached a real release

Comments

@andrefreitas
Copy link

I am using docker-compose to launch rancher and a data only container for persisting data and to make upgrades easier. I have managed to run rancher server successfully many times but today is randomly not working. Even if I run without the data only container, I get the same error. I am missing something?

docker-compose.yml

rancher_data:
  container_name: rancher_data
  image: ubuntu
  volumes:
    - /var/lib/mysql

rancher:
  container_name: rancher_server
  image: rancher/server
  ports:
    - "8080:8080"
  volumes_from:
    - rancher_data
  restart: always

error

  docker-compose up
Creating rancher_data...
Creating rancher_server...
Attaching to rancher_data, rancher_server
rancher_1      | Running in VBox change mysql UID
rancher_1      | usermod: UID '0' already exists
rancher_server exited with code 0
Gracefully stopping... (press Ctrl+C again to force)
Stopping rancher_server... done
@deniseschannon deniseschannon added area/rancher-compose kind/bug Issues that are defects reported by users or that we know have reached a real release area/packaging and removed area/rancher-compose labels Sep 9, 2015
@deniseschannon deniseschannon added this to the Milestone 9/16/2015 milestone Sep 9, 2015
@cloudnautique
Copy link
Contributor

Sorry, this is a bug. We need to add an additional check in there to not switch over to UID 0.

When we added bind mounting for the MySQL directory we needed to handle mounts from VBox where the userid is set in the mount. It looks like if you are not using a bind mount from the Mac it is still trying to set it to the Userid, and failing.

As a workaround, instead of using Ubuntu use the rancher/server container. It already exports the /var/lib/mysql directory with the correct userid. So something like:

rancher_data:
  container_name: rancher_data
  image: rancher/server:v0.35.0
...

@deniseschannon
Copy link

Verified using v0.37.0-rc2.

@andrefreitas This will be in the next release. We recommend waiting until we get an official release. The tags that include "rc" are release candidates that are undergoing testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging kind/bug Issues that are defects reported by users or that we know have reached a real release
Projects
None yet
Development

No branches or pull requests

3 participants