Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

"actool discover" accepts non existing images #592

Open
alban opened this issue Apr 7, 2016 · 2 comments · May be fixed by #594
Open

"actool discover" accepts non existing images #592

alban opened this issue Apr 7, 2016 · 2 comments · May be fixed by #594

Comments

@alban
Copy link
Member

alban commented Apr 7, 2016

The image "coreos.com/etcd-etcd-etcd-etcd:v2.0.10" is not supposed to exist, but actool discover finds it anyway by truncating the name:

$ actool discover coreos.com/etcd-etcd-etcd-etcd:v2.0.10
discover walk: prefix: coreos.com/etcd-etcd-etcd-etcd error: expected a 200 OK got 403
ACI: https://github.com/coreos/etcd/releases/download/v2.0.10/etcd-v2.0.10-linux-amd64.aci, ASC: https://github.com/coreos/etcd/releases/download/v2.0.10/etcd-v2.0.10-linux-amd64.aci.asc
Keys: https://coreos.com/dist/pubkeys/aci-pubkeys.gpg,https://coreos.com/dist/pubkeys/app-signing-pubkey.gpg

As a consequence, rkt can run it:

$ sudo rkt run --insecure-options=image coreos.com/etcd-etcd-etcd-etcd:v2.0.10
image: using image from local store for image name coreos.com/rkt/stage1-coreos:1.3.0
image: searching for app image coreos.com/etcd-etcd-etcd-etcd
image: remote fetching from URL "https://github.com/coreos/etcd/releases/download/v2.0.10/etcd-v2.0.10-linux-amd64.aci"
Downloading ACI: [=============================================] 3.79 MB/3.79 MB
networking: loading networks from /etc/rkt/net.d
networking: overriding "default" network with long.conf
networking: loading network default with type ptp
[334210.278023] etcd[4]: 2016/04/07 13:46:21 etcd: no data-dir provided, using default data-dir ./default.etcd
alban added a commit to kinvolk-archives/appc-spec that referenced this issue Apr 8, 2016
The following meta:
  <meta name="ac-discovery" content="coreos.com/etcd https://github.com/coreos/etcd/releases/download/{version}/etcd-{version}-{os}-{arch}.{ext}">

Should make the following discoverable:
  actool discover coreos.com/etcd/fdfdsffds:v2.0.10
  actool discover coreos.com/etcd:v2.0.10

But not the following:
  actool discover coreos.com/etcdxxxxxxx:v2.0.10

This is now fixed by checking the character '/' in addition to
HasPrefix.

Fixes appc#592
@alban alban linked a pull request Apr 8, 2016 that will close this issue
@jonboulle
Copy link
Contributor

@alban what happens without --insecure-options=image?

@alban
Copy link
Member Author

alban commented Apr 12, 2016

@jonboulle it gives the following error:

Downloading ACI: [=============================================] 3.79 MB/3.79 MB
run: 
  └─error when reading the app name: "coreos.com/etcd-etcd-etcd-etcd" expected but "coreos.com/etcd" found

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

Successfully merging a pull request may close this issue.

2 participants