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

Cannot build gce images #146

Open
favila opened this issue Jul 28, 2015 · 6 comments
Open

Cannot build gce images #146

favila opened this issue Jul 28, 2015 · 6 comments

Comments

@favila
Copy link

favila commented Jul 28, 2015

Using https://github.com/cloudius-systems/capstan-example-clojure as an example:

$ capstan build -p gce -v
Building capstan-example-clojure...
/build/buildd/qemu-2.1+dfsg/nbd.c:nbd_trip():L1150: From: 512, Len: 512, Size: 512, Offset: 0

/build/buildd/qemu-2.1+dfsg/nbd.c:nbd_trip():L1151: requested operation past EOF--bad client?
qemu-system-x86_64: -drive file=/home/favila/.capstan/repository/capstan-example-clojure/capstan-example-clojure.gce,if=none,id=hd0,aio=native,cache=none: could not open disk image /home/favila/.capstan/repository/capstan-example-clojure/capstan-example-clojure.gce: Could not read image for determining its format: Invalid argument
dial tcp 127.0.0.1:10000: connection refused
@favila
Copy link
Author

favila commented Jul 28, 2015

Looking into this a bit more, the .capstan/repository/cloudius/osv-openjdk/openjdk.gce file contains the text string gs://osv/v0.22/osv-openjdk.gce.tar.gz instead of a binary disk image. I'm not sure what this means.

@saturnism
Copy link

I'm having the same issue :(

$ capstan build -p gce
Building capstan-example-java...
Downloading cloudius/osv-openjdk/index.yaml...
169 B / 169 B [====================================================================================================================================] 100.00 % 
Downloading cloudius/osv-openjdk/osv-openjdk.gce.gz...
55 B / 55 B [======================================================================================================================================] 100.00 % 
WARNING: Image format was not specified for '/Users/rayt/.capstan/repository/capstan-example-java/capstan-example-java.gce' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
nbd.c:nbd_trip():L1303: From: 512, Len: 512, Size: 512, Offset: 0

nbd.c:nbd_trip():L1304: requested operation past EOF--bad client?

@penberg
Copy link
Contributor

penberg commented Oct 26, 2015

Ping @asias

@asias
Copy link
Contributor

asias commented Oct 26, 2015

The downloaded gce image file from capstan repo is not a normal image on
purpose.

It is an address for an image on google cloud storage, e.g., to same the
time to upload load image to gce.

gs://osv/v0.22/osv-openjdk.gce.tar.gz

Francis, capstan build with gce does not work. Can you try capstan build
with qemu?

On Wed, Jul 29, 2015 at 7:03 AM, Francis Avila [email protected]
wrote:

Looking into this a bit more, the
.capstan/repository/cloudius/osv-openjdk/openjdk.gce file contains the
text string gs://osv/v0.22/osv-openjdk.gce.tar.gz instead of a binary
disk image. I'm not sure what this means.


Reply to this email directly or view it on GitHub
#146 (comment)
.

Asias

@favila
Copy link
Author

favila commented Oct 26, 2015

Updated capstan using the prebuilt binary.

Qemu building works (and did before IIRC).

Building for gce errors out. It looks like some tool (qemu?) is confused that the image contains only a url (which is why I mentioned it earlier). I understand that this is how google compute images work, but the image itself needs to be built somewhere locally and it doesn't look like it is. Further, the capstan-example-clojure.gce image contains the url of the openjdk image (gs://osv/v0.23/osv-openjdk.gce.tar.gz) which can't be right.

New output below:

$ capstan -v
capstan version v0.1.8

$ capstan build -p gce -v
Building capstan-example-clojure...
Downloading cloudius/osv-openjdk/index.yaml...
169 B / 169 B [======================================================] 100.00 % 
Downloading cloudius/osv-openjdk/osv-openjdk.gce.gz...
55 B / 55 B [========================================================] 100.00 % 
WARNING: Image format was not specified for '/home/favila/.capstan/repository/capstan-example-clojure/capstan-example-clojure.gce' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
/build/qemu-5HduZn/qemu-2.3+dfsg/nbd.c:nbd_trip():L1246: From: 512, Len: 512, Size: 512, Offset: 0

/build/qemu-5HduZn/qemu-2.3+dfsg/nbd.c:nbd_trip():L1247: requested operation past EOF--bad client?

$ capstan build -p qemu -v
Building capstan-example-clojure...
Downloading cloudius/osv-openjdk/index.yaml...
169 B / 169 B [======================================================] 100.00 % 
Downloading cloudius/osv-openjdk/osv-openjdk.qemu.gz...
74.27 MB / 74.27 MB [================================================] 100.00 % 
OSv v0.23
eth0: 192.168.122.15
Waiting for connection from host...
Uploading files...
./target/capstan-example-clojure-0.1.0-SNAPSHOT-standalone.jar  --> /capstan-example-clojure.jar
Adding /capstan-example-clojure.jar...

$ capstan run capstan-example-clojure
Created instance: capstan-example-clojure
OSv v0.23
eth0: 192.168.122.15
Hello Clojure!

@saturnism
Copy link

yeah, i'm not quite sure how that works w/ the URL to the base image. It feels like it was downloaded but the final image doesn't get built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants