solo-io / unik

The Unikernel & MicroVM Compilation and Deployment Platform
Apache License 2.0
2.72k stars 191 forks source link

vSphere provider error #106

Closed getstek closed 8 years ago

getstek commented 8 years ago

I am trying to use the Java example test app provided with this repo to deploy a Unik service, the syntax I am using is:

unik build --name myImage --path ./ --base osv --language java --provider vsphere

INFO[0000] running unik build                            args= base=osv force=false host=localhost:3000 language=java mountPoints=[] name=myImage path=./ provider=vsphere
INFO[0000] App packaged as tarball: /tmp/sources.tar.gz.509304718

ERRO[0000] build failed: [cmd/build.go:105] building image failed: {[client/images.go:63] failed with status 400: [daemon/daemon.go:481] invalid base - lang - provider match: {[compilers/names.go:160] provider vsphere not supported for unikernel runtime osv-java, available providers: xen | aws | virtualbox | vmware | qemu | openstack}}

unik build --name myImage --path ./ --base osv --language java --provider vmware

INFO[0000] running unik build                            args= base=osv force=false host=localhost:3000 language=java mountPoints=[] name=myImage path=./ provider=vmware
INFO[0000] App packaged as tarball: /tmp/sources.tar.gz.109940838

ERRO[0000] build failed: [cmd/build.go:105] building image failed: {[client/images.go:63] failed with status 400: [daemon/daemon.go:468] vmware is not a known provider. Available: vsphere}

Notice how when I specify vSphere as the provider it tells me to use VMware, and vice versa if VMware is specified then vSphere is said to be the correct option. I am very confused, which option should I be using?

On the daemon side I see the following:


DEBU[11044] Started POST /images/myImage/create for 127.0.0.1:37166
DEBU[11044] parsing multipart form                        req=&{Method:POST URL:/images/myImage/create?mounts=&force=false&no_cleanup=false&base=osv&lang=java&provider=vmware&args= Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Accept-Encoding:[gzip] User-Agent:[Go-http-client/1.1] Content-Length:[20744] Content-Type:[multipart/form-data; boundary=93df53277b110aae6ac3898bab5a49cfc36401e204f08c0b740260714c40]] Body:0xc8203d3d80 ContentLength:20744 TransferEncoding:[] Close:false Host:localhost:3000 Form:map[mounts:[] force:[false] no_cleanup:[false] base:[osv] lang:[java] provider:[vmware] args:[]] PostForm:map[] MultipartForm:0xc8202c9590 Trailer:map[] RemoteAddr:127.0.0.1:37166 RequestURI:/images/myImage/create?mounts=&force=false&no_cleanup=false&base=osv&lang=java&provider=vmware&args= TLS:<nil> Cancel:<nil>}
DEBU[11044] parsing form file marked 'tarfile'            form=map[lang:[java] provider:[vmware] args:[] mounts:[] force:[false] no_cleanup:[false] base:[osv]]
DEBU[11044] extracting uploaded files to /tmp/unpacked.sources.dir.885475100
DEBU[11044] Extracting file                               file=./
DEBU[11044] Extracting file                               file=./.gitignore
DEBU[11044] Extracting file                               file=./manifest.yaml
DEBU[11044] Extracting file                               file=./pom.xml
DEBU[11044] Extracting file                               file=./src/
DEBU[11044] Extracting file                               file=./src/main/
DEBU[11044] Extracting file                               file=./src/main/java/
DEBU[11044] Extracting file                               file=./src/main/java/com/
DEBU[11044] Extracting file                               file=./src/main/java/com/emc/
DEBU[11044] Extracting file                               file=./src/main/java/com/emc/testapp/
DEBU[11044] Extracting file                               file=./src/main/java/com/emc/testapp/App.java
DEBU[11044] Extracting file                               file=./src/test/
DEBU[11044] Extracting file                               file=./src/test/java/
DEBU[11044] Extracting file                               file=./src/test/java/com/
DEBU[11044] Extracting file                               file=./src/test/java/com/emc/
DEBU[11044] Extracting file                               file=./src/test/java/com/emc/testapp/
DEBU[11044] Extracting file                               file=./src/test/java/com/emc/testapp/AppTest.java
ERRO[11044] error handling request                        error=[daemon/daemon.go:468] vmware is not a known provider. Available: vsphere
DEBU[11044] Completed 400 Bad Request in 6.524559ms

DEBU[11047] Started POST /images/myImage/create for 127.0.0.1:37192
DEBU[11047] parsing multipart form                        req=&{Method:POST URL:/images/myImage/create?provider=vsphere&args=&mounts=&force=false&no_cleanup=false&base=osv&lang=java Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[Accept-Encoding:[gzip] User-Agent:[Go-http-client/1.1] Content-Length:[20744] Content-Type:[multipart/form-data; boundary=601f56b9849d1ccdee3dcc3398d0d52c43aa6b3e455a828c12261b99c79d]] Body:0xc820273740 ContentLength:20744 TransferEncoding:[] Close:false Host:localhost:3000 Form:map[provider:[vsphere] args:[] mounts:[] force:[false] no_cleanup:[false] base:[osv] lang:[java]] PostForm:map[] MultipartForm:0xc8200c9650 Trailer:map[] RemoteAddr:127.0.0.1:37192 RequestURI:/images/myImage/create?provider=vsphere&args=&mounts=&force=false&no_cleanup=false&base=osv&lang=java TLS:<nil> Cancel:<nil>}
DEBU[11047] parsing form file marked 'tarfile'            form=map[base:[osv] lang:[java] provider:[vsphere] args:[] mounts:[] force:[false] no_cleanup:[false]]
DEBU[11047] extracting uploaded files to /tmp/unpacked.sources.dir.166223022
DEBU[11047] Extracting file                               file=./
DEBU[11047] Extracting file                               file=./.gitignore
DEBU[11047] Extracting file                               file=./manifest.yaml
DEBU[11047] Extracting file                               file=./pom.xml
DEBU[11047] Extracting file                               file=./src/
DEBU[11047] Extracting file                               file=./src/main/
DEBU[11047] Extracting file                               file=./src/main/java/
DEBU[11047] Extracting file                               file=./src/main/java/com/
DEBU[11047] Extracting file                               file=./src/main/java/com/emc/
DEBU[11047] Extracting file                               file=./src/main/java/com/emc/testapp/
DEBU[11047] Extracting file                               file=./src/main/java/com/emc/testapp/App.java
DEBU[11047] Extracting file                               file=./src/test/
DEBU[11047] Extracting file                               file=./src/test/java/
DEBU[11047] Extracting file                               file=./src/test/java/com/
DEBU[11047] Extracting file                               file=./src/test/java/com/emc/
DEBU[11047] Extracting file                               file=./src/test/java/com/emc/testapp/
DEBU[11047] Extracting file                               file=./src/test/java/com/emc/testapp/AppTest.java
ERRO[11047] error handling request                        error=[daemon/daemon.go:481] invalid base - lang - provider match: {[compilers/names.go:160] provider vsphere not supported for unikernel runtime osv-java, available providers: openstack | xen | aws | virtualbox | vmware | qemu}
DEBU[11047] Completed 400 Bad Request in 4.039091ms

DEBU[11049] running command                               command=[govc vm.info -k -u https://stkn_admin%40xxx:*************@192.168.120.20/sdk --json --vm.uuid=42317a17-c4ad-4599-7e77-b6413ee00103]

I've checked names.go and it seems my syntax and provider options are correct.

Any thoughts?

ilackarms commented 8 years ago

this is a real bug; missed some necessary string changes when we updated a while back. --provider=vsphere should work now