Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

storage driver for local is now called file #442

Closed
wants to merge 1 commit into from
Closed

storage driver for local is now called file #442

wants to merge 1 commit into from

Conversation

paulczar
Copy link

using glance it failed out because it was looking for a local driver.

Appears that this is now called file and changing that appears to get me working.

Attempting to keep backwards compat by aliasing local to file.

using `glance` it failed out because it was looking for a `local` driver.

Appears that this is now called `file` and changing that appears to get me working.

Attempting to keep backwards compat by aliasing local to file.
@dmp42
Copy link
Contributor

dmp42 commented Jun 20, 2014

As a storage driver, it can be called (directly) using either file or local. See: /~https://github.com/dotcloud/docker-registry/blob/master/docker_registry/storage/__init__.py#L31 - though indeed for glance storage_alternate: _env:GLANCE_STORAGE_ALTERNATE:file is definitely better.

About the "flavor" in the configuration file itself, whichever name is ok and it bears no relation to the driver itself - so, I wouldn't change that.

Now, the glance driver is largely untested / unmaintained since nobody expressed interest in helping on it - can you detail on what you did to get it work and/or help on setting it a testable environment for travis?

Thanks!

@paulczar
Copy link
Author

without this patch the following error occurs when running the glance driver

oot@a5dcb4d7ff32:/# SETTINGS_FLAVOR=glance OS_USERNAME=demo OS_PASSWORD=admin OS_TENANT_NAME=demo OS_GLANCE_URL="http://10.0.2.15:9292" OS_AUTH_URL=http://127.0.0.1:5000/v2.0 docker-registry
2014-06-20 14:50:54,557 DEBUG: Will return docker-registry.drivers.glance.Storage
local
** [Bugsnag] No API key configured, couldn't notify
Traceback (most recent call last):
  File "/usr/local/bin/docker-registry", line 9, in <module>
    load_entry_point('docker-registry==0.7.3', 'console_scripts', 'docker-registry')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/run.py", line 16, in <module>
    from .tags import *  # noqa
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 21, in <module>
    store = storage.load()
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/storage/__init__.py", line 38, in load
    config=cfg)
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/drivers/glance.py", line 74, in __init__
    alt = driver.fetch(kind)
  File "/usr/local/lib/python2.7/dist-packages/docker_registry/core/driver.py", line 228, in fetch
    % (name, name, available())
docker_registry.core.exceptions.NotImplementedError: You requested storage driver docker_registry.drivers.local
which is not installed. Try `pip install docker-registry-driver-local`
or check your configuration. The following are currently
available on your system: ['dumb', 'file', 'glance', 's3']

@dmp42
Copy link
Contributor

dmp42 commented Jun 20, 2014

Yes, like I said, this: storage_alternate: _env:GLANCE_STORAGE_ALTERNATE:file should fix it (can you confirm?) - the other changes are not needed and I would prefer not to have them for now.

@paulczar
Copy link
Author

Yeah I can confirm that fixes it to the point that the registry will now start. Pushing images gives a 405 error and no good debug info in the logs ... haven't been able to pin anything specific down in the glance storage driver yet ... but I haven't spent much time on it.

@dmp42
Copy link
Contributor

dmp42 commented Jun 20, 2014

@paulczar check that you are using the latest registry (0.7.3), then that your config (if not the default) uses standalone: True
(and avoid master for now)

@dmp42 dmp42 mentioned this pull request Jun 23, 2014
@dmp42
Copy link
Contributor

dmp42 commented Jun 24, 2014

Hi again @paulczar

#444 is going to take care of this (the storage_alternate part at least, that fixes the problem), so I'm going to close this for now.

Keep me posted on your progress though.

Thanks for your time on this!

@dmp42 dmp42 closed this Jun 24, 2014
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 this pull request may close these issues.

2 participants