This repository was archived by the owner on Oct 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 139
This repository was archived by the owner on Oct 10, 2020. It is now read-only.
(atomic sign) does not work at all #929
Copy link
Copy link
Closed
Description
-
Traceback (most recent call last): File "./atomic", line 189, in <module> sys.exit(_func()) File "/home/mitr/t/atomic/Atomic/sign.py", line 80, in sign manifest = ri.get_manifest() File "/home/mitr/t/atomic/Atomic/discovery.py", line 41, in get_manifest assert(self.fqdn is not None) AssertionErrorApparently it is necessary to call
ri.inspect()beforeri.get_manifest(); though a clean fix would probably be different, at the very least it would be nice to skiputil.skopeo_inspectifself.registryis specified in the input argument. -
After adding a
_ = ri.inspect()in there:$ ATOMIC_CONF=tests/unit/fixtures/atomic.conf ATOMIC_CONFD=/var/empty/ sudo -E ./atomic --debug sign --sign-by=mitr@volny.cz -d . docker.io/library/busybox:latest … Traceback (most recent call last): File "./atomic", line 189, in <module> sys.exit(_func()) File "/home/mitr/t/atomic/Atomic/sign.py", line 85, in sign manifest_file.write(manifest) TypeError: argument 1 must be string or buffer, not dictIt seems
RegistryInspect.get_manifestshould usereturn_json=False, notTrue. -
Also (after the
_ = ri.inspect()workaround), only with--debug:$ ATOMIC_CONF=tests/unit/fixtures/atomic.conf ATOMIC_CONFD=/var/empty/ sudo -E ./atomic --debug sign --sign-by=mitr@volny.cz -d . busybox:latest … Traceback (most recent call last): File "./atomic", line 189, in <module> sys.exit(_func()) File "/home/mitr/t/atomic/Atomic/sign.py", line 79, in sign _ = ri.inspect() File "/home/mitr/t/atomic/Atomic/discovery.py", line 34, in inspect self.fqdn = self.find_image_on_registry() File "/home/mitr/t/atomic/Atomic/discovery.py", line 70, in find_image_on_registry util.write_out(i) File "/home/mitr/t/atomic/Atomic/util.py", line 189, in write_out _output(sys.stdout, output, lf) File "/home/mitr/t/atomic/Atomic/util.py", line 202, in _output fd.write(output + lf) TypeError: unsupported operand type(s) for +: 'dict' and 'str' -
After fixing the above:
$ ATOMIC_CONF=tests/unit/fixtures/atomic.conf ATOMIC_CONFD=/var/empty/ sudo -E ./atomic --debug sign --sign-by=mitr@volny.cz busybox:latest ... Traceback (most recent call last): File "./atomic", line 189, in <module> sys.exit(_func()) File "/home/mitr/t/atomic/Atomic/sign.py", line 103, in sign signature_path = util.get_signature_write_path(reg_info) File "/home/mitr/t/atomic/Atomic/util.py", line 671, in get_signature_write_path return reg_info.get('sigstore-staging', reg_info.get('sigstore', None)) AttributeError: 'NoneType' object has no attribute 'get'Unhandled the case when
reg_info = None and default_store = None -
Adding an error message in there ends up with:
$ ATOMIC_CONF=tests/unit/fixtures/atomic.conf ATOMIC_CONFD=/var/empty/ sudo -E ./atomic --debug sign --sign-by=mitr@volny.cz centos/httpd:latest … Trying docker.io/centos/httpd:latest... No applicable configuration for /centos was found in tests/unit/fixtures/etc/containers/registries.dApparently
expanded_image_nameends up as/centos/httpd:latest. I don’t immediately see how theRegistryInspectclass is supposed to work with.fqdn,.registryetc.
Metadata
Metadata
Assignees
Labels
No labels