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

'invalid tag' error when trying to copy image to docker #227

Closed
miabbott opened this issue Oct 6, 2016 · 8 comments
Closed

'invalid tag' error when trying to copy image to docker #227

miabbott opened this issue Oct 6, 2016 · 8 comments

Comments

@miabbott
Copy link

miabbott commented Oct 6, 2016

This was caught via our internal tests against the CAHC stream.

# rpm -q skopeo
skopeo-1.14-7d786d11d668f2932e524da53afb658438c8ebfc.0aa48eb05ef9b646ac444ddc878eb93dbd3d6d98.el7.centos.x86_64
# skopeo --version
skopeo version 0.1.17-dev commit: ed00f025b272f2a0dd1483c8199d3fd9e18848ab

Trying to use atomic install docker.io/cockpit/ws failed and the root cause seems to be in skopeo.

# atomic --debug install docker.io/cockpit/ws
Getting image source manifest
Getting image source configuration
Uploading blob sha256:ee0a90cfdf4505d355a25350e4a4dbd891a41b51229ba77262dd0630cfa76735
 0 B / 6.65 KB [---------------------------------------------------------------]
Uploading blob sha256:c46df4a5b63bb61e1602168743fc52dc0656de63d48b97d5983b980c60ca3a19
 62.79 MB / 64.10 MB [=======================================================>-]
Uploading blob sha256:99ef0b2c848550b7648955df8ad94402161af7a899ad52633aa42683e2d891a6
 176.10 MB / 176.53 MB [=======================================================]
Uploading blob sha256:59a5aa6b0031607119d507be912112fd93701dfa4a5b42cf321ef68a504aab47
 4.86 MB / 8.15 MB [===================================>-----------------------]
Uploading blob sha256:5951d07fb74841da3d059ef481fea3525050516cd60c1bf1062fb72c2146771b
 0 B / 150 B [-----------------------------------------------------------------]
Uploading blob sha256:5f76b08ca3d3013ab4ac296cebb30c2e4a9ebe5798f28b7695a2b41447d578e2
 0 B / 785 B [-----------------------------------------------------------------]
Uploading blob sha256:29128c9a04f7e3ecfa650d385b222e6381affc3c497a807b7a05245e1d994cf4
 0 B / 469 B [-----------------------------------------------------------------]
Uploading blob sha256:681bb27149fab85d6b7e4f8dd5dd0e2158d4f55c4753f3e558335a23734c5264
 0 B / 417 B [-----------------------------------------------------------------]
Uploading blob sha256:078f3e27924945f0470a0630688c5180c6ec4627c1b256d0e8e572098d644c5f
 0 B / 778 B [-----------------------------------------------------------------]
Uploading blob sha256:080f6c78b22eca8a23f588d5a2566118d039c73457f8c2d9011ff5b698f698c2
 0 B / 464 B [-----------------------------------------------------------------]
Uploading blob sha256:d174142110f64bb00f772c366ce7963ee88ca8defa22236cd4381c00aeece9c7
 0 B / 413 B [-----------------------------------------------------------------]
Uploading blob sha256:2599a2377ecad4b435fa7099d13eb0aecb224d7a9ea02ea4ea8f20b08f7bcb69
 0 B / 180 B [-----------------------------------------------------------------]
Uploading manifest to image destination
Storing signatures
FATA[0016] Error committing the finished image: Error saving image to docker engine: Error response from daemon: invalid tag "docker.io/cockpit/ws" 

Traceback (most recent call last):
  File "/bin/atomic", line 186, in <module>
    sys.exit(_func())
  File "/usr/lib/python2.7/site-packages/Atomic/install.py", line 90, in install
    self._check_if_image_present()
  File "/usr/lib/python2.7/site-packages/Atomic/install.py", line 113, in _check_if_image_present
    self.update()
  File "/usr/lib/python2.7/site-packages/Atomic/atomic.py", line 115, in update
    util.is_insecure_registry(self.d.info()['RegistryConfig'], util.strip_port(registry)))
  File "/usr/lib/python2.7/site-packages/Atomic/util.py", line 391, in skopeo_copy
    return check_call(cmd)
  File "/usr/lib/python2.7/site-packages/Atomic/util.py", line 156, in check_call
    return subprocess.check_call(cmd, env=env, stdin=stdin, stderr=stderr, stdout=stdout, close_fds=True)
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/skopeo', 'copy', '--remove-signatures', 'docker://docker.io/cockpit/ws', 'docker-daemon:docker.io/cockpit/ws']' returned non-zero exit status 1

OK, so let's run that skopeo command by itself

