intel / ccloudvm

Configurable Cloud VM is a small command line tool for automatically creating development and demo environments for complex projects. The tool sets up these development environments inside a virtual machine which it automatically creates on the user’s host computer. This avoids polluting the user’s host machine with components from the chosen development environment and provides a clean, predictable and repeatable environment in which this development environment can run.
Apache License 2.0
32 stars 19 forks source link

GOPATH in ccloudvm setup does not appear to match actual value #87

Closed jdandrea closed 6 years ago

jdandrea commented 6 years ago

Environment vars:

export PATH=$PATH:/usr/local/go/bin:/home/ciao/go/bin
export GOPATH=/home/ciao/go
export GOROOT=/usr/local/go

Then (after ccloudvm setup under a non-root account):

jdandrea@myhost:~/ciao$ echo $GOPATH $GOROOT
/home/ciao/go /usr/local/go
jdandrea@myhost:~/ciao$ ccloudvm create --name singlevm --port 8080-80 --debug ciao
Error: Unable to locate ccloudvm workload directory: cannot find package "github.com/intel/ccloudvm" in any of:
    /usr/local/go/src/github.com/intel/ccloudvm (from $GOROOT)
    /home/jdandrea/go/src/github.com/intel/ccloudvm (from $GOPATH)

Done.

But the GOPATH noted in the error does not match the GOPATH that's actually set.

ganeshmaharaj commented 6 years ago

@jdandrea Thanks for opening this issue.

@markdryan : @mcastelino and I noticed this yesterday and i was gonna dig into it. Will see if i can find some cycles to look into this soon. Seems like the workload search path is assumed to be HOME always against GoPATH.

jdandrea commented 6 years ago

@ganeshmaharaj: You're welcome!

For a workaround, I'm just moving the local go directory under jdandrea and adjusting env vars. So far, so good. :)

ganeshmaharaj commented 6 years ago

Yeah, that or symlinking will work as a good workaround for now. But should be a straight fix for this.

markdryan commented 6 years ago

@ganeshmaharaj, @jdandrea PR#90 should fix the issue. @ganeshmaharaj could you test?