Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 415075

Summary: HIPP for Code Recommenders
Product: Community Reporter: Thanh Ha <thanh.ha>
Component: CI-JenkinsAssignee: CI Admin Inbox <ci.admin-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: denis.roy, marcel.bruch, sewe, thanh.ha, wayne.beaton, webmaster
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 403843    
Bug Blocks:    

Description Thanh Ha CLA 2013-08-14 11:10:52 EDT
From bug 403843 comment 21:

Code Recommenders and Code Recommenders Incubation would like to request a (single) HIPP too. Similar to egit, we'd like to run the gerrit verification jobs on this server including sonar report etc. (the full program I guess).
Comment 1 Thanh Ha CLA 2013-08-14 14:17:46 EDT
Hi Marcel,

I configured a new HIPP instance for Code Recommenders which you can reach at:

    https://hudson.eclipse.org/recommenders/


You as well as any committers on both the recommenders and recommenders.incubator projects should now be able to login. Please note that you will need to use your "email" as the login on the HIPP instance.

If you require additional Hudson plugins please reopen this bug and let me know which plugins you need. I've added the "Gerrit Trigger" and "Sonar" plugins as you requested.

Optionally we can also add the Hudson instance user to the project group which would allow it to write directly to the Recommenders downloads area. We are only enabling this permission if requested by the project so let us know if this is something you would like.
Comment 2 Marcel Bruch CLA 2013-08-14 17:15:34 EDT
Hell, how cool is that?

Write access to download area would be great to publish the latest head builds automatically.
Comment 3 Thanh Ha CLA 2013-08-15 13:31:43 EDT
(In reply to comment #2)
> Hell, how cool is that?
> 
> Write access to download area would be great to publish the latest head
> builds automatically.

I've added your HIPP user to the recommenders project group.
Comment 4 Denis Roy CLA 2013-08-15 13:48:38 EDT
> Optionally we can also add the Hudson instance user to the project group
> which would allow it to write directly to the Recommenders downloads area.

And to your Git repositories that are not under Gerrit's control. I think we should mention that.
Comment 5 Thanh Ha CLA 2013-08-15 13:51:49 EDT
(In reply to comment #4)
> > Optionally we can also add the Hudson instance user to the project group
> > which would allow it to write directly to the Recommenders downloads area.
> 
> And to your Git repositories that are not under Gerrit's control. I think we
> should mention that.

Good point. I'll mention that in my next HIPP deployments.
Comment 6 Marcel Bruch CLA 2013-08-17 02:16:46 EDT
Maven needs to be configured.
>>
Hudson needs to know where your Maven 2/3 is installed.
Please do so from the system configuration.
<<

But when going to system configuration I get 
>>
marcel.bruch@codetrails.com is missing the Administer permission
<<

Could you please add a configuration for Maven 3.1?
Comment 7 Thanh Ha CLA 2013-08-17 07:57:34 EDT
(In reply to comment #6)
> Maven needs to be configured.
> >>
> Hudson needs to know where your Maven 2/3 is installed.
> Please do so from the system configuration.
> <<
> 
> But when going to system configuration I get 
> >>
> marcel.bruch@codetrails.com is missing the Administer permission
> <<
> 
> Could you please add a configuration for Maven 3.1?

Fixed.

The default HIPP image only had Maven configured for the "Maven 3" Hudson plugin but I guess this kind job needed the Maven 2 (Legacy) plugin configured as well. I added Maven 3.1.0 to both plugins and the error is now longer appearing.
Comment 8 Marcel Bruch CLA 2013-08-17 09:02:45 EDT
Thanks for installing Maven 3.1. Unfortunately, the build fails now with an exception [1] similar to the one mentioned in [2]. The solution in [2] was to go back to Maven 3.0.5. I'm sorry, but I've no access rights to do more testing on this myself.


[1] https://hudson.eclipse.org/recommenders/job/recommenders-master-kepler/3/console
[2] http://stackoverflow.com/questions/17388851/jenkins-unable-to-run-maven
Comment 9 Thanh Ha CLA 2013-08-17 12:23:49 EDT
(In reply to comment #8)
> Thanks for installing Maven 3.1. Unfortunately, the build fails now with an
> exception [1] similar to the one mentioned in [2]. The solution in [2] was
> to go back to Maven 3.0.5. I'm sorry, but I've no access rights to do more
> testing on this myself.
> 
> 
> [1]
> https://hudson.eclipse.org/recommenders/job/recommenders-master-kepler/3/
> console
> [2] http://stackoverflow.com/questions/17388851/jenkins-unable-to-run-maven


I created a test job can copied your settings over [1]. I used a Freestyle job type instead of the "Build a Maven 2/3 project (Legacy)" job type so that I could easily switch between the maven 3.0.5 and maven 3.1.0 installs that's available on the system.

I can confirm that it appears to fail to build with 3.1.0 but works with 3.0.5. I guess there is a problem with using the newer version of Maven in Hudson, I found a Jenkin's bug report [2] where they resolved this issue though. I guess we need to open a bug against Hudson to pull in this fix too.


My job with 3.0.5 fails on building one of the tests though but I'm not sure if it's due to hudson configuration or if it's code [3].


[1] https://hudson.eclipse.org/recommenders/job/thanh-test/
[2] https://issues.jenkins-ci.org/browse/JENKINS-15935
[3] https://hudson.eclipse.org/recommenders/job/thanh-test/3/console
Comment 10 Marcel Bruch CLA 2013-08-18 05:00:26 EDT
(In reply to comment #9)
> My job with 3.0.5 fails on building one of the tests though but I'm not sure
> if it's due to hudson configuration or if it's code [3].

Thanks. It works almost now. I enabled Xvnc which solves this part of the problem. No tycho has trouble to connect to the started rcp app. Can you check whether Xvnc is configured correctly? The tycho build works on hudson, hudson-sandbox, and our jenkins. That's why I assume it's a configuration issue with the HIPP.
Comment 11 Thanh Ha CLA 2013-08-18 10:30:59 EDT
(In reply to comment #10)
> (In reply to comment #9)
> > My job with 3.0.5 fails on building one of the tests though but I'm not sure
> > if it's due to hudson configuration or if it's code [3].
> 
> Thanks. It works almost now. I enabled Xvnc which solves this part of the
> problem. No tycho has trouble to connect to the started rcp app. Can you
> check whether Xvnc is configured correctly? The tycho build works on hudson,
> hudson-sandbox, and our jenkins. That's why I assume it's a configuration
> issue with the HIPP.

Fixed. The Xvnc plugin was missing a setting "Xvnc :$DISPLAY_NUMBER -geometry 1024x768 -depth 24 -ac" which I copied over from the sandbox instance. I ran your new job and it successfully completed this time.
Comment 12 Marcel Bruch CLA 2013-08-18 11:02:32 EDT
Cool! Thank you!
Comment 13 Marcel Bruch CLA 2013-08-18 12:41:16 EDT
Gerrit Trigger works nicely. We've our core jobs running on the HIPP now.

Question: Can we have "Promoted Builds Plugin" for our HIPP?
Comment 14 Marcel Bruch CLA 2013-08-18 13:53:27 EDT
A "legal" question:

Can we use the HIPP to build GSOC projects hosted on Github?

Their code is not IP checked (yet), so we wouldn't announce the downloads publicly but building and testing them would be a big improvement for us.
Comment 15 Thanh Ha CLA 2013-08-19 09:54:40 EDT
(In reply to comment #14)
> A "legal" question:
> 
> Can we use the HIPP to build GSOC projects hosted on Github?
> 
> Their code is not IP checked (yet), so we wouldn't announce the downloads
> publicly but building and testing them would be a big improvement for us.

Adding Wayne since I don't know about this.
Comment 16 Thanh Ha CLA 2013-08-19 10:08:04 EDT
(In reply to comment #13)
> Gerrit Trigger works nicely. We've our core jobs running on the HIPP now.
> 
> Question: Can we have "Promoted Builds Plugin" for our HIPP?

I added this plugin and restarted Hudson. I haven't configured it before though so I'm not sure if I need to do anything additionally but let me know if I do.
Comment 17 Marcel Bruch CLA 2013-08-21 15:06:42 EDT
Hey guys, it's a lot more fun having your own HIPP than running your jobs on the big hudson. Thank you guys!
Comment 18 Andreas Sewe CLA 2013-08-22 09:28:02 EDT
Question: Can we have "Checkstyle Plugin" [1] for our HIPP?

[1] <http://wiki.hudson-ci.org/display/HUDSON/Checkstyle+Plugin>
Comment 19 Thanh Ha CLA 2013-08-22 09:56:46 EDT
(In reply to comment #18)
> Question: Can we have "Checkstyle Plugin" [1] for our HIPP?
> 
> [1] <http://wiki.hudson-ci.org/display/HUDSON/Checkstyle+Plugin>

Yes, I installed the plugin and restarted your instance.
Comment 20 Wayne Beaton CLA 2013-08-22 10:07:37 EDT
(In reply to comment #14)
> A "legal" question:
> 
> Can we use the HIPP to build GSOC projects hosted on Github?

No. 

> Their code is not IP checked (yet), so we wouldn't announce the downloads
> publicly but building and testing them would be a big improvement for us.

The build server is a bit of an IP grey area. We permit things like build and test dependencies there because the work happens behind a firewall and the dependencies involved are not publicly accessible. Since the output of the build is publicly accessible and constitutes "distribution", only IP cleared eclipse.org code can actually be built.

Why not move this code into the Recommender's incubator?
Comment 21 Andreas Sewe CLA 2013-08-22 12:00:46 EDT
We have a problem with our HIPP instance:

Starting xvnc
[workspace] $ Xvnc :10 -geometry 1024x768 -depth 24 -ac
[INFO] Using Maven 3 installation: Maven 3.0.5
[INFO] Checking Maven 3 installation environment

Fatal server error:
Server is already active for display 10
	If this server is no longer running, remove /tmp/.X10-lock
	and start again.

It seems like the X server (a "real" one or Xvfb?) didn't shut down after the last build job. Since I can't see a way to solve this ourselves, can you please have a look, as it is blocking our Gerrit job [1]?

[1] <https://hudson.eclipse.org/recommenders/job/gerrit.master.kepler/>
Comment 22 Thanh Ha CLA 2013-08-22 13:15:25 EDT
(In reply to comment #21)

Can you try again?

I think what happened is your job executed at the same time as another job from another HIPP instance and they both started the X display at number 10. I had thought the Hudson Xvnc would pick the next available number if it's not available but perhaps it only does this for it's own instance.

I've changed your X display base number to 20 so it should no longer conflict.

Moving forward I think we will need to track which HIPP instances have which X display base number and ensure they don't overlap.
Comment 23 Marcel Bruch CLA 2013-08-22 15:34:24 EDT
The last build completed successfully.
Comment 24 Marcel Bruch CLA 2013-08-27 17:25:41 EDT
Q: What do I have to do to give hudson write access to /home/data/httpd/download.eclipse.org/recommenders.incubator too?

I expected that our Hudson user can also write to this folder but I get a permission denied. Is our hudson user a member of technology.recommenders.incubator group?

Thanks,
Marcel

mbruch@build:/home/data/httpd/download.eclipse.org/recommenders.incubator/updates> getfacl .
# file: .
# owner: mbruch
# group: technology.recommenders.incubator
# flags: -s-
user::rwx
group::rwx
other::r-x
Comment 25 Thanh Ha CLA 2013-08-27 17:50:19 EDT
(In reply to comment #24)
> Q: What do I have to do to give hudson write access to
> /home/data/httpd/download.eclipse.org/recommenders.incubator too?
> 

The HIPP user wasn't part of this group. I just added the user to the group so it should work now. Let me know if it doesn't.
Comment 26 Marcel Bruch CLA 2013-08-27 19:09:22 EDT
Unfortunately it's not yet working: https://hudson.eclipse.org/recommenders/job/codesearch.origin.master/7/promotion/head/lastFailed/


You can run the job yourself and see if the "auto promote after the build" copies the file to the incubator folder.
Comment 27 Thanh Ha CLA 2013-08-28 09:25:39 EDT
(In reply to comment #26)
> Unfortunately it's not yet working:
> https://hudson.eclipse.org/recommenders/job/codesearch.origin.master/7/
> promotion/head/lastFailed/
> 
> 
> You can run the job yourself and see if the "auto promote after the build"
> copies the file to the incubator folder.

Fixed, I needed to restart the HIPP instance for it to take effect. Looks like it works now but there was failure on chmod for the "head" directory.

https://hudson.eclipse.org/recommenders/job/codesearch.origin.master/8/promotion/head/promotionBuild/6/


I guess it's because the owner is not the Hudson instance user. Should I change the owner for this directory?