# /usr/bin/skopeo --debug copy --remove-signatures docker://docker.io/cockpit/ws docker-daemon:docker.io/cockpit/ws                                                                                       
DEBU[0000] Using registries.d directory /etc/containers/registries.d for sigstore configuration 
DEBU[0000]  Using "default-docker" configuration        
DEBU[0000]  No signature storage configuration found for docker.io/cockpit/ws:latest 
DEBU[0000] IsRunningImageAllowed for image docker:docker.io/cockpit/ws:latest 
DEBU[0000]  Using default policy section                
DEBU[0000]  Requirement 0: allowed                      
DEBU[0000] Overall: allowed                             
Getting image source manifest
DEBU[0000] Ping https://registry-1.docker.io/v2/ err <nil> 
DEBU[0000] Ping https://registry-1.docker.io/v2/ status 401 
DEBU[0000] GET https://registry-1.docker.io/v2/cockpit/ws/manifests/latest 
Getting image source configuration
Uploading blob sha256:ee0a90cfdf4505d355a25350e4a4dbd891a41b51229ba77262dd0630cfa76735
DEBU[0001] Downloading cockpit/ws/blobs/sha256:ee0a90cfdf4505d355a25350e4a4dbd891a41b51229ba77262dd0630cfa76735 
DEBU[0001] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:ee0a90cfdf4505d355a25350e4a4dbd891a41b51229ba77262dd0630cfa76735 
DEBU[0001] No compression detected                      
 0 B / 6.65 KB [---------------------------------------------------------------]DEBU[0001] Using original blob without modification     
DEBU[0001] Sending as tar file sha256:ee0a90cfdf4505d355a25350e4a4dbd891a41b51229ba77262dd0630cfa76735 

Uploading blob sha256:c46df4a5b63bb61e1602168743fc52dc0656de63d48b97d5983b980c60ca3a19
DEBU[0001] Downloading cockpit/ws/blobs/sha256:c46df4a5b63bb61e1602168743fc52dc0656de63d48b97d5983b980c60ca3a19 
 6.65 KB / 6.65 KB [===========================================================]DEBU[0002] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:c46df4a5b63bb61e1602168743fc52dc0656de63d48b97d5983b980c60ca
3a19 
DEBU[0002] Detected compression format gzip             
 0 B / 64.10 MB [--------------------------------------------------------------]DEBU[0002] Using original blob without modification     
DEBU[0002] Sending as tar file sha256:c46df4a5b63bb61e1602168743fc52dc0656de63d48b97d5983b980c60ca3a19 
 62.20 MB / 64.10 MB [=======================================================>-]
Uploading blob sha256:99ef0b2c848550b7648955df8ad94402161af7a899ad52633aa42683e2d891a6
DEBU[0004] Downloading cockpit/ws/blobs/sha256:99ef0b2c848550b7648955df8ad94402161af7a899ad52633aa42683e2d891a6 
 64.10 MB / 64.10 MB [=========================================================]DEBU[0005] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:99ef0b2c848550b7648955df8ad94402161af7a899ad52633aa42683e2d8
91a6 
DEBU[0005] Detected compression format gzip             
 0 B / 176.53 MB [-------------------------------------------------------------]DEBU[0005] Using original blob without modification     
DEBU[0005] Sending as tar file sha256:99ef0b2c848550b7648955df8ad94402161af7a899ad52633aa42683e2d891a6 
 175.14 MB / 176.53 MB [=======================================================]
Uploading blob sha256:59a5aa6b0031607119d507be912112fd93701dfa4a5b42cf321ef68a504aab47
DEBU[0016] Downloading cockpit/ws/blobs/sha256:59a5aa6b0031607119d507be912112fd93701dfa4a5b42cf321ef68a504aab47 
 176.53 MB / 176.53 MB [=======================================================]DEBU[0017] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:59a5aa6b0031607119d507be912112fd93701dfa4a5b42cf321ef68a504a
ab47 
DEBU[0017] Detected compression format gzip             
 0 B / 8.15 MB [---------------------------------------------------------------]DEBU[0017] Using original blob without modification     
DEBU[0017] Sending as tar file sha256:59a5aa6b0031607119d507be912112fd93701dfa4a5b42cf321ef68a504aab47 
 7.93 MB / 8.15 MB [=========================================================>-]
Uploading blob sha256:5951d07fb74841da3d059ef481fea3525050516cd60c1bf1062fb72c2146771b
DEBU[0018] Downloading cockpit/ws/blobs/sha256:5951d07fb74841da3d059ef481fea3525050516cd60c1bf1062fb72c2146771b 
 8.15 MB / 8.15 MB [===========================================================]DEBU[0019] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:5951d07fb74841da3d059ef481fea3525050516cd60c1bf1062fb72c2146
