You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "slfan1989 (via GitHub)" <gi...@apache.org> on 2024/01/13 13:16:43 UTC

[PR] HADOOP-19038. Improve create-release RUN script. [hadoop]

slfan1989 opened a new pull request, #6448:
URL: https://github.com/apache/hadoop/pull/6448

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 'HADOOP-17799. Your PR title ...'.
   -->
   
   ### Description of PR
   
   JIRA: HADOOP-19038. Improve create-release RUN script.
   
   Using `create-release` will create a docker image locally, but three of the RUN scripts may fail to execute.
   
   1. RUN groupadd --non-unique -g 0 root
   
   ```
   => ERROR [16/20] RUN groupadd --non-unique -g 0 root                                                            0.2s
   ------
    > [16/20] RUN groupadd --non-unique -g 0 root:
   0.154 groupadd: group 'root' already exists
   ------
   Dockerfile:100
   --------------------
     98 |
     99 |     LABEL org.apache.hadoop.create-release="cr-19697"
    100 | >>> RUN groupadd --non-unique -g 0 root
    101 |     RUN useradd -g 0 -u 0 -m root
    102 |     RUN chown -R root /home/root
   ```
   
   2. RUN useradd -g 0 -u 0 -m root
   
   ```
    > [17/20] RUN useradd -g 0 -u 0 -m root:
   0.165 useradd: user 'root' already exists
   ------
   Dockerfile:101
   --------------------
     99 |     LABEL org.apache.hadoop.create-release="cr-12068"
    100 |     RUN groupadd --non-unique -g 0 root; exit 0;
    101 | >>> RUN useradd -g 0 -u 0 -m root
    102 |     RUN chown -R root /home/root
    103 |     ENV HOME /home/root
   ```
   
   3. RUN chown -R root /home/root
   
   ```
    > [18/20] RUN chown -R root /home/root:
   0.168 chown: cannot access '/home/root': No such file or directory
   ------
   Dockerfile:102
   --------------------
    100 |     RUN groupadd --non-unique -g 0 root; exit 0;
    101 |     RUN useradd -g 0 -u 0 -m root; exit 0;
    102 | >>> RUN chown -R root /home/root
    103 |     ENV HOME /home/root
    104 |     RUN mkdir -p /maven
   --------------------
   ```
   
   ### How was this patch tested?
   
   
   ### 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](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19038. Improve create-release RUN script. [hadoop]

Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on code in PR #6448:
URL: https://github.com/apache/hadoop/pull/6448#discussion_r1453537205


##########
dev-support/bin/create-release:
##########
@@ -504,9 +504,9 @@ function dockermode
     echo "LABEL org.apache.hadoop.create-release=\"cr-${RANDOM}\""
 
     # setup ownerships, etc
-    echo "RUN groupadd --non-unique -g ${group_id} ${user_name}"
-    echo "RUN useradd -g ${group_id} -u ${user_id} -m ${user_name}"
-    echo "RUN chown -R ${user_name} /home/${user_name}"
+    echo "RUN groupadd --non-unique -g ${group_id} ${user_name}; exit 0;"

Review Comment:
   Thank you for reviewing this PR! Once an error occurs in the RUN script, the image building process is terminated. The error I encountered does not block the overall compilation process, so I added `exit 0`. I hope that even if there is an error, the subsequent compilation process can continue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19038. Improve create-release RUN script. [hadoop]

Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #6448:
URL: https://github.com/apache/hadoop/pull/6448#issuecomment-1897876438

   @Hexiaoqiao Can you help review this PR again? Thank you very much!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19038. Improve create-release RUN script. [hadoop]

Posted by "Hexiaoqiao (via GitHub)" <gi...@apache.org>.
Hexiaoqiao commented on code in PR #6448:
URL: https://github.com/apache/hadoop/pull/6448#discussion_r1451701620


##########
dev-support/bin/create-release:
##########
@@ -504,9 +504,9 @@ function dockermode
     echo "LABEL org.apache.hadoop.create-release=\"cr-${RANDOM}\""
 
     # setup ownerships, etc
-    echo "RUN groupadd --non-unique -g ${group_id} ${user_name}"
-    echo "RUN useradd -g ${group_id} -u ${user_id} -m ${user_name}"
-    echo "RUN chown -R ${user_name} /home/${user_name}"
+    echo "RUN groupadd --non-unique -g ${group_id} ${user_name}; exit 0;"

Review Comment:
   Do we need to check if this command execute successfully or not here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19038. Improve create-release RUN script. [hadoop]

Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on code in PR #6448:
URL: https://github.com/apache/hadoop/pull/6448#discussion_r1453537205


##########
dev-support/bin/create-release:
##########
@@ -504,9 +504,9 @@ function dockermode
     echo "LABEL org.apache.hadoop.create-release=\"cr-${RANDOM}\""
 
     # setup ownerships, etc
-    echo "RUN groupadd --non-unique -g ${group_id} ${user_name}"
-    echo "RUN useradd -g ${group_id} -u ${user_id} -m ${user_name}"
-    echo "RUN chown -R ${user_name} /home/${user_name}"
+    echo "RUN groupadd --non-unique -g ${group_id} ${user_name}; exit 0;"

Review Comment:
   Thank you for reviewing this PR! Once an error occurs in the RUN script, the image building process is terminated. The error I encountered does not block the overall compilation process, so I added "exit 0". I hope that even if there is an error, the subsequent compilation process can continue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19038. Improve create-release RUN script. [hadoop]

Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 merged PR #6448:
URL: https://github.com/apache/hadoop/pull/6448


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19038. Improve create-release RUN script. [hadoop]

Posted by "hadoop-yetus (via GitHub)" <gi...@apache.org>.
hadoop-yetus commented on PR #6448:
URL: https://github.com/apache/hadoop/pull/6448#issuecomment-1890483348

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |  18m  0s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  |
   | +0 :ok: |  shelldocs  |   0m  0s |  |  Shelldocs was not available.  |
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain any @author tags.  |
   |||| _ trunk Compile Tests _ |
   | +0 :ok: |  mvndep  |  14m  3s |  |  Maven dependency ordering for branch  |
   | +1 :green_heart: |  shadedclient  |  38m 22s |  |  branch has no errors when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +0 :ok: |  mvndep  |   0m 29s |  |  Maven dependency ordering for patch  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks issues.  |
   | +1 :green_heart: |  shellcheck  |   0m  1s |  |  No new issues.  |
   | +1 :green_heart: |  shadedclient  |  36m 40s |  |  patch has no errors when building and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  asflicense  |   0m 33s |  |  The patch does not generate ASF License warnings.  |
   |  |   | 112m 31s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6448/1/artifact/out/Dockerfile |
   | GITHUB PR | https://github.com/apache/hadoop/pull/6448 |
   | Optional Tests | dupname asflicense codespell detsecrets shellcheck shelldocs |
   | uname | Linux f57beaab6d95 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / e8632c480e9d487b88dc93828eef28cd44977dfc |
   | Max. process+thread count | 540 (vs. ulimit of 5500) |
   | modules | C:  U:  |
   | Console output | https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6448/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.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Re: [PR] HADOOP-19038. Improve create-release RUN script. [hadoop]

Posted by "slfan1989 (via GitHub)" <gi...@apache.org>.
slfan1989 commented on PR #6448:
URL: https://github.com/apache/hadoop/pull/6448#issuecomment-1898278315

   @steveloughran @Hexiaoqiao Thanks for reviewing the code!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org