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

Avoid failure when the readlink command is executed against AIX #547

Closed
wants to merge 1 commit into from

Conversation

scarytom
Copy link

Avoid failure when the readlink command is executed against an unsupported architecture, like AIX. This is a stopgap measure that attempts to get AIX/HP-UX systems working again, pending proper fixes to issues JENKINS-13614 JENKINS-14021 JENKINS-13241 and JENKINS-13202

https://issues.jenkins-ci.org/browse/JENKINS-13614
https://issues.jenkins-ci.org/browse/JENKINS-14021
https://issues.jenkins-ci.org/browse/JENKINS-13241
https://issues.jenkins-ci.org/browse/JENKINS-13202

…orted architecture, like AIX. This is a stopgap measure that attempts to get AIX/HP-UX systems working again, pending proper fixes to issues JENKINS-13614 JENKINS-14021 JENKINS-13241 and JENKINS-13202
@jglick
Copy link
Member

jglick commented Aug 24, 2012

You forgot createSymlink.

I would rather suggest making Util use the proper NIO.2 calls (such as Files.createSymbolicLink) when running on Java 7+, since both AIX and HP-UX appear to offer Java 7 implementations.

@scarytom
Copy link
Author

The createSymlink method appears to be wrapped in a try/catch for IOException already.

I'm not too familiar with the Jenkins codebase, so forgive my ignorance, but what mechanism does Jenkins employ to detect a Java 7 runtime, and how do you invoke Java 7 code whilst retaining the ability to compile on a 1.6 jdk? Do you invoke dynamically, or do you only support compilation on Java 7?

Aside from that, I'd really like to get this "stop-gap" patch in, with a view to looking at the NIO stuff on another patch, as a longer term solution. We simply cannot use Jenkins on AIX at the moment, because we can't archive artifacts... It's just broken. This patch gets us going again, which takes the heat off a bit.

@jglick
Copy link
Member

jglick commented Aug 27, 2012

I do not think changing the behavior of resolveSymlink is a good idea; if it succeeds, it should return a String or null, and if it fails, it should throw IOException. I do not see any up-to-date stack traces e.g. from JENKINS-13614 but from JENKINS-13241 I am guessing that it is the nested classes in DirScanner that are the problem: if their calls to resolveSymlink fail with an IOException, they should just use visit rather than visitSymlink. Other callers of resolveSymlink may want to handle the failure differently. (Defining a subtype of IOException for this purpose might be wise.)

Regarding Java 7+ APIs: they would have to be invoked via reflection as Jenkins is intended to be buildable with 6+.

@scarytom
Copy link
Author

It is clear to me that a quick-and-dirty fix to relieve pressure on the growing number of "major" and "blocker" issues is not appropriate. I have already wasted more of your time in this discussion that it would take you to fix this properly, so I'm going to back away and join the queue of people awaiting a fix allowing Jenkins to be used on AIX and HP-UX systems again.

Thanks, Tom.

@scarytom scarytom closed this Aug 28, 2012
@jglick
Copy link
Member

jglick commented Sep 6, 2012

f50316b ought to have made DirScanner behave more gracefully, if not correctly. I have no way of testing changes on either AIX or HP-UX so your cooperation would be appreciated (discuss in JENKINS-13202).

@scarytom
Copy link
Author

scarytom commented Sep 7, 2012

Thanks, any idea when these changes will make it into a Jenkins release?

@jglick
Copy link
Member

jglick commented Sep 7, 2012

f50316b will be in 1.482 I think. #559 could be in 1.482 or soon thereafter, depending on comments. If you have the means to test Jenkins tip sources and/or #559 tip sources on the affected operating systems and give early feedback, that would be great.

@scarytom
Copy link
Author

scarytom commented Sep 9, 2012

I don't really have a means to test tip sources on our AIX boxes, but rest assured we will upgrade as soon as 1.482 is available.

@ChrisGWarp
Copy link

Woo Hoo! 1.482 has resolved my issues. My (known to be good) builds are now back to being marked as a success!

@jglick
Copy link
Member

jglick commented Sep 19, 2012

@ChrisGWarp: 1.482 has only the basic workaround for lack of symlink support; 1.483 has the full fix (actual symlink support), so please retest with that too when it is released.

@ChrisGWarp
Copy link

Cool. I will keep my eye out for it.
Also, regarding your comment above about AIX amd java 7. Whilst it may be available, I am running Jenkins in WAS 6.1 (java 1.5) so upgrading is a whole lot bigger than just changing JREs.
-Chris

@jglick
Copy link
Member

jglick commented Sep 20, 2012

@ChrisGWarp: in that case 1.483 should not behave any differently for you, since the full fix is only enabled for 7+.

@jglick
Copy link
Member

jglick commented Sep 20, 2012

@ChrisGWarp: also you may want to review the thread “[VOTE] Bump Jenkins to Java 6” on the dev list.

@ChrisGWarp
Copy link

1.483 and 1.484 are fine. This is under WAS 6.1 (JDK 1.5) on AIX 5.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants