Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

[GSC] Always use absolute paths inside the Docker container #2151

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

dimakuv
Copy link

@dimakuv dimakuv commented Feb 9, 2021

Description of the changes

Previously, some GSC templates and scripts that execute inside Docker containers contained relative file paths. This led to failures if a base Docker image contained WORKDIR different from root (/), since all GSC scripts put Graphene-related files under root dir.

How to test this PR?

GSC tests and tutorials (e.g. https://graphene.readthedocs.io/en/latest/manpages/gsc.html#example) must work.


This change is Reviewable

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion, not enough approvals from maintainers (2 more required), not enough approvals from different teams (1 more required, approved so far: Intel)

a discussion (no related file):
FYI: This issue was detected by people in offline communication. They will verify that this fixes their use case.


a discussion (no related file):
@vahldiek Could you check that this PR makes sense to you?


mkow
mkow previously approved these changes Feb 9, 2021
Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required)

Copy link
Contributor

@vahldiek vahldiek left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required) (waiting on @dimakuv)

a discussion (no related file):

Previously, dimakuv (Dmitrii Kuvaiskii) wrote…

@vahldiek Could you check that this PR makes sense to you?

Looks fine to me. A bit surprised, since workdir has worked before, but might be an artifact of the recent general rewrite. It might be worth adding a test for workdir to avoid seeing this issue again. The nodejs test case includes a workdir, but we're only testing test 1-3 which are the simpler python-based tests due to limited testing infrastructure. I'm wandering, if we should simply add another python image or change the trusted arguments image to include a working dir as well. What do you think?


@vahldiek
Copy link
Contributor

vahldiek commented Feb 9, 2021

:lgtm:

Previously, some GSC templates and scripts that execute inside Docker
containers contained relative file paths. This led to failures if
a base Docker image contained WORKDIR different from root (`/`),
since all GSC scripts put Graphene-related files under root dir.

Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
@dimakuv
Copy link
Author

dimakuv commented Feb 16, 2021

Jenkins, retest Jenkins-Debug please (sendfile08 failed, known issue)

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

a discussion (no related file):

Previously, vahldiek (Anjo Vahldiek-Oberwagner) wrote…

Looks fine to me. A bit surprised, since workdir has worked before, but might be an artifact of the recent general rewrite. It might be worth adding a test for workdir to avoid seeing this issue again. The nodejs test case includes a workdir, but we're only testing test 1-3 which are the simpler python-based tests due to limited testing infrastructure. I'm wandering, if we should simply add another python image or change the trusted arguments image to include a working dir as well. What do you think?

FYI: This bug happened because we changed Graphene to use the libos.entrypoint which doesn't care about where the binary is located. So in the previous PR, I modified GSC such that it always puts the manifest + token + sig files in the root dir. But forgot to update all the paths to the absolute ones.


@dimakuv dimakuv merged commit 31f08ab into master Feb 16, 2021
@dimakuv dimakuv deleted the dimakuv/gsc-use-absolute-paths branch February 16, 2021 12:56
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.

3 participants