Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Commit

Permalink
Do not assume that util.skopeo_copy can't fail
Browse files Browse the repository at this point in the history
If the disk is full (#1146),
atomic will continue and show errors later, which is puzzling and hard to debug.
  • Loading branch information
mscherer committed Dec 9, 2017
1 parent 3e641a0 commit d560ce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Atomic/backends/_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,8 @@ def pull_image(self, image, remote_image_obj, **kwargs):
trust = Trust()
trust.discover_sigstore(fq_name)
util.write_out("Pulling {} ...".format(fq_name))
util.skopeo_copy("docker://{}".format(fq_name), image, debug=debug, insecure=insecure,
return util.skopeo_copy("docker://{}".format(fq_name), image, debug=debug, insecure=insecure,
policy_filename=trust.policy_filename, src_creds=src_creds)
return 0

def delete_container(self, container, force=False):
return self.d.remove_container(container, force=force)
Expand Down
4 changes: 3 additions & 1 deletion Atomic/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def run(self):
if self.args.display:
return 0
try:
db.pull_image(self.image, remote_image_obj)
err = db.pull_image(self.image, remote_image_obj)
if err:
raise ValueError("Unable to pull image {}"..format(self.image))
img_object = db.has_image(self.image)
except RegistryInspectError:
raise ValueError("Unable to find image {}".format(self.image))
Expand Down

0 comments on commit d560ce5

Please sign in to comment.