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

Che container creates folders with projects in /data on host machine #3324

Closed
garagatyi opened this issue Dec 8, 2016 · 10 comments
Closed
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Milestone

Comments

@garagatyi
Copy link

Che CLI in docker container creates /data folder on host and writes projects there.

Che version: 5.0.0-M9-SNAPSHOT
OS and version: Ubuntu 16.04
Docker version: 1.12
Che install: Docker container

@garagatyi garagatyi added the kind/bug Outline of a bug - must adhere to the bug report template. label Dec 8, 2016
@benoitf
Copy link
Contributor

benoitf commented Dec 8, 2016

@garagatyi with image from master branch ?

@garagatyi
Copy link
Author

Yes

@TylerJewell
Copy link

Post command line. We made changes in the cli-improvements branch to change :/che volume mount to now be :/data, but it's only in the branch.

@garagatyi
Copy link
Author

I tried commands I listed below and I can reproduce it:

✔  15:52 ~/workspace/.che $ docker pull eclipse/che-cli:nightly 
nightly: Pulling from eclipse/che-cli
Digest: sha256:d674cebdca3095240f74606d89f75b7e254956a74dc41edf3a08042076891a8e
Status: Image is up to date for eclipse/che-cli:nightly
✔  15:52 ~/workspace/.che $ docker pull eclipse/che-cli:nightly ^C
✔  15:52 ~/workspace/.che $ ./che.sh --nd start --pull
INFO: (che cli): Loading cli...
INFO: (che cli): Checking registry for version 'nightly' images
INFO: (che download): Pulling image puppet/puppet-agent-alpine:4.6.2

4.6.2: Pulling from puppet/puppet-agent-alpine
Digest: sha256:bf93e9f1a92b692efeb3138d25444c478093b6e18818f4242ffc723b04fc6a57
Status: Image is up to date for puppet/puppet-agent-alpine:4.6.2

INFO: (che download): Pulling image registry:2.5.0

2.5.0: Pulling from library/registry
Digest: sha256:1b68f0d54837c356e353efb04472bc0c9a60ae1c8178c9ce076b01d2930bcc5d
Status: Image is up to date for registry:2.5.0

INFO: (che download): Pulling image eclipse/che-init:nightly

nightly: Pulling from eclipse/che-init
Digest: sha256:4f1a8696a0ca8984663d65c13d5bcfbf8b4d47a2fcbfd2d8ee5b09fcc0c8895b
Status: Image is up to date for eclipse/che-init:nightly

INFO: (che download): Pulling image eclipse/che-server:nightly

nightly: Pulling from eclipse/che-server
Digest: sha256:c8efcdec62994081060502f7a9e74f049b57fed96df77772d89e72263a944079
Status: Image is up to date for eclipse/che-server:nightly

INFO: (che config): Generating che configuration...
INFO: (che config): Customizing docker-compose for running in a container
INFO: (che start): Preflight checks
         port 8080 (http):       [AVAILABLE] 

INFO: (che start): Starting containers...
INFO: (che start): Services booting...
INFO: (che start): Server logs at "docker logs -f che"
INFO: (che start): Booted and reachable
INFO: (che start): Ver: nightly
INFO: (che start): Use: http://172.17.0.1:8080
INFO: (che start): API: http://172.17.0.1:8080/swagger

@TylerJewell
Copy link

I do not know what is ./che.sh --nd start --pull. Also, post the cli.log.

@garagatyi
Copy link
Author

Sorry - it is my shortcut

@TylerJewell
Copy link

Ok - issue reproduced. Not a CLI issue. It's an issue with the che-server Docker container. The embedded the che.properties must be getting set a value that is a host path, and not the container path.

@TylerJewell TylerJewell added level/intermediate severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. labels Dec 8, 2016
@TylerJewell TylerJewell changed the title Che Docker CLI creates folders with projects in /data on host machine Che container creates folders with projects in /data on host machine Dec 8, 2016
@benoitf
Copy link
Contributor

benoitf commented Dec 8, 2016

I've started a ubuntu vm. (we can't reproduce on mac or windows)
Here is what is happening

docker.sh script is doing
https://github.com/eclipse/che/blob/master/assembly/assembly-main/src/assembly/bin/docker.sh#L108

  DEFAULT_CHE_IN_VM=$(is_in_vm)
  export CHE_IN_VM=${CHE_IN_VM:-${DEFAULT_CHE_IN_VM}}

is_in_vm check if we're using docker4mac, boot2docker, etc and then set
https://github.com/eclipse/che/blob/master/assembly/assembly-main/src/assembly/bin/docker.sh#L120-L121

export CHE_WORKSPACE_STORAGE="${CHE_DATA_HOST}/workspaces"
export CHE_WORKSPACE_STORAGE_CREATE_FOLDERS=false

but on Linux, it goes with "native" then these properties are not set then it takes default values

but it takes what is done at line https://github.com/eclipse/che/blob/master/assembly/assembly-main/src/assembly/bin/docker.sh#L98

sed -i "/che.workspace.storage=/c\che.workspace.storage=/data/workspaces" $CHE_LOCAL_CONF_DIR/che.properties

@benoitf benoitf added sprint/current status/in-progress This issue has been taken by an engineer and is under active development. labels Dec 9, 2016
@benoitf benoitf added status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. and removed sprint/current status/in-progress This issue has been taken by an engineer and is under active development. labels Dec 9, 2016
@benoitf
Copy link
Contributor

benoitf commented Dec 9, 2016

fix is part of #3318

@benoitf benoitf added this to the 5.0.0-M9 milestone Dec 9, 2016
@benoitf benoitf removed the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Dec 13, 2016
@benoitf
Copy link
Contributor

benoitf commented Dec 13, 2016

solved by #3318
if the problem is still there on your side, please reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code.
Projects
None yet
Development

No branches or pull requests

3 participants