Skip to content

Commit

Permalink
Merge pull request #108 from italiangrid/release/1.11.15
Browse files Browse the repository at this point in the history
Release v1.11.15
  • Loading branch information
enricovianello authored Feb 25, 2019
2 parents 66f221a + 6cf2a83 commit 30c0e53
Show file tree
Hide file tree
Showing 67 changed files with 1,604 additions and 7,721 deletions.
625 changes: 168 additions & 457 deletions etc/init.d/storm-backend-server

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions etc/logging.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

<appender name="METRICS"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${storm.log.dir}/storm-backend-metrics.log</File>
<File>/var/log/storm/storm-backend-metrics.log</File>

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${storm.log.dir}/storm-backend-metrics-%d{yyyy-MM-dd}.log.gz
<FileNamePattern>/var/log/storm/storm-backend-metrics-%d{yyyy-MM-dd}.log.gz
</FileNamePattern>
<MaxHistory>90</MaxHistory>
</rollingPolicy>
Expand All @@ -18,10 +18,10 @@
</appender>
<appender name="PROCESS"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${storm.log.dir}/storm-backend.log</File>
<File>/var/log/storm/storm-backend.log</File>

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${storm.log.dir}/storm-backend-%d{yyyy-MM-dd}.log.gz
<FileNamePattern>/var/log/storm/storm-backend-%d{yyyy-MM-dd}.log.gz
</FileNamePattern>
<MaxHistory>90</MaxHistory>
</rollingPolicy>
Expand All @@ -34,10 +34,10 @@

<appender name="HEARTBEAT"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${storm.log.dir}/heartbeat.log</File>
<File>/var/log/storm/heartbeat.log</File>

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${storm.log.dir}/heartbeat-%d{yyyy-MM-dd}.log.gz
<FileNamePattern>/var/log/storm/heartbeat-%d{yyyy-MM-dd}.log.gz
</FileNamePattern>
<!-- keep 365 days' worth of history -->
<!-- <MaxHistory>365</MaxHistory> -->
Expand All @@ -50,10 +50,10 @@

<appender name="BOOKKEEPING"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${storm.log.dir}/bookkeeping.log</File>
<File>/var/log/storm/bookkeeping.log</File>

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>${storm.log.dir}/bookkeeping-%d{yyyy-MM-dd}.log.gz
<FileNamePattern>/var/log/storm/bookkeeping-%d{yyyy-MM-dd}.log.gz
</FileNamePattern>
<!-- keep 365 days' worth of history -->
<!-- <MaxHistory>365</MaxHistory> -->
Expand Down
52 changes: 29 additions & 23 deletions etc/storm.properties.template
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# storm.properties
# version 1.0
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
###########################
# storm.properties
###########################
#
# This file contains properties that govern the operation of StoRM.
# The file is read at startup of the service.
# The file is read at startup of the service.
# Your changes will be applied when the service will be restarted.
#
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

############################

############################
### SERVICE PARAMETERS ###
############################
##
## NOTE:
##
## NOTE:
## The SERVICE PARAMETERS are managed also by YAIM.
## So, if you install and configure the service with YAIM, please
## remember that the parameters tagged as YAIM will be overwrite at every
## reconfiguration done with YAIM, so if you want change some parameters
## you should use the YAIM configuration files:
## <siteinfo_dir>/services/ig-se_storm_backend (or equivalent)
##
##

# ============================
# StoRM Service DNS
# ============================
# ============================
# hostname with which the service is published
# <!! managed by YAIM; please read the above NOTE !!>
storm.service.FE-public.hostname =
storm.service.FE-public.hostname =


# ============================
Expand Down Expand Up @@ -78,16 +76,6 @@ storm.service.request-db.host =
storm.service.request-db.username =
storm.service.request-db.passwd =


# ===========================
# Gridhttps plugin parameters
# ===========================

