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

Do not assume that util.skopeo_copy can't fail #1147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mscherer
Copy link

@mscherer mscherer commented Dec 9, 2017

Description

If the disk is full, atomic will continue and show errors later, which is puzzling and hard to debug.

Related Bugzillas

Related Issue Numbers

Pull Request Checklist:

If your Pull request contains new features or functions, tests are required. If the PR is a bug fix and no tests exist, please consider adding some to prevent regressions.

  • Unittests
  • Integration Tests

Atomic/run.py Outdated
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))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is one extra '.' here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it fail immediately once pull_image raises CalledProcessError?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, I will fix. And no, it doesn't seems to raise anything. I sent the PR first to see the tests running, but I didn't had time to test or validate it (as I reinstalled my system with enough disk).

@@ -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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it raise a CalledProcessError exception when skopeo_copy fails?

Atomic/run.py Outdated
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))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't it fail immediately once pull_image raises CalledProcessError?

If the disk is full (projectatomic#1146),
atomic will continue and show errors later, which is puzzling and hard to debug.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants