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

Builds now require password-less sudo access #11292

Open
jusherma opened this issue Jun 30, 2022 · 6 comments
Open

Builds now require password-less sudo access #11292

jusherma opened this issue Jun 30, 2022 · 6 comments
Assignees
Labels
Triaged this issue has been triaged

Comments

@jusherma
Copy link
Contributor

jusherma commented Jun 30, 2022

#11111 assumes that all users building SONIC have password-less sudo access, which is not the case in our build environment. This is causing build problems for us.

A more portable solution would be to mount the $(DOCKER_ROOT) directory in a temporary docker container and delete it from there. That way, the only requirement is that the user has docker access (a pre-req for build anyway)

Originally posted by @jusherma in #11111 (comment)

@qiluo-msft
Copy link
Collaborator

Could you give more details on repro? What is the steps and what is observed? Thanks!

@jusherma
Copy link
Contributor Author

jusherma commented Jul 1, 2022

During normal build (make init, make configure, make all), user gets prompted by sudo for their password multiple times. Build proceeds normally even if they don't have sudo access, but this makes the build stall until they deal with the interactive password prompt

Suggested remediation: using a small, temporary docker container to remove the files. For example:

$(docker run --rm -v $(DOCKER_ROOT)\:/mount alpine sh -c 'rm -rf /mount/')
$(mkdir -p $(DOCKER_ROOT))

@zhangyanzhao
Copy link
Collaborator

@jusherma what is your specific ask to the community?

@jusherma
Copy link
Contributor Author

jusherma commented Jul 7, 2022

Well, I was hoping this regression would be fixed. Assuming passwordless sudo is available for all users who build SONIC is not a good assumption to make. I now have a fix for this, so I'll open a PR later today

jusherma added a commit to jusherma/sonic-buildimage that referenced this issue Jul 11, 2022
@zhangyanzhao
Copy link
Collaborator

Thanks @jusherma

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Aug 3, 2022
@xumia
Copy link
Collaborator

xumia commented Aug 4, 2022

FYI.
@jusherma has fixed in master branch, see #11417
The PR has been merged to 202205.
Waiting for release manager to merge to 202111&202106, if urgent we can send a separate PR to merge to the release branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

4 participants