Jenkins and ZFS on Linux and FreeBSD

79 views
Skip to first unread message

Craig Rodrigues

unread,
Nov 5, 2015, 5:55:21 AM11/5/15
to jenkin...@googlegroups.com
On slide 37, he mentioned ZFS on Linux.

In the Jenkins core, code there is code to access ZFS functionality
in libzfs.  From the pom.xml, there is this:

   <dependency>
      <groupId>org.jvnet.libzfs</groupId>
      <artifactId>libzfs</artifactId>
      <version>0.5</version>
    </dependency>

and in the jenkins core code there is:

./src/main/java/hudson/os/solaris/ZFSProvisioner.java
./src/main/java/hudson/os/solaris/ZFSInstaller.java

It looks like the ZFS functionality is unavailable by default on all platforms
except for Solaris due to this code:

https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/os/solaris/ZFSInstaller.java#L99

    private boolean shouldBeActive() {
        if(!System.getProperty("os.name").equals("SunOS") || disabled)
            // on systems that don't have ZFS, we don't need this monitor
            return false;
.
.
.
/** * Escape hatch in case JNI calls fatally crash, like in HUDSON-3733. */ public static boolean disabled = Boolean.getBoolean(ZFSInstaller.class.getName()+".disabled");


I tested booted a SmartOS (Illumos) image and ran Jenkins under it, and
saw that ZFS functionality was enabled by default.

So, when you ran this stuff, under Linux, did you hack the above code
so that it would work with ZFS on Linux, or did you start Jenkins
with the hudson.os.solaris.ZFSInstaller.disabled System property set to false
when starting the JVM on Linux?

With OpenZFS, ZFS is now available on other platforms besides Solaris
(such as FreeBSD), so I'd like to get this working on something besides Solaris.

Thanks.

--
Craig




Reply all
Reply to author
Forward
0 new messages