quay / quayctl

quayctl is a command-line client for Quay
Apache License 2.0
91 stars 17 forks source link

rkt pull: invalid image string #59

Open peebs opened 7 years ago

peebs commented 7 years ago

Running CoreOS 1298.7.0 with rkt 1.21.0 and I try a rkt torrent pull on hyperkube I get:

sudo ./quayctl rkt torrent pull quay.io/coreos/hyperkube:v1.6.0_coreos.0
2017/04/10 22:19:14 Discovering image quay.io/coreos/hyperkube:v1.6.0_coreos.0
2017/04/10 22:19:14 Downloading torrent for image quay.io/coreos/hyperkube:v1.6.0_coreos.0
quay.io/coreos/hype Completed                                                   
2017/04/10 22:19:39 Downloading signature for image quay.io/coreos/hyperkube:v1.6.0_coreos.0
2017/04/10 22:19:39 Loading image quay.io/coreos/hyperkube:v1.6.0_coreos.0
fetch: invalid image string "file:///tmp/quayctl/torrents/b92f739992b46ccb3b48ecc73f0cd63d62b73e69259e4a589b3c90c1bad748bc"
2017/04/10 22:19:39 Could not load image quay.io/coreos/hyperkube:v1.6.0_coreos.0 into rkt: exit status 254

Works with docker on the same machine.

Looking at some some tests in rkt I suspect the file just needs a .aci extension.

rkt fetch failing by fetching file directly

$ sudo rkt fetch file:///tmp/quayctl/torrents/b92f739992b46ccb3b48ecc73f0cd63d62b73e69259e4a589b3c90c1bad748bc
fetch: invalid image string "file:///tmp/quayctl/torrents/b92f739992b46ccb3b48ecc73f0cd63d62b73e69259e4a589b3c90c1bad748bc"

make the file an aci

$ mv /tmp/quayctl/torrents/b92f739992b46ccb3b48ecc73f0cd63d62b73e69259e4a589b3c90c1bad748bc /tmp/quayctl/torrents/b92f739992b46ccb3b48ecc73f0cd63d62b73e69259e4a589b3c90c1bad748bc.aci

then

sudo rkt fetch file:///tmp/quayctl/torrents/b92f739992b46ccb3b48ecc73f0cd63d62b73e69259e4a589b3c90c1bad748bc.aci --insecure-options=image
sha512-c08555c700e23912225ba45faa569299

Fetch works!

georgettica commented 2 years ago

Seems this solution is fairly easy to change.. maybe validate the extension is aci?

georgettica commented 2 years ago

Or link to a rkt issue on this