Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerbackend.Image eats tag #276

Open
4 tasks
TomasTomecek opened this issue Sep 11, 2018 · 4 comments
Open
4 tasks

dockerbackend.Image eats tag #276

TomasTomecek opened this issue Sep 11, 2018 · 4 comments
Labels
bug Something isn't working good-first-issue Good for newcomers

Comments

@TomasTomecek
Copy link
Member

TomasTomecek commented Sep 11, 2018

In [9]: image = db.ImageClass(im)                                                                                                                                            
13:29:31.985 image.py          DEBUG  pull policy set to 'if_not_present' and image is not present, pulling the image
13:29:32.484 image.py          DEBUG  {'status': 'Trying to pull repository registry.fedoraproject.org/fedora ... '}                                                        
13:29:32.484 image.py          INFO   Trying to pull repository registry.fedoraproject.org/fedora ...                                                                        
13:29:36.710 image.py          DEBUG  {'status': 'Pulling from registry.fedoraproject.org/fedora', 'id': 'sha256:a91e9da91a6d39386e98685e91e8ccbd35197a91f29516fca0392de2bb93
82a7'}                                                                                                                                                                      
13:29:36.711 image.py          INFO   Pulling from registry.fedoraproject.org/fedora                                                                                         
13:29:37.695 image.py          DEBUG  {'status': 'Pulling fs layer', 'progressDetail': {}, 'id': '7aee9caab031'}                                                            
13:29:37.695 image.py          INFO   Pulling fs layer                                                                                                                      
13:29:38.677 image.py          DEBUG  {'status': 'Downloading', 'progressDetail': {'current': 539815, 'total': 89937508}, 'progress': '[>                                    
              ] 539.8 kB/89.94 MB', 'id': '7aee9caab031'}                                                                                                                   
13:29:38.678 image.py          INFO   Downloading                                                                                                                           
...

In [10]: im
Out[10]: 'registry.fedoraproject.org/fedora:29'

Maybe we should either error out if there is : in image name; or parse it and use and error out in case tag param is set and there is tag in the name.

But anyway, when I set tag in the image name, conu should not eat it.

Suggestions are welcome.

Edit: yeah, and the image instance is completely unusable:

ImageNotFound: 404 Client Error: Not Found ("No such image: registry.fedoraproject.org/fedora:29:latest")

Edit 2: TODO:

  • if there is : in image name: parse it
  • if there is : in image name and tag param is also set, raise an exception
  • utilize code from colin to parse the image name, Franta mentioned it in his comment.
  • write good tests for this
@TomasTomecek TomasTomecek added bug Something isn't working good-first-issue Good for newcomers labels Sep 11, 2018
@skulltech
Copy link
Contributor

Maybe we should either error out if there is : in image name; or parse it and use and error out in case tag param is set and there is tag in the name.

I think this approach is perfect.

@skulltech
Copy link
Contributor

Is the tag being mentioned as name:tag a standard thing for all container technologies, or is just a docker thing? If it is a standard thing, then it could implemented in the apidefs, otherwise implementing it only in the DockerBackend would be better.

@lachmanfrantisek
Copy link
Member

Good (and hopefully well tested) parsing we have in the colin. The plan was to move that code to conu.

@TomasTomecek
Copy link
Member Author

@skulltech AFAIK all the container runtimes utilize images names and tags, so we can totally put ti to apidefs

Gentlemen, thanks for feedback, I updated the original post with TODO for this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good-first-issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants