Skip to content

Conversation

@pan3793
Copy link
Member

@pan3793 pan3793 commented Jul 7, 2025

Description of PR

Ubuntu 24.04 (noble) docker image has a built-in user ubuntu (UID 1000)

$ docker run --rm -it ubuntu:noble cat /etc/passwd | grep ubuntu
ubuntu:x:1000:1000:Ubuntu:/home/ubuntu:/bin/bash

Dev container failed to bootstrap when the host user happens to have the same UID.

$ id
uid=1000(chengpan) gid=1000(chengpan) groups=1000(chengpan),4(adm),27(sudo),108(lpadmin),987(docker)

$ ./start-build-env.sh ubuntu_24

...

 => ERROR [4/5] RUN useradd -g 1000 -u 1000 -k /root -m chengpan -d "/home/chengpan"                                                                                                                             0.2s
------
 > [4/5] RUN useradd -g 1000 -u 1000 -k /root -m chengpan -d "/home/chengpan":
0.187 useradd: UID 1000 is not unique
------

 1 warning found (use docker --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 6)
Dockerfile:4
--------------------
   2 |     RUN rm -f /var/log/faillog /var/log/lastlog
   3 |     RUN groupadd --non-unique -g 1000 chengpan
   4 | >>> RUN useradd -g 1000 -u 1000 -k /root -m chengpan -d "/home/chengpan"
   5 |     RUN echo "chengpan ALL=NOPASSWD: ALL" > "/etc/sudoers.d/hadoop-build-1000"
   6 |     ENV HOME "/home/chengpan"
--------------------
ERROR: failed to build: failed to solve: process "/bin/bash -o pipefail -c useradd -g 1000 -u 1000 -k /root -m chengpan -d \"/home/chengpan\"" did not complete successfully: exit code: 4

How was this patch tested?

Manual test.

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@pan3793
Copy link
Member Author

pan3793 commented Jul 7, 2025

@slfan1989
Copy link
Contributor

@pan3793 LGTM +1, I personally believe this approach is feasible, but I haven't compiled it on Ubuntu 24.04 yet.

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 14m 9s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 37m 41s trunk passed
+1 💚 mvnsite 20m 52s trunk passed
+1 💚 shadedclient 34m 29s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 31m 22s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 18m 45s the patch passed
+1 💚 shellcheck 0m 0s No new issues.
+1 💚 shadedclient 34m 31s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 14m 33s root in the patch passed.
+1 💚 asflicense 1m 17s The patch does not generate ASF License warnings.
210m 14s
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7781/1/artifact/out/Dockerfile
GITHUB PR #7781
Optional Tests dupname asflicense mvnsite unit codespell detsecrets shellcheck shelldocs
uname Linux 65df6a3958c8 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 77c1839
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7781/1/testReport/
Max. process+thread count 553 (vs. ulimit of 5500)
modules C: . U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7781/1/console
versions git=2.25.1 maven=3.6.3 shellcheck=0.7.0
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@cnauroth cnauroth left a comment

Choose a reason for hiding this comment

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

+1. I'll plan on committing this later today or tomorrow.

@cnauroth cnauroth closed this in b023f25 Jul 8, 2025
@cnauroth
Copy link
Contributor

cnauroth commented Jul 8, 2025

I have committed this to trunk. Thank you, @pan3793 and @slfan1989 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants