Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 1.0.0
    • Component/s: build
    • Labels:
      None

      Description

      While trying to build 1.0 RC in Ubutu container I got the following error message:

      3/53 KB                                                                                                                                                                                                                                                                                        Downloaded: https://maven.atlassian.com/repository/public/org/apache/commons/commons-exec/1.2/commons-exec-1.2.jar (53 KB at 93.9 KB/sec)
      bower ESUDO         Cannot be run with sudo
      
      Additional error details:
      Since bower is a user command, there is no need to execute it with superuser permissions.
      If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
      
      http://www.joyent.com/blog/installing-node-and-npm
      https://gist.github.com/isaacs/579814
      
      You can however run a command with sudo using --allow-root option
      

      And the build stopped

        Activity

        Hide
        cos Konstantin Boudnik added a comment -

        I don't think it is of any business of a build to dictate the user ids and permissions. Hence it is clearly the component's problem. Let's fix it ASAP otherwise our dockerized CI is a fantasy.

        Show
        cos Konstantin Boudnik added a comment - I don't think it is of any business of a build to dictate the user ids and permissions. Hence it is clearly the component's problem. Let's fix it ASAP otherwise our dockerized CI is a fantasy.
        Hide
        evans_ye Evans Ye added a comment -

        Just a quick question: did you build tez by root? Cause I was ran into this exactly error message when building tez by root in my container env. I'll git it a try right away.

        Show
        evans_ye Evans Ye added a comment - Just a quick question: did you build tez by root? Cause I was ran into this exactly error message when building tez by root in my container env. I'll git it a try right away.
        Hide
        cos Konstantin Boudnik added a comment -

        Yes, I am running as root in the docker. I believe that's the default, right? I guess we can demand that the build should be run as say jenkins, but I don't like to bend just for Tez

        Show
        cos Konstantin Boudnik added a comment - Yes, I am running as root in the docker. I believe that's the default, right? I guess we can demand that the build should be run as say jenkins , but I don't like to bend just for Tez
        Hide
        evans_ye Evans Ye added a comment -

        While the reason why we can't build packages by root is a little bit odd(it's just tez), I take it from the angle that we all know building packages by root is a bad idea. So, is it worth to make it possible?
        And just for a note that If we'd like to build packages in containers on jerkins slaves, we'd create a jenkins user inside container with the same uid as jenkins user on slave, then build packages by jenkins user. In that way we can still have those built packages(should be located in the shared volume) owned by slave jenkins user.

        Show
        evans_ye Evans Ye added a comment - While the reason why we can't build packages by root is a little bit odd(it's just tez), I take it from the angle that we all know building packages by root is a bad idea. So, is it worth to make it possible? And just for a note that If we'd like to build packages in containers on jerkins slaves, we'd create a jenkins user inside container with the same uid as jenkins user on slave, then build packages by jenkins user. In that way we can still have those built packages(should be located in the shared volume) owned by slave jenkins user.
        Hide
        cos Konstantin Boudnik added a comment -

        Running as non-root user works around the issue, so it isn't critical for 1.0, but would be nice if we can do something about it in the feature.

        Show
        cos Konstantin Boudnik added a comment - Running as non-root user works around the issue, so it isn't critical for 1.0, but would be nice if we can do something about it in the feature.
        Hide
        evans_ye Evans Ye added a comment -

        Patch submitted.
        Not really a perfect fix but more like a workaround in Bigtop.
        How do you think, Konstantin Boudnik?

        Show
        evans_ye Evans Ye added a comment - Patch submitted. Not really a perfect fix but more like a workaround in Bigtop. How do you think, Konstantin Boudnik ?
        Hide
        cos Konstantin Boudnik added a comment -

        Looks good! +1
        Thanks a lot for fixing this Evans!

        Show
        cos Konstantin Boudnik added a comment - Looks good! +1 Thanks a lot for fixing this Evans!
        Hide
        evans_ye Evans Ye added a comment -

        Ok. Thanks, too.
        I've committed this.

        Show
        evans_ye Evans Ye added a comment - Ok. Thanks, too. I've committed this.

          People

          • Assignee:
            evans_ye Evans Ye
            Reporter:
            cos Konstantin Boudnik
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development