771b 
DEBU[0019] Detected compression format gzip             
 0 B / 150 B [-----------------------------------------------------------------]DEBU[0019] Using original blob without modification     
DEBU[0019] Sending as tar file sha256:5951d07fb74841da3d059ef481fea3525050516cd60c1bf1062fb72c2146771b 

Uploading blob sha256:5f76b08ca3d3013ab4ac296cebb30c2e4a9ebe5798f28b7695a2b41447d578e2
DEBU[0019] Downloading cockpit/ws/blobs/sha256:5f76b08ca3d3013ab4ac296cebb30c2e4a9ebe5798f28b7695a2b41447d578e2 
 150 B / 150 B [===============================================================]DEBU[0019] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:5f76b08ca3d3013ab4ac296cebb30c2e4a9ebe5798f28b7695a2b41447d5
78e2 
DEBU[0019] Detected compression format gzip             
 0 B / 785 B [-----------------------------------------------------------------]DEBU[0019] Using original blob without modification     
DEBU[0019] Sending as tar file sha256:5f76b08ca3d3013ab4ac296cebb30c2e4a9ebe5798f28b7695a2b41447d578e2 

Uploading blob sha256:29128c9a04f7e3ecfa650d385b222e6381affc3c497a807b7a05245e1d994cf4
DEBU[0019] Downloading cockpit/ws/blobs/sha256:29128c9a04f7e3ecfa650d385b222e6381affc3c497a807b7a05245e1d994cf4 
 785 B / 785 B [===============================================================]DEBU[0020] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:29128c9a04f7e3ecfa650d385b222e6381affc3c497a807b7a05245e1d99
4cf4 
DEBU[0020] Detected compression format gzip             
 0 B / 469 B [-----------------------------------------------------------------]DEBU[0020] Using original blob without modification     
DEBU[0020] Sending as tar file sha256:29128c9a04f7e3ecfa650d385b222e6381affc3c497a807b7a05245e1d994cf4 

Uploading blob sha256:681bb27149fab85d6b7e4f8dd5dd0e2158d4f55c4753f3e558335a23734c5264
DEBU[0020] Downloading cockpit/ws/blobs/sha256:681bb27149fab85d6b7e4f8dd5dd0e2158d4f55c4753f3e558335a23734c5264 
 469 B / 469 B [===============================================================]DEBU[0020] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:681bb27149fab85d6b7e4f8dd5dd0e2158d4f55c4753f3e558335a23734c
5264 
DEBU[0021] Detected compression format gzip             
 0 B / 417 B [-----------------------------------------------------------------]DEBU[0021] Using original blob without modification     
DEBU[0021] Sending as tar file sha256:681bb27149fab85d6b7e4f8dd5dd0e2158d4f55c4753f3e558335a23734c5264 

Uploading blob sha256:078f3e27924945f0470a0630688c5180c6ec4627c1b256d0e8e572098d644c5f
DEBU[0021] Downloading cockpit/ws/blobs/sha256:078f3e27924945f0470a0630688c5180c6ec4627c1b256d0e8e572098d644c5f 
 417 B / 417 B [===============================================================]DEBU[0021] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:078f3e27924945f0470a0630688c5180c6ec4627c1b256d0e8e572098d64
4c5f 
DEBU[0021] Detected compression format gzip             
 0 B / 778 B [-----------------------------------------------------------------]DEBU[0021] Using original blob without modification     
DEBU[0021] Sending as tar file sha256:078f3e27924945f0470a0630688c5180c6ec4627c1b256d0e8e572098d644c5f 

Uploading blob sha256:080f6c78b22eca8a23f588d5a2566118d039c73457f8c2d9011ff5b698f698c2
DEBU[0021] Downloading cockpit/ws/blobs/sha256:080f6c78b22eca8a23f588d5a2566118d039c73457f8c2d9011ff5b698f698c2 
 778 B / 778 B [===============================================================]DEBU[0021] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:080f6c78b22eca8a23f588d5a2566118d039c73457f8c2d9011ff5b698f6
98c2 
DEBU[0022] Detected compression format gzip             
 0 B / 464 B [-----------------------------------------------------------------]DEBU[0022] Using original blob without modification     
DEBU[0022] Sending as tar file sha256:080f6c78b22eca8a23f588d5a2566118d039c73457f8c2d9011ff5b698f698c2 