# If the GridHTTPS is enabled StoRM provides access to files via http and https protocol
gridhttps.enabled=false
#The complete classname of the class implementing the http(s) plugin interface
gridhttps.plugin.classname=it.grid.storm.httpsHTTPSPluginInterfaceStub

#############################################
############ PROFILE PARAMETERS ############
#############################################
Expand Down Expand Up @@ -194,7 +182,7 @@ synchcall.directoryManager.maxLsEntry=2000
# ============================
# REST Services parameter
# ============================
storm.rest.services.port=
storm.rest.services.port=9998
storm.rest.services.maxthreads=100
storm.rest.services.max_queue_size=1000

Expand Down Expand Up @@ -276,3 +264,21 @@ transit.delay = 10

# Skip ACL setup for PtG requests
ptg.skip-acl-setup = false

# The caching policy for successful name lookups from the name service.
# The value is specified as integer to indicate the number of seconds to cache the successful lookup.
# A value of -1 indicates "cache forever". The default behavior is to cache forever when a security
# manager is installed, and to cache for an implementation specific period of time, when a security
# manager is not installed.
#
# Default value: 0
#
#networkaddress.cache.ttl=0

# The caching policy for un-successful name lookups from the name service.
# The value is specified as integer to indicate the number of seconds to cache the failure for un-successful lookups.
# A value of 0 indicates "never cache". A value of -1 indicates "cache forever".
#
# Default value: 0
#
#networkaddress.cache.negative.ttl=0
20 changes: 17 additions & 3 deletions etc/sysconfig/storm-backend-server
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,26 @@ STORM_BE_USER=storm
# BUG: maybe code reads this from storm.properties, not from here...
#STORM_BE_TMPDIR="$STORM_HOME/var/tmp"

# StoRM Backend server debug option. Uncomment this (and restart the service)
# if you want to attach a java debugger to the running server process
# STORM_BE_DEBUG="y"

# JVM debug port. Used together with STORM_BE_DEBUG to specify on which
# port the JVM should listen for incoming debugger.
# STORM_BE_DEBUG_PORT=1044

# JVM debug suspend option. Uncomment this to block the process JVM until a remote
# debugger connects to the debugging port specified with the STORM_BE_DEBUG_PORT
# option
# STORM_BE_DEBUG_SUSPEND="y"

# StoRM Backend server jmx option. Uncomment this (and restart the service)
# if you want to attach a java jmx monitor to the running server process
# STORM_BE_JMX="y"

# options for the JVM running the StoRM BE server
STORM_BE_JVM_OPTS='-server -Xms512m -Xmx512m'

# port for the command server (FIXME: should read from conf. file)
#export STORM_COMMAND_PORT=4444

# LCMAPS config file
#export LCMAPS_DB_FILE="$STORM_BE_CONFIGDIR/lcmaps.db"

Expand Down
74 changes: 1 addition & 73 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>StoRM Backend server</name>
<groupId>org.italiangrid.storm</groupId>
<artifactId>storm-backend-server</artifactId>
<version>1.11.15-SNAPSHOT</version>
<version>1.11.15</version>

<properties>

Expand All @@ -21,12 +21,9 @@
<commonsDbcpVersion>1.2.1</commonsDbcpVersion>
<commonsIoVersion>2.0.1</commonsIoVersion>
<ini4jVersion>0.5.2</ini4jVersion>
<axisVersion>1.4</axisVersion>
<axisSchemaVersion>1.3</axisSchemaVersion>
<xmlrpcVersion>3.0</xmlrpcVersion>
<jaxrpcVersion>1.1</jaxrpcVersion>
<jsonVersion>20080701</jsonVersion>
<cogGlobusVersion>1.4</cogGlobusVersion>
<junitVersion>4.8.1</junitVersion>
<commonsCliVersion>1.0</commonsCliVersion>
<commonsDiscoveryVersion>0.2</commonsDiscoveryVersion>
Expand Down Expand Up @@ -394,17 +391,6 @@
<version>${ini4jVersion}</version>
</dependency>

<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>${axisVersion}</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-schema</artifactId>
<version>${axisSchemaVersion}</version>
</dependency>

<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-server</artifactId>
Expand All @@ -428,64 +414,6 @@
<version>${jsonVersion}</version>
</dependency>

<!-- not on Maven Central, we have it on our own repository, you can install
it from official releases http://dev.globus.org/wiki/CoG_JGlobus_1.4. The artifacts
not prefix with cog are dependencies. As all of them are very old, and not supported,
we have installed the versions distributed with CoG, with the CoG version and groupID -->
<dependency>
<groupId>org.globus</groupId>
<artifactId>cog-axis</artifactId>
<version>${cogGlobusVersion}</version>
</dependency>
<dependency>
<groupId>org.globus</groupId>
<artifactId>cog-jglobus</artifactId>
<version>${cogGlobusVersion}</version>
</dependency>
<dependency>
<groupId>org.globus</groupId>
<artifactId>cog-jobmanager</artifactId>
<version>${cogGlobusVersion}</version>
</dependency>
<dependency>
<groupId>org.globus</groupId>
<artifactId>cog-url</artifactId>
<version>${cogGlobusVersion}</version>
</dependency>
<dependency>
<groupId>org.globus</groupId>
<artifactId>cryptix-asn1</artifactId>
<version>${cogGlobusVersion}</version>
</dependency>
<dependency>
<groupId>org.globus</groupId>
<artifactId>cryptix32</artifactId>
<version>${cogGlobusVersion}</version>
</dependency>
<dependency>
<groupId>org.globus</groupId>
<artifactId>puretls</artifactId>
<version>${cogGlobusVersion}</version>
</dependency>
<dependency>
<groupId>org.globus</groupId>
<artifactId>jgss</artifactId>
<version>${cogGlobusVersion}</version>
</dependency>
<dependency>
<groupId>org.globus</groupId>
<artifactId>jce-jdk13-131</artifactId>
<version>${cogGlobusVersion}</version>
</dependency>

<!-- not on Maven Central, we have it on our own repository, taken form the lib
directory of the old src code repository https://github.com/italiangrid/storm/commits/BE_1.11/lib/srm22client.jar -->
<dependency>
<groupId>srm22client</groupId>
<artifactId>srm22client</artifactId>
<version>0</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
33 changes: 33 additions & 0 deletions src/main/java/it/grid/storm/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package it.grid.storm;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Main {

private static final Logger log = LoggerFactory.getLogger(Main.class);

private Main() {}

public static void main(String[] args) {

Thread.setDefaultUncaughtExceptionHandler(new StoRMDefaultUncaughtExceptionHandler());

StoRM storm = new StoRM();

Runtime.getRuntime().addShutdownHook(new ShutdownHook(storm));

if (storm.startServices()) {

log.info("StoRM: Backend services successfully started.");

} else {

log.error("StoRM: error starting storm services.");

storm.stopServices();

Runtime.getRuntime().exit(1);
}
}
}
42 changes: 42 additions & 0 deletions src/main/java/it/grid/storm/ShutdownHook.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package it.grid.storm;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import it.grid.storm.space.gpfsquota.GPFSQuotaManager;

public class ShutdownHook extends Thread {

private static final Logger log = LoggerFactory.getLogger(ShutdownHook.class);

private StoRM storm;

public ShutdownHook(StoRM storm) {
this.storm = storm;
}

@Override
public void run() {

log.info("StoRM: Backend shutdown...");
log.info("StoRM: stopping Backend services...");

try {
storm.stopPicker();
storm.stopXmlRpcServer();
storm.stopRestServer();
storm.stopSpaceGC();
storm.stopExpiredAgent();
GPFSQuotaManager.INSTANCE.shutdown();

log.info("StoRM: Backend successfully stopped.");

} catch (Throwable e) {

log.error(e.getMessage(), e);
log.error("StoRM: error stopping storm services.");
}

log.info("StoRM: Backend shutdown complete.");
}
}
Loading

0 comments on commit 30c0e53

Please sign in to comment.