[Geoserver-devel] [JIRA] (GEOS-7841) Geoserver should work with a read-only data_dir/

Julien Cigar created an issue

GeoServer / WishGEOS-7841

Geoserver should work with a read-only data_dir/

Issue Type:

WishWish

Affects Versions:

2.10.0

Assignee:

Unassigned

Components:

Global

Created:

08/Nov/16 3:20 PM

Environment:

Geoserver 2.10.0, FreeBSD, jails, NFS4, OpenJDK8

Priority:

MediumMedium

Reporter:

Julien Cigar

Hello,

I’d like to setup some HA (active/passive) on our current Geoserver installation. For that I have configured two Geoserver instances in two FreeBSD jails: java1.prod.lan is the ACTIVE instance and java2.prod.lan is the PASSIVE instance. The two instances share the same data_dir, accessible through /filer/geoserver/data_dir which is a ZFS FS exported through NFS. To avoid possible corruption the shared data_dir is mounted read-only on the PASSIVE instance, but unfortunately it doesn’t work (fall back to embedded data directory) because of the following code:

https://github.com/geoserver/geoserver/blob/master/src/platform/src/main/java/org/geoserver/platform/GeoServerResourceLoader.java#L591-L665

The problematic code is:

 if (!fh.canWrite()) {
   LOGGER.warning(msgPrefix + " , which is not writeable");
   continue;

My goal was to add stores, layers, etc on the ACTIVE node and then just log-in on the PASSIVE node and reload the catalog …

So my question is: why does Geoserver absolutely needs a writable data_dir/ for a read-only instance ?

FYT this is the full log when I start the PASSIVE node: https://gist.github.com/silenius/f37e391e448d8fa3f9a6f88dac37e53a

Thanks,
Julien

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.526.0#100018-sha1:e9d616c)

Atlassian logo