| Summary: | Docker-registry does not currently support moving the config file | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora EPEL | Reporter: | Chris Murphy <chmurphy> | ||||||
| Component: | docker-registry | Assignee: | Marek Goldmann <mgoldman> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | el6 | CC: | chmurphy, mgoldman | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Linux | ||||||||
| URL: | https://github.com/dotcloud/docker-registry/pull/148 | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | docker-registry-0.6.0-4.el6 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2013-12-19 07:16:08 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
|
Description
Chris Murphy
2013-12-06 01:57:13 UTC
Hi Chris, Pelase note that you can specify the configuration file location in the /etc/sysconfig/docker-registry file. Here is the current (default) content of it: =============== # The Docker registry configuration file DOCKER_REGISTRY_CONFIG=/etc/docker-registry.yml # The configuration to use from DOCKER_REGISTRY_CONFIG file SETTINGS_FLAVOR=local # Address to bind the registry to REGISTRY_ADDRESS=0.0.0.0 # Port to bind the registry to REGISTRY_PORT=5000 # Number of workers to handle the connections GUNICORN_WORKERS=8 =============== If you specify the new patch there and restart the service running "service docker restart" should work. I mean "path", of course :) Created attachment 833621 [details]
etc_sysconfig_docker-registry
My /etc/sysconfig/docker-registry file that was in place when the program stack traced and crashed as shown in previous comment.
Created attachment 833632 [details]
etc_docker-registry.yml
My /etc/docker-registry.yml file that was in place when the program crashed.
Sorry, I misunderstod you. I'll have a fix for you soon. Hi Marek, I know that you're trying to export the location of the configuration file path as well as the name of the file in the variable $DOCKER_REGISTRY_CONFIG. However, 1) $DOCKER_REGISTRY_CONFIG only refers to the name of the config file and has no relationship with the path to the file 2) The variable get overwritten somewhere along the way regardless so it really doesn't matter what you put in the variable As I said before in comment #1, the application doesn't allow you to change the path from /usr/lib/python2.6/site-packages/docker-registry/ which is clearly documented on their README.md for the project https://github.com/dotcloud/docker-registry: "The location of the yaml file should be relative to the source directory. Absolute paths are not yet supported.". As soon as the application starts up, that variable is thrown out and replaced with /usr/lib/python2.6/site-packages/docker-registry/lib/../config.py . You can see how this happens in the function "def load()" on line 52 in the file /usr/lib/python2.6/site-packages/docker-registry/lib/config.py. I've tested this twice and unless you symlink or copy the file to the location where the application has it hardcoded, the application will not start. Thanks, Chris Hey Marek, Sorry, I didn't see your comment. Thanks for looking into this. Chris Please test this scratch build, if it works for you - I'll submit is as an update: http://koji.fedoraproject.org/koji/taskinfo?taskID=6264560 I've decided to patch docker-registry - I added support for absolute paths. I'll send a PR upstream once you confirm that it works as expected. Thanks! Marek, Spun up a new RHEL 6.5 image in AWS and tested the build and the service came up exactly as expected on first attempt. I would consider this bug fixed. Nice decision to fix for upstream instead of my hackish suggestion. This will benefit a lot of people. Thanks, Chris Alright, thanks for testing! Once I'll have a PR ready, I'll add the link. docker-registry-0.6.0-4.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/docker-registry-0.6.0-4.fc19 docker-registry-0.6.0-4.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/docker-registry-0.6.0-4.fc20 docker-registry-0.6.0-4.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/docker-registry-0.6.0-4.el6 Pull request sent! https://github.com/dotcloud/docker-registry/pull/148 Package docker-registry-0.6.0-4.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing docker-registry-0.6.0-4.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-23024/docker-registry-0.6.0-4.fc20 then log in and leave karma (feedback). docker-registry-0.6.0-4.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. docker-registry-0.6.0-4.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. docker-registry-0.6.0-4.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report. |