Uploading blob sha256:d174142110f64bb00f772c366ce7963ee88ca8defa22236cd4381c00aeece9c7
DEBU[0022] Downloading cockpit/ws/blobs/sha256:d174142110f64bb00f772c366ce7963ee88ca8defa22236cd4381c00aeece9c7 
 464 B / 464 B [===============================================================]DEBU[0022] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:d174142110f64bb00f772c366ce7963ee88ca8defa22236cd4381c00aeec
e9c7 
DEBU[0022] Detected compression format gzip             
 0 B / 413 B [-----------------------------------------------------------------]DEBU[0022] Using original blob without modification     
DEBU[0022] Sending as tar file sha256:d174142110f64bb00f772c366ce7963ee88ca8defa22236cd4381c00aeece9c7 

Uploading blob sha256:2599a2377ecad4b435fa7099d13eb0aecb224d7a9ea02ea4ea8f20b08f7bcb69
DEBU[0022] Downloading cockpit/ws/blobs/sha256:2599a2377ecad4b435fa7099d13eb0aecb224d7a9ea02ea4ea8f20b08f7bcb69 
 413 B / 413 B [===============================================================]DEBU[0023] GET https://registry-1.docker.io/v2/cockpit/ws/blobs/sha256:2599a2377ecad4b435fa7099d13eb0aecb224d7a9ea02ea4ea8f20b08f7b
cb69 
DEBU[0023] Detected compression format gzip             
 0 B / 180 B [-----------------------------------------------------------------]DEBU[0023] Using original blob without modification     
DEBU[0023] Sending as tar file sha256:2599a2377ecad4b435fa7099d13eb0aecb224d7a9ea02ea4ea8f20b08f7bcb69 

Uploading manifest to image destination
DEBU[0023] Sending as tar file manifest.json            
Storing signatures
DEBU[0023] docker-daemon: Closing tar stream            
DEBU[0023] docker-daemon: Waiting for status            
DEBU[0023] docker-daemon: sending done, status Error saving image to docker engine: Error response from daemon: invalid tag "docker.io/cockpit/ws" 
FATA[0023] Error committing the finished image: Error saving image to docker engine: Error response from daemon: invalid tag "docker.io/cockpit/ws"
@runcom
Copy link
Member

runcom commented Oct 6, 2016

@mtrmac anything already fixed into master?

@miabbott
Copy link
Author

miabbott commented Oct 6, 2016

FWIW, CAHC is building skopeo from @mtrmac's 'integrate-all-the-things' branch

https://github.com/mtrmac/skopeo/tree/integrate-all-the-things

@runcom
Copy link
Member

runcom commented Oct 6, 2016

FWIW, CAHC is building skopeo from @mtrmac's 'integrate-all-the-things' branch

https://github.com/mtrmac/skopeo/tree/integrate-all-the-things

alright, thx @miabbott

@mtrmac
Copy link
Collaborator

mtrmac commented Oct 6, 2016

Try including an explicit tag, e.g. docker.io/cockpit/ws:latest. If that works then we need to figure out whether this is supposed to be added by atomic automatically or not.

@miabbott
Copy link
Author

miabbott commented Oct 6, 2016

Try including an explicit tag, e.g. docker.io/cockpit/ws:latest. If that works then we need to figure out whether this is supposed to be added by atomic automatically or not.

Yup, that did the trick.

Seems reasonable to assume :latest if the user did not specify an explicit tag and that seems like something atomic could provide.

@mtrmac
Copy link
Collaborator

mtrmac commented Oct 6, 2016

@baude Is ^^^ supposed to work already?

miabbott added a commit to miabbott/atomic-host-tests that referenced this issue Oct 6, 2016
In containers/skopeo#227, the `atomic install` command is failing
because there is no explicit tag specified.

This change makes the test use the `:latest` tag explicitly on the
cockpit images.

(We may want to revert this once the upstream issue is fixed)
mike-nguyen pushed a commit to projectatomic/atomic-host-tests that referenced this issue Oct 6, 2016
In containers/skopeo#227, the `atomic install` command is failing
because there is no explicit tag specified.

This change makes the test use the `:latest` tag explicitly on the
cockpit images.

(We may want to revert this once the upstream issue is fixed)
@rhatdan
Copy link
Member

rhatdan commented Apr 25, 2019

I believe this is fixed.

@rhatdan rhatdan closed this as completed Apr 25, 2019
@mtrmac
Copy link
Collaborator

mtrmac commented Apr 26, 2019

For the record, skopeo now reject such input with

Invalid destination name docker-daemon:docker.io/cockpit/ws: docker-daemon: reference cockpit/ws has neither a tag nor a digest 

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants