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

[buildsystem]: Errors are seen during privilege escalation #13395

Closed
nazariig opened this issue Jan 17, 2023 · 2 comments · Fixed by #13412 or #13569
Closed

[buildsystem]: Errors are seen during privilege escalation #13395

nazariig opened this issue Jan 17, 2023 · 2 comments · Fixed by #13412 or #13569
Labels
Bug 🐛 Build MSFT Triaged this issue has been triaged

Comments

@nazariig
Copy link
Collaborator

Description

Errors in the log observed during image build:

user@server: sonic-buildimage$ tail -F target/docker-base-bullseye.gz.log
 ---> 0048183b631d
Step 5/40 : COPY vcache/ /sonic/target/vcache/docker-base-bullseye
 ---> 3a360af617b3
Step 6/40 : RUN dpkg -i /usr/local/share/buildinfo/sonic-build-hooks_1.0_all.deb
 ---> Running in 30fad432ed25
Selecting previously unselected package sonic-build-hooks.
(Reading database ... 6661 files and directories currently installed.)
Preparing to unpack .../sonic-build-hooks_1.0_all.deb ...
Unpacking sonic-build-hooks (1.0) ...
Setting up sonic-build-hooks (1.0) ...
Removing intermediate container 30fad432ed25
 ---> 177169452e60
Step 7/40 : ENV IMAGENAME=docker-base-bullseye
 ---> Running in 54a11924137d
Removing intermediate container 54a11924137d
 ---> 96c1e9d864f2
Step 8/40 : ENV DISTRO=bullseye
 ---> Running in 05dd3e5a4109
Removing intermediate container 05dd3e5a4109
 ---> 9bdad69e41fe
Step 9/40 : RUN pre_run_buildinfo docker-base-bullseye
 ---> Running in 178489d1ae0d
/usr/local/share/buildinfo/scripts/buildinfo_base.sh: line 24: sudo: command not found
/usr/local/share/buildinfo/scripts/buildinfo_base.sh: line 24: sudo: command not found
/usr/local/share/buildinfo/scripts/buildinfo_base.sh: line 24: sudo: command not found

Steps to reproduce the issue:

  1. make target/sonic-vs.bin

Describe the results you received:

/usr/local/share/buildinfo/scripts/buildinfo_base.sh: line 24: sudo: command not found

Describe the results you expected:

No errors expected

Output of show version:

  • N/A

Output of show techsupport:

  • N/A

Additional information you deem important (e.g. issue happens only occasionally):

https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-build-hooks/scripts/buildinfo_base.sh#L24

PKG_CACHE_FILE_NAME=${PKG_CACHE_PATH}/cache.tgz
sudo chown $USER $(dirname $PKG_CACHE_PATH)
mkdir -p ${PKG_CACHE_PATH}
@nazariig
Copy link
Collaborator Author

@liat-grozovik / @volodymyrsamotiy FYI

@nazariig nazariig changed the title [buildsystem]: Errors during privilege escalation [buildsystem]: Errors are seen during privilege escalation Jan 17, 2023
@liushilongbuaa
Copy link
Contributor

#13412

@neethajohn neethajohn added Triaged this issue has been triaged MSFT labels Jan 18, 2023
@lguohan lguohan linked a pull request Jan 18, 2023 that will close this issue
8 tasks
liat-grozovik pushed a commit that referenced this issue Jan 31, 2023
issue #13395

Fix a bug about sudo failure.
/usr/local/share/buildinfo/scripts/buildinfo_base.sh: line 24: sudo: command not found
Fix an issue about warning message.
./scripts/run_with_retry: line 4: [: : integer expression expected
liat-grozovik pushed a commit that referenced this issue Feb 23, 2023
Fixes: #13395

This fix resolves ownership configuration for vcache:

Step 24/40 : RUN pip3 install j2cli
 ---> Running in fcc39df62a98
chown: missing operand after '/sonic/target/vcache/docker-base-bullseye'
Try 'chown --help' for more information.
Originally the issue was introduced here: #13287

- Why I did it
To fix ownership configuration

- How I did it
Removed redundant stuff

Signed-off-by: Nazarii Hnydyn <[email protected]>
StormLiangMS pushed a commit to StormLiangMS/sonic-buildimage that referenced this issue Mar 28, 2023
Related work items: sonic-net#276, sonic-net#305, sonic-net#332, sonic-net#338, sonic-net#339, sonic-net#1188, sonic-net#1192, sonic-net#1197, sonic-net#1206, sonic-net#1685, sonic-net#1690, sonic-net#1696, sonic-net#1699, sonic-net#1709, sonic-net#1727, sonic-net#1737, sonic-net#1741, sonic-net#1742, sonic-net#2511, sonic-net#2512, sonic-net#2532, sonic-net#2559, sonic-net#2626, sonic-net#2638, sonic-net#2645, sonic-net#2649, sonic-net#2660, sonic-net#2669, sonic-net#2670, sonic-net#2678, sonic-net#10084, sonic-net#11442, sonic-net#11873, sonic-net#12047, sonic-net#12110, sonic-net#12207, sonic-net#12529, sonic-net#12678, sonic-net#13235, sonic-net#13287, sonic-net#13372, sonic-net#13395, sonic-net#13456, sonic-net#13497, sonic-net#13522, sonic-net#13545, sonic-net#13547, sonic-net#13552, sonic-net#13569, sonic-net#13572, sonic-net#13578, sonic-net#13591, sonic-net#13611, sonic-net#13647, sonic-net#13649, sonic-net#13660, sonic-net#13710, sonic-net#13716, sonic-net#13724, sonic-net#13726, sonic-net#13732, sonic-net#13735, sonic-net#13739, sonic-net#13757, sonic-net#13786, sonic-net#13792, sonic-net#13800, sonic-net#13801, sonic-net#13802, sonic-net#13805, sonic-net#13806, sonic-net#13812, sonic-net#13814, sonic-net#13822, sonic-net#13831, sonic-net#13834, sonic-net#13847, sonic-net#13870, sonic-net#13882, sonic-net#13884, sonic-net#13885, sonic-net#13894, sonic-net#13895, sonic-net#13926, sonic-net#13932, sonic-net#13935, sonic-net#13942, sonic-net#13951, sonic-net#13953, sonic-net#13964
bradh352 pushed a commit to bradh352/sonic-buildimage that referenced this issue Nov 22, 2024
…t#13412)

issue sonic-net#13395

Fix a bug about sudo failure.
/usr/local/share/buildinfo/scripts/buildinfo_base.sh: line 24: sudo: command not found
Fix an issue about warning message.
./scripts/run_with_retry: line 4: [: : integer expression expected
bradh352 pushed a commit to bradh352/sonic-buildimage that referenced this issue Nov 22, 2024
…t#13412)

issue sonic-net#13395

Fix a bug about sudo failure.
/usr/local/share/buildinfo/scripts/buildinfo_base.sh: line 24: sudo: command not found
Fix an issue about warning message.
./scripts/run_with_retry: line 4: [: : integer expression expected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐛 Build MSFT Triaged this issue has been triaged
Projects
None yet
3 participants