shifter icon indicating copy to clipboard operation
shifter copied to clipboard

Shifterimg expire appears to not work for docker user registry or private registries

Open alanm-cray opened this issue 7 years ago • 3 comments

We are unable to use the expire action on images pulled from registries other than docker hub: opal-p2:~ # shifterimg lookup alanmutsch/go-app:latest d5c5cbb38fb39a009da8cd1a6ef40e36348a4956b617fa4a79e7fb5fb60c63c1 opal-p2:~ # shifterimg expire alanmutsch/go-app:latest opal-p2:~ # echo $? 1 opal-p2:~ # shifterimg lookup alanmutsch/go-app:latest d5c5cbb38fb39a009da8cd1a6ef40e36348a4956b617fa4a79e7fb5fb60c63c1 Jun 20 10:32:13 opal-p2 gunicorn[10564]: WARNING:shifter_imagegw.api:404 return

orion:~ # shifterimg lookup ostesthub.us.cray.com/hello-cray:latest d6870e990bf7c8fd38881920c24eff92df8c1e400723082b4af62976fbd9b7d4 orion:~ # shifterimg expire ostesthub.us.cray.com/hello-cray:latest orion:~ # echo $? 1 orion:~ # shifterimg lookup ostesthub.us.cray.com/hello-cray:latest d6870e990bf7c8fd38881920c24eff92df8c1e400723082b4af62976fbd9b7d4 Jun 20 10:34:28 orion gunicorn[17095]: WARNING:shifter_imagegw.api:404 return

opal-p2:~ # shifterimg lookup haskell:7 fd8214a76e66983a9f9d6a64463c44ccdfaf63fa520570e0ab4d9d4dd6e20bb2 opal-p2:~ # shifterimg expire haskell:7 opal-p2:~ # echo $? 0 opal-p2:~ # shifterimg lookup haskell:7 opal-p2:~ # echo $? 1 Jun 20 10:38:32 opal-p2 gunicorn[10564]: INFO:shifter_imagegw.api:user root is an admin Jun 20 10:38:32 opal-p2 gunicorn[10564]: INFO:shifter_imagegw.api:expire request queued s=opal-p2 t=haskell:7

Removing these images involve manually removing entries from mongo and removing the cache and UDI layers.

alanm-cray avatar Jun 20 '17 15:06 alanm-cray

I guess it is the slash that causes this bug, which may be fixed by modifying the imagegw/shifter_imagegw/api.py.

refer: http://flask.pocoo.org/snippets/76/

edit: Well, I notice that it has been fixed in the master branch. Maybe you can try to build from the git repo, or wait for the next release.

kyechou avatar Jul 30 '17 16:07 kyechou

given one builds from the current master branch will it be possible to pull private images from docker hub and from private registries? (I've seen that the shifterimg-beta seems to be implemented at NERSC)

jorgeboucas avatar Jan 13 '18 20:01 jorgeboucas

Yes. We are working on a release that will provide full support for this. Hopefully out very soon.

scanon avatar Mar 28 '18 05:03 scanon