# PaCkAgE DaTaStReAm
dCache 1 128689
# end of header
07070100204b3c000081a4000000650000000a000000014ad73234000000a4000000b600010008ffffffffffffffff0000000f00000000dCache/pkginfo PKG=dCache
NAME=dCache Server
ARCH=all
VERSION=1.9.5-3
CATEGORY=application
VENDOR="dCache.ORG"
EMAIL=support@dcache.org
PSTAMP="dCache.ORG"
BASEDIR=/
CLASSES=none
07070100204b3b000081a4000000650000000a000000014ad7323400007843000000b600010008ffffffffffffffff0000000e00000000dCache/pkgmap : 1 128689
1 d none opt 0755 root bin
1 d none opt/d-cache 0755 root bin
1 d none opt/d-cache/billing 0755 root bin
1 f none opt/d-cache/billing/README 0644 root bin 0 0 1255617074
1 d none opt/d-cache/bin 0755 root bin
1 f none opt/d-cache/bin/dCacheConfigure.sh 0755 root bin 5471 24369 1255617074
1 f none opt/d-cache/bin/dcache 0755 root bin 16710 30832 1255617074
1 f none opt/d-cache/bin/dcache-srm 0755 root bin 2979 25795 1255617074
1 f none opt/d-cache/bin/meta2yaml 0755 root bin 2720 22317 1255617074
1 d none opt/d-cache/classes 0755 root bin
1 d none opt/d-cache/classes/activemq 0755 root bin
1 f none opt/d-cache/classes/activemq/activemq-all-5.2.0.jar 0644 root bin 2631190 270 1255617058
1 f none opt/d-cache/classes/activemq/xbean-spring-3.4.jar 0644 root bin 130203 35021 1255617058
1 d none opt/d-cache/classes/axis 0755 root bin
1 f none opt/d-cache/classes/axis/axis-ant.jar 0644 root bin 33514 37176 1255617058
1 f none opt/d-cache/classes/axis/axis-schema.jar 0644 root bin 203807 29767 1255617058
1 f none opt/d-cache/classes/axis/axis.jar 0644 root bin 1632995 37294 1255617058
1 f none opt/d-cache/classes/axis/commons-discovery-0.2.jar 0644 root bin 71442 54573 1255617058
1 f none opt/d-cache/classes/axis/commons-logging-1.0.4.jar 0644 root bin 38015 22754 1255617058
1 f none opt/d-cache/classes/axis/jaxrpc.jar 0644 root bin 32062 17584 1255617058
1 f none opt/d-cache/classes/axis/saaj.jar 0644 root bin 19419 39008 1255617058
1 f none opt/d-cache/classes/axis/wsdl4j-1.5.1.jar 0644 root bin 126771 43198 1255617058
1 d none opt/d-cache/classes/berkeleyDB 0755 root bin
1 f none opt/d-cache/classes/berkeleyDB/je-3.2.76.jar 0644 root bin 1157968 35564 1255617058
1 f none opt/d-cache/classes/cells-protocols.jar 0644 root bin 3938 56251 1255617058
1 f none opt/d-cache/classes/cells.jar 0644 root bin 1093266 9205 1255617022
1 d none opt/d-cache/classes/chimera 0755 root bin
1 f none opt/d-cache/classes/chimera/chimera-core.jar 0644 root bin 135794 65030 1255617057
1 f none opt/d-cache/classes/chimera/commons-cli-1.0.jar 0644 root bin 30117 43413 1255617057
1 f none opt/d-cache/classes/chimera/commons-logging.jar 0644 root bin 31605 9482 1255617057
1 f none opt/d-cache/classes/chimera/grizzly-rpc.jar 0644 root bin 1410750 15443 1255617057
1 f none opt/d-cache/classes/chimera/oncrpc.jar 0644 root bin 85191 64553 1255617057
1 f none opt/d-cache/classes/chimera/portmap.jar 0644 root bin 91131 48069 1255617057
1 d none opt/d-cache/classes/cog 0755 root bin
1 f none opt/d-cache/classes/cog/cog-axis.jar 0644 root bin 31064 7031 1255617059
1 f none opt/d-cache/classes/cog/cog-jglobus-1.7.0.jar 0644 root bin 723795 35309 1255617059
1 f none opt/d-cache/classes/cog/cog-jobmanager-1.7.0.jar 0644 root bin 60229 59952 1255617059
1 f none opt/d-cache/classes/cog/cog-tomcat.jar 0644 root bin 23037 15845 1255617058
1 f none opt/d-cache/classes/cog/cog-url-1.7.0.jar 0644 root bin 2994 29845 1255617059
1 f none opt/d-cache/classes/cog/commons-logging-1.1.jar 0644 root bin 52915 39510 1255617058
1 f none opt/d-cache/classes/cog/cryptix-asn1.jar 0644 root bin 80392 4768 1255617058
1 f none opt/d-cache/classes/cog/cryptix.jar 0644 root bin 3608 6492 1255617059
1 f none opt/d-cache/classes/cog/cryptix32.jar 0644 root bin 366279 59239 1255617058
1 f none opt/d-cache/classes/cog/jgss.jar 0644 root bin 6567 63641 1255617058
1 f none opt/d-cache/classes/cog/puretls.jar 0644 root bin 191354 20670 1255617058
1 d none opt/d-cache/classes/dbcp 0755 root bin
1 f none opt/d-cache/classes/dbcp/c3p0-0.9.1.2.jar 0644 root bin 610790 21287 1255617058
1 f none opt/d-cache/classes/dcache-common.jar 0644 root bin 35675 47417 1255617016
1 f none opt/d-cache/classes/dcache.jar 0644 root bin 3162645 61923 1255617057
1 d none opt/d-cache/classes/endorsed 0755 root bin
1 f none opt/d-cache/classes/endorsed/xercesImpl-2.9.1.jar 0644 root bin 1229289 36377 1255617058
1 f none opt/d-cache/classes/endorsed/xml-apis-2.9.1.jar 0644 root bin 194354 28089 1255617058
1 f none opt/d-cache/classes/extern.classpath 0644 root bin 4765 58917 1255617074
1 d none opt/d-cache/classes/glite 0755 root bin
1 f none opt/d-cache/classes/glite/glite-security-trustmanager-1.8.16-1.norefresh.jar 0644 root bin 40737 30196 1255617058
1 f none opt/d-cache/classes/glite/glite-security-util-java.jar 0644 root bin 61580 52105 1255617058
1 f none opt/d-cache/classes/glite/vomsjapi.jar 0644 root bin 125920 765 1255617058
1 d none opt/d-cache/classes/glue 0755 root bin
1 f none opt/d-cache/classes/glue/GLUE-STD.jar 0644 root bin 633873 40260 1255617059
1 f none opt/d-cache/classes/glue/collections.jar 0644 root bin 259265 9277 1255617059
1 f none opt/d-cache/classes/glue/dom.jar 0644 root bin 13407 7806 1255617059
1 f none opt/d-cache/classes/glue/jcert.jar 0644 root bin 7637 22349 1255617059
1 f none opt/d-cache/classes/glue/jnet.jar 0644 root bin 3098 55989 1255617059
1 f none opt/d-cache/classes/glue/jsse.jar 0644 root bin 463471 53806 1255617059
1 f none opt/d-cache/classes/glue/servlet.jar 0644 root bin 40809 25019 1255617059
1 d none opt/d-cache/classes/gplazma 0755 root bin
1 f none opt/d-cache/classes/gplazma/activation.jar 0644 root bin 82297 56192 1255617059
1 f none opt/d-cache/classes/gplazma/alldepends.jar 0644 root bin 6357 5783 1255617059
1 f none opt/d-cache/classes/gplazma/anam.jar 0644 root bin 23593 19233 1255617059
1 f none opt/d-cache/classes/gplazma/gplazma.jar 0644 root bin 78802 37195 1255617023
1 f none opt/d-cache/classes/gplazma/mail.jar 0644 root bin 327603 65312 1255617059
1 f none opt/d-cache/classes/gplazma/privilege-1.0.1.5.jar 0644 root bin 70472 48610 1255617059
1 f none opt/d-cache/classes/gplazma/privilege-xacml-2.2.5.jar 0644 root bin 69937 56121 1255617059
1 d none opt/d-cache/classes/grizzly-nio 0755 root bin
1 f none opt/d-cache/classes/grizzly-nio/grizzly-nio-framework-1.9.19-SNAPSHOT.jar 0644 root bin 678371 64358 1255617063
1 f none opt/d-cache/classes/infoDynamicSE.jar 0644 root bin 30664 26777 1255617073
1 f none opt/d-cache/classes/javatunnel.jar 0644 root bin 30507 8569 1255617074
1 d none opt/d-cache/classes/jdbc-drivers 0755 root bin
1 f none opt/d-cache/classes/jdbc-drivers/commons-dbcp.jar 0644 root bin 107465 58992 1255617058
1 f none opt/d-cache/classes/jdbc-drivers/commons-pool.jar 0644 root bin 43080 21038 1255617058
1 f none opt/d-cache/classes/jdbc-drivers/postgresql-8.4-701.jdbc3.jar 0644 root bin 472831 64122 1255617058
1 d none opt/d-cache/classes/jdom 0755 root bin
1 f none opt/d-cache/classes/jdom/jdom.jar 0644 root bin 150794 3608 1255617059
1 d none opt/d-cache/classes/jline 0755 root bin
1 f none opt/d-cache/classes/jline/jline-0.9.92.jar 0644 root bin 87401 43959 1255617022
1 d none opt/d-cache/classes/jpox 0755 root bin
1 f none opt/d-cache/classes/jpox/jdo2-api-2.0.jar 0644 root bin 82512 65465 1255617059
1 f none opt/d-cache/classes/jpox/jpox-core-1.2.2.jar 0644 root bin 1503051 53163 1255617059
1 f none opt/d-cache/classes/jpox/jpox-rdbms-1.2.2.jar 0644 root bin 914243 11084 1255617059
1 d none opt/d-cache/classes/log4j 0755 root bin
1 f none opt/d-cache/classes/log4j/log4j-1.2.15.jar 0644 root bin 391834 57359 1255617058
1 d none opt/d-cache/classes/netty 0755 root bin
1 f none opt/d-cache/classes/netty/netty-3.1.2.GA.jar 0644 root bin 700665 45534 1255617058
1 d none opt/d-cache/classes/opensaml 0755 root bin
1 f none opt/d-cache/classes/opensaml/commons-collections-3.1.jar 0644 root bin 559366 32653 1255617058
1 f none opt/d-cache/classes/opensaml/commons-lang-2.1.jar 0644 root bin 207723 21772 1255617058
1 f none opt/d-cache/classes/opensaml/joda-time-1.5.2.jar 0644 root bin 531326 61821 1255617058
1 f none opt/d-cache/classes/opensaml/opensaml-1.0.1.jar 0644 root bin 105026 47615 1255617058
1 f none opt/d-cache/classes/opensaml/opensaml-2.2.0.jar 0644 root bin 1242124 14330 1255617058
1 f none opt/d-cache/classes/opensaml/openws-1.1.0.jar 0644 root bin 121144 62104 1255617058
1 f none opt/d-cache/classes/opensaml/velocity-1.5.jar 0644 root bin 392124 47990 1255617058
1 f none opt/d-cache/classes/opensaml/xalan-2.6.0.jar 0644 root bin 3149655 60052 1255617058
1 f none opt/d-cache/classes/opensaml/xml-security-1.4.1.jar 0644 root bin 415492 20711 1255617058
1 f none opt/d-cache/classes/opensaml/xmltooling-1.0.1.jar 0644 root bin 553805 34591 1255617058
1 d none opt/d-cache/classes/rrd4j 0755 root bin
1 f none opt/d-cache/classes/rrd4j/convertor-2.0.5.jar 0644 root bin 2501 64572 1255617059
1 f none opt/d-cache/classes/rrd4j/inspector-2.0.5.jar 0644 root bin 41703 39956 1255617059
1 f none opt/d-cache/classes/rrd4j/je.jar 0644 root bin 781019 40217 1255617059
1 f none opt/d-cache/classes/rrd4j/rrd4j-2.0.5.jar 0644 root bin 262626 42710 1255617059
1 d none opt/d-cache/classes/saxon 0755 root bin
1 f none opt/d-cache/classes/saxon/saxon.jar 0644 root bin 572551 52204 1255617063
1 d none opt/d-cache/classes/security 0755 root bin
1 f none opt/d-cache/classes/security/bcprov-jdk15-143.jar 0644 root bin 1632822 16952 1255617059
1 d none opt/d-cache/classes/slf4j 0755 root bin
1 f none opt/d-cache/classes/slf4j/slf4j-api-1.5.8.jar 0644 root bin 23445 243 1255617058
1 f none opt/d-cache/classes/slf4j/slf4j-log4j12-1.5.8.jar 0644 root bin 9679 38544 1255617058
1 d none opt/d-cache/classes/smc 0755 root bin
1 f none opt/d-cache/classes/smc/statemap.jar 0644 root bin 3854 23710 1255617058
1 d none opt/d-cache/classes/spring 0755 root bin
1 f none opt/d-cache/classes/spring/spring-beans.jar 0644 root bin 488068 34113 1255617058
1 f none opt/d-cache/classes/spring/spring-context.jar 0644 root bin 476894 56713 1255617058
1 f none opt/d-cache/classes/spring/spring-core.jar 0644 root bin 285603 38613 1255617058
1 f none opt/d-cache/classes/srm-tomcat.jar 0644 root bin 1409 48951 1255617029
1 f none opt/d-cache/classes/srm.jar 0644 root bin 988502 16610 1255617029
1 d none opt/d-cache/classes/terapaths 0755 root bin
1 f none opt/d-cache/classes/terapaths/FastInfoset.jar 0644 root bin 593190 1562 1255617059
1 f none opt/d-cache/classes/terapaths/activation.jar 0644 root bin 44623 53526 1255617059
1 f none opt/d-cache/classes/terapaths/jax-qname.jar 0644 root bin 7700 41183 1255617059
1 f none opt/d-cache/classes/terapaths/jaxp-api.jar 0644 root bin 217152 27469 1255617059
1 f none opt/d-cache/classes/terapaths/jaxrpc-api.jar 0644 root bin 57375 32308 1255617059
1 f none opt/d-cache/classes/terapaths/jaxrpc-impl.jar 0644 root bin 5566952 29876 1255617059
1 f none opt/d-cache/classes/terapaths/jaxrpc-spi.jar 0644 root bin 40820 13404 1255617059
1 f none opt/d-cache/classes/terapaths/jsr173_api.jar 0644 root bin 49672 52972 1255617059
1 f none opt/d-cache/classes/terapaths/mail.jar 0644 root bin 270394 64436 1255617059
1 f none opt/d-cache/classes/terapaths/relaxngDatatype.jar 0644 root bin 31204 33209 1255617059
1 f none opt/d-cache/classes/terapaths/saaj-api.jar 0644 root bin 36298 26215 1255617059
1 f none opt/d-cache/classes/terapaths/saaj-impl.jar 0644 root bin 618186 47200 1255617059
1 f none opt/d-cache/classes/terapaths/terapathsExampleJavaClient.jar 0644 root bin 150333 30659 1255617059
1 f none opt/d-cache/classes/terapaths/xsdlib.jar 0644 root bin 476636 10587 1255617059
1 d none opt/d-cache/classes/toplink 0755 root bin
1 f none opt/d-cache/classes/toplink/toplink-essentials.jar 0644 root bin 2461878 64656 1255617058
1 f none opt/d-cache/classes/xrootd-tokenauthz.jar 0644 root bin 330297 19717 1255617072
1 d none opt/d-cache/config 0755 root bin
1 f none opt/d-cache/config/JHRM.map 0644 root bin 2391 64201 1255617058
1 f none opt/d-cache/config/PoolManager.conf 0644 root bin 2913 53287 1255617057
1 f none opt/d-cache/config/adminDoor.batch 0644 root bin 1739 18070 1255617057
1 f none opt/d-cache/config/authdoor.batch 0644 root bin 1409 44445 1255617057
1 f none opt/d-cache/config/c3p0.properties 0644 root bin 132 11659 1255617058
1 f none opt/d-cache/config/chimera-config.xml 0644 root bin 521 41490 1255617057
1 f none opt/d-cache/config/chimera.batch 0644 root bin 3054 63209 1255617057
1 f none opt/d-cache/config/dCache.batch 0644 root bin 2650 30814 1255617057
1 f none opt/d-cache/config/dir.batch 0644 root bin 489 42483 1255617057
1 f none opt/d-cache/config/door.batch 0644 root bin 1804 12275 1255617057
1 f none opt/d-cache/config/gPlazma.batch 0644 root bin 1300 44406 1255617058
1 f none opt/d-cache/config/gridftpdoor.batch 0644 root bin 4601 55310 1255617058
1 f none opt/d-cache/config/gsidcapdoor.batch 0644 root bin 2785 34803 1255617058
1 f none opt/d-cache/config/httpd.batch 0644 root bin 6531 28093 1255617057
1 f none opt/d-cache/config/httpdoor.batch 0644 root bin 1024 16738 1255617058
1 f none opt/d-cache/config/info.batch 0644 root bin 695 58592 1255617057
1 f none opt/d-cache/config/infoProvider.batch 0644 root bin 1178 26159 1255617057
1 f none opt/d-cache/config/lm.batch 0644 root bin 543 47983 1255617057
1 f none opt/d-cache/config/lm.config 0644 root bin 264 21733 1255617057
1 f none opt/d-cache/config/log4j.properties 0644 root bin 2956 5919 1255617058
1 f none opt/d-cache/config/nfsv41.batch 0644 root bin 745 64821 1255617057
1 f none opt/d-cache/config/permission.fragment 0644 root bin 1599 14778 1255617057
1 f none opt/d-cache/config/pnfs.batch 0644 root bin 5062 44282 1255617057
1 f none opt/d-cache/config/pool.batch 0644 root bin 3232 23154 1255617057
1 f none opt/d-cache/config/replica.batch 0644 root bin 2807 37061 1255617057
1 f none opt/d-cache/config/setup.temp 0644 root bin 1119 29769 1255617057
1 f none opt/d-cache/config/srm.batch 0644 root bin 19293 39121 1255617058
1 f none opt/d-cache/config/stage.fragment 0644 root bin 513 46820 1255617057
1 f none opt/d-cache/config/statistics.batch 0644 root bin 685 58603 1255617057
1 f none opt/d-cache/config/tunnel.fragment 0644 root bin 1466 246 1255617057
1 d none opt/d-cache/config/users 0755 root bin
1 d none opt/d-cache/config/users/acls 0755 root bin
1 d none opt/d-cache/config/users/meta 0755 root bin
1 d none opt/d-cache/config/users/relations 0755 root bin
1 f none opt/d-cache/config/utility.batch 0644 root bin 2817 29642 1255617057
1 f none opt/d-cache/config/xrootdDoor.batch 0644 root bin 1137 36464 1255617057
1 d none opt/d-cache/docs 0755 root bin
1 d none opt/d-cache/docs/images 0755 root bin
1 f none opt/d-cache/docs/images/area.gif 0644 root bin 521 2416 1255617057
1 f none opt/d-cache/docs/images/bg-home.jpg 0644 root bin 5507 3144 1255617057
1 f none opt/d-cache/docs/images/bg.jpg 0644 root bin 31768 63713 1255617067
1 f none opt/d-cache/docs/images/birdline.gif 0644 root bin 545 3533 1255617057
1 f none opt/d-cache/docs/images/bluebox.gif 0644 root bin 378 49374 1255617057
1 f none opt/d-cache/docs/images/cian.gif 0644 root bin 378 49837 1255617057
1 f none opt/d-cache/docs/images/dCache-web-bg-logo.svg 0644 root bin 571312 15612 1255617057
1 f none opt/d-cache/docs/images/dark-grey.gif 0644 root bin 378 49799 1255617057
1 f none opt/d-cache/docs/images/dark-tabaco.gif 0644 root bin 378 49896 1255617057
1 f none opt/d-cache/docs/images/desy_logo.gif 0644 root bin 843 39562 1255617057
1 f none opt/d-cache/docs/images/desy_logo_trans.gif 0644 root bin 800 34998 1255617057
1 f none opt/d-cache/docs/images/dev_trans.gif 0644 root bin 2903 64770 1255617057
1 f none opt/d-cache/docs/images/developer.gif 0644 root bin 2890 3597 1255617057
1 f none opt/d-cache/docs/images/documentation.gif 0644 root bin 1154 19113 1255617057
1 f none opt/d-cache/docs/images/download.gif 0644 root bin 956 57584 1255617057
1 f none opt/d-cache/docs/images/eagle-grey.gif 0644 root bin 1665 22826 1255617057
1 f none opt/d-cache/docs/images/eagle-main.gif 0644 root bin 5434 21190 1255617057
1 f none opt/d-cache/docs/images/eagle_logo.gif 0644 root bin 1935 55315 1255617057
1 f none opt/d-cache/docs/images/eagle_logo_draft.gif 0644 root bin 2839 37709 1255617057
1 f none opt/d-cache/docs/images/eaglebw.gif 0644 root bin 1053 27702 1255617057
1 f none opt/d-cache/docs/images/eaglered.gif 0644 root bin 233 28455 1255617057
1 f none opt/d-cache/docs/images/eagleredtrans.gif 0644 root bin 241 28592 1255617057
1 f none opt/d-cache/docs/images/eurogate.gif 0644 root bin 3010 30069 1255617057
1 f none opt/d-cache/docs/images/eurogatetrans.gif 0644 root bin 1800 39230 1255617057
1 f none opt/d-cache/docs/images/eurogatetranssmall.gif 0644 root bin 1184 24465 1255617057
1 f none opt/d-cache/docs/images/fermi_logo.gif 0644 root bin 428 55068 1255617057
1 f none opt/d-cache/docs/images/fermi_logo_trans.gif 0644 root bin 436 55301 1255617057
1 f none opt/d-cache/docs/images/greenbox.gif 0644 root bin 378 49200 1255617057
1 f none opt/d-cache/docs/images/large001.gif 0644 root bin 1876 3849 1255617057
1 f none opt/d-cache/docs/images/line.gif 0644 root bin 261 32561 1255617057
1 f none opt/d-cache/docs/images/navybox.gif 0644 root bin 378 49251 1255617057
1 f none opt/d-cache/docs/images/new-green.gif 0644 root bin 378 49951 1255617057
1 f none opt/d-cache/docs/images/new01.gif 0644 root bin 1016 8100 1255617057
1 f none opt/d-cache/docs/images/newsletter.gif 0644 root bin 1810 36245 1255617057
1 f none opt/d-cache/docs/images/orangebox.gif 0644 root bin 378 49247 1255617057
1 f none opt/d-cache/docs/images/p2001.gif 0644 root bin 516 64695 1255617057
1 f none opt/d-cache/docs/images/pMarch.gif 0644 root bin 669 19396 1255617057
1 f none opt/d-cache/docs/images/pMay.gif 0644 root bin 527 1776 1255617057
1 f none opt/d-cache/docs/images/pnfslogo1.gif 0644 root bin 2652 31204 1255617057
1 f none opt/d-cache/docs/images/pnfslogotrans.gif 0644 root bin 1734 14849 1255617057
1 f none opt/d-cache/docs/images/rateDist.gif 0644 root bin 3053 58062 1255617057
1 f none opt/d-cache/docs/images/redbox.gif 0644 root bin 378 49973 1255617057
1 f none opt/d-cache/docs/images/s_top_tux.gif 0644 root bin 1041 46334 1255617057
1 f none opt/d-cache/docs/images/sgi.gif 0644 root bin 498 58351 1255617057
1 f none opt/d-cache/docs/images/sorry.gif 0644 root bin 6080 33470 1255617057
1 f none opt/d-cache/docs/images/sunlogo.gif 0644 root bin 1131 1606 1255617057
1 f none opt/d-cache/docs/images/tabaco.gif 0644 root bin 378 50051 1255617057
1 f none opt/d-cache/docs/images/trudex.gif 0644 root bin 16155 34318 1255617057
1 f none opt/d-cache/docs/images/trudey.gif 0644 root bin 8570 50880 1255617057
1 f none opt/d-cache/docs/images/tux.gif 0644 root bin 849 20141 1255617057
1 f none opt/d-cache/docs/images/violet.gif 0644 root bin 378 50129 1255617057
1 f none opt/d-cache/docs/images/yellowbox.gif 0644 root bin 378 49455 1255617057
1 d none opt/d-cache/docs/scripts 0755 root bin
1 d none opt/d-cache/docs/scripts/sorting 0755 root bin
1 f none opt/d-cache/docs/scripts/sorting/common.js 0644 root bin 2801 42094 1255617057
1 f none opt/d-cache/docs/scripts/sorting/css.js 0644 root bin 4449 32944 1255617057
1 f none opt/d-cache/docs/scripts/sorting/standardista-table-sorting.js 0644 root bin 12147 54760 1255617057
1 d none opt/d-cache/docs/skins 0755 root bin
1 f none opt/d-cache/docs/skins/home-skin-basic.html 0644 root bin 7039 59349 1255617057
1 f none opt/d-cache/docs/statisticsHelp.html 0644 root bin 3499 37274 1255617057
1 d none opt/d-cache/docs/styles 0755 root bin
1 f none opt/d-cache/docs/styles/billing.css 0644 root bin 451 36577 1255617057
1 f none opt/d-cache/docs/styles/common.css 0644 root bin 605 46877 1255617057
1 f none opt/d-cache/docs/styles/doors.css 0644 root bin 647 50026 1255617057
1 f none opt/d-cache/docs/styles/poolinfo.css 0644 root bin 1373 45658 1255617057
1 f none opt/d-cache/docs/styles/queueInfo.css 0644 root bin 244 18823 1255617057
1 f none opt/d-cache/docs/styles/restoreHandler.css 0644 root bin 281 22417 1255617057
1 f none opt/d-cache/docs/styles/transfers.css 0644 root bin 176 14589 1255617057
1 f none opt/d-cache/docs/styles/usageInfo.css 0644 root bin 555 46140 1255617057
1 d none opt/d-cache/etc 0755 root bin
1 f none opt/d-cache/etc/dCacheSetup.template 0644 root bin 41533 2429 1255617074
1 f none opt/d-cache/etc/dcache.kpwd.template 0644 root bin 1799 13989 1255617074
1 f none opt/d-cache/etc/dcachesrm-gplazma.policy 0644 root bin 3502 20410 1255617074
1 f none opt/d-cache/etc/glue-1.3.xml.template 0644 root bin 23169 63292 1255617074
1 f none opt/d-cache/etc/keystore.template 0644 root bin 169 13237 1255617074
1 f none opt/d-cache/etc/logConfig.xml 0644 root bin 4638 48147 1255617074
1 f none opt/d-cache/etc/node_config.template 0644 root bin 1729 10598 1255617074
1 f none opt/d-cache/etc/pool_path.template 0644 root bin 48 3683 1255617074
1 f none opt/d-cache/etc/psql_drop_companion.sql 0644 root bin 22 1730 1255617074
1 f none opt/d-cache/etc/psql_drop_dcache.sql 0644 root bin 782 435 1255617074
1 f none opt/d-cache/etc/psql_drop_replicas.sql 0644 root bin 110 8448 1255617074
1 f none opt/d-cache/etc/psql_install_companion.sql 0644 root bin 224 16798 1255617074
1 f none opt/d-cache/etc/psql_install_replicas.sql 0644 root bin 6347 30304 1255617074
1 f none opt/d-cache/etc/psql_upgrade_replicas.sql 0644 root bin 3855 34249 1255617074
1 f none opt/d-cache/etc/srm_setup.env 0644 root bin 1273 37977 1255617074
1 f none opt/d-cache/etc/srmv1-deploy.wsdd 0644 root bin 11887 40465 1255617038
1 f none opt/d-cache/etc/srmv2.2-deploy.wsdd 0644 root bin 74833 6553 1255617038
1 d none opt/d-cache/external 0755 root bin
1 f none opt/d-cache/external/apache-tomcat-5.5.20.tar.gz 0644 root bin 5949295 7569 1255617030
1 f none opt/d-cache/external/axis-1_3.tar.gz 0644 root bin 8498273 46141 1255617038
1 d none opt/d-cache/install 0755 root bin
1 f none opt/d-cache/install/deploy_srmv2.sh 0755 root bin 20288 47603 1255617038
1 f none opt/d-cache/install/install.sh 0755 root bin 26848 21717 1255617074
1 f none opt/d-cache/install/upgrade_space_manager_schema.sh 0755 root bin 379 31940 1255617038
1 d none opt/d-cache/jobs 0755 root bin
1 f none opt/d-cache/jobs/encp.sh 0755 root bin 4536 2227 1255617057
1 f none opt/d-cache/jobs/generic.lib.sh 0755 root bin 5444 16170 1255617057
1 f none opt/d-cache/jobs/hsmcp.rb 0755 root bin 3125 49133 1255617057
1 f none opt/d-cache/jobs/hsmcp.sh 0755 root bin 3498 60829 1255617057
1 f none opt/d-cache/jobs/hsmcpV4.sh 0755 root bin 7584 38051 1255617057
1 f none opt/d-cache/jobs/infoDynamicSE-plugin-dcache 0755 root bin 1018 9010 1255617058
1 f none opt/d-cache/jobs/infoDynamicSE-provider-dcache 0755 root bin 1018 9166 1255617058
1 f none opt/d-cache/jobs/initPackage.sh 0755 root bin 4405 57485 1255617057
1 f none opt/d-cache/jobs/needFulThings.sh 0755 root bin 7163 36191 1255617057
1 f none opt/d-cache/jobs/wrapper2.sh 0755 root bin 5936 28637 1255617057
1 d none opt/d-cache/libexec 0755 root bin
1 f none opt/d-cache/libexec/README 0644 root bin 0 0 1255617074
1 d none opt/d-cache/libexec/chimera 0755 root bin
1 f none opt/d-cache/libexec/chimera/chimera-cli.sh 0755 root bin 437 37539 1255617058
1 f none opt/d-cache/libexec/chimera/chimera-get-acl.sh 0755 root bin 302 26762 1255617058
1 f none opt/d-cache/libexec/chimera/chimera-nfs-run.sh 0755 root bin 3343 61182 1255617058
1 f none opt/d-cache/libexec/chimera/chimera-nfs-run.xml 0644 root bin 2685 23828 1255617058
1 f none opt/d-cache/libexec/chimera/chimera-set-acl.sh 0755 root bin 302 26774 1255617058
1 d none opt/d-cache/libexec/chimera/sql 0755 root bin
1 f none opt/d-cache/libexec/chimera/sql/add-timezone.sql 0644 root bin 2148 52309 1255617058
1 f none opt/d-cache/libexec/chimera/sql/addACLtoChimeraDB.sql 0644 root bin 528 38275 1255617058
1 f none opt/d-cache/libexec/chimera/sql/cacheinfo-pgs.sql 0644 root bin 302 23053 1255617058
1 f none opt/d-cache/libexec/chimera/sql/cacheinfo.sql 0644 root bin 205 14348 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create-dCacheACL.sql 0644 root bin 460 33857 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create-db2.sql 0644 root bin 9084 37365 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create-hsqldb.sql 0644 root bin 8730 24044 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create-oracle.sql 0644 root bin 9278 50366 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create.sql 0644 root bin 10694 56800 1255617058
1 f none opt/d-cache/libexec/chimera/sql/migrate-2-1.9.3.sql 0644 root bin 799 563 1255617058
1 f none opt/d-cache/libexec/chimera/sql/pgsql-procedures.sql 0644 root bin 4661 61571 1255617058
1 f none opt/d-cache/libexec/chimera/sql/pnfsid-mapping.sql 0644 root bin 105 7613 1255617058
1 f none opt/d-cache/libexec/chimera/sql/top_dir.sql 0644 root bin 251 18353 1255617058
1 f none opt/d-cache/libexec/chimera/sql/transaction-loggin-pg.sql 0644 root bin 2867 62292 1255617058
1 d none opt/d-cache/libexec/infoProvider 0755 root bin
1 f none opt/d-cache/libexec/infoProvider/info-based-infoProvider.sh 0644 root bin 3580 33196 1255617074
1 f none opt/d-cache/libexec/infoprovidercms.rb 0644 root bin 5213 9626 1255617074
1 f none opt/d-cache/libexec/nsp-performance.sh 0644 root bin 537 44692 1255617074
1 f none opt/d-cache/libexec/wait-for-cells.sh 0644 root bin 2972 31602 1255617074
1 d none opt/d-cache/share 0755 root bin
1 d none opt/d-cache/share/dCacheConfigure 0755 root bin
1 d none opt/d-cache/share/dCacheConfigure/modules 0755 root bin
1 f none opt/d-cache/share/dCacheConfigure/modules/config_bdii_only 0644 root bin 1818 4940 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_gip_dcache 0644 root bin 25771 48197 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_gip_dcache_info 0644 root bin 8564 61094 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_gip_only 0644 root bin 3562 18254 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_pgsql 0644 root bin 15591 1657 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_sechimera 0644 root bin 13419 48203 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_sedcache 0644 root bin 64083 5365 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_sepnfs 0644 root bin 19005 24682 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/reset_srm 0644 root bin 360 29961 1255617074
1 d none opt/d-cache/share/dCacheConfigure/utils 0755 root bin
1 f none opt/d-cache/share/dCacheConfigure/utils/central_certs 0644 root bin 334 26463 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/check_users_conf_format 0644 root bin 343 26610 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/config_file 0644 root bin 10130 27520 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/cron_job 0644 root bin 1306 34915 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/requires 0644 root bin 881 3229 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/run 0644 root bin 494 31815 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/set_mysql_passwd 0644 root bin 811 64521 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/split_quoted_variable 0644 root bin 185 13331 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/userhandling 0644 root bin 8436 27442 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getfirstpoolaccount 0644 root bin 447 33384 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getprduser 0644 root bin 517 40838 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getsgmuser 0644 root bin 517 40842 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getspecialusers 0644 root bin 676 53587 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getvogroup 0644 root bin 558 44770 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getvoprefix 0644 root bin 627 50089 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/yaimlog 0644 root bin 1095 12055 1255617074
1 d none opt/d-cache/share/dcache 0755 root bin
1 d none opt/d-cache/share/dcache/sh 0755 root bin
1 d none opt/d-cache/share/doc 0755 root bin
1 f none opt/d-cache/share/doc/README-GLUE 0644 root bin 9571 60807 1255617074
1 d none opt/d-cache/share/doc/dCacheConfigure 0755 root bin
1 d none opt/d-cache/share/doc/dCacheConfigure/examples 0755 root bin
1 f none opt/d-cache/share/doc/dCacheConfigure/examples/site-info.def 0644 root bin 21968 5981 1255617074
1 f none opt/d-cache/share/doc/dCacheConfigure/examples/users.conf 0644 root bin 77890 20414 1255617074
1 f none opt/d-cache/share/doc/dCacheConfigure/users.conf.README 0644 root bin 2938 52601 1255617074
1 d none opt/d-cache/share/doc/xylophone 0755 root bin
1 f none opt/d-cache/share/doc/xylophone/Guide.txt 0644 root bin 44872 29496 1255617074
1 f none opt/d-cache/share/doc/xylophone/dynamic.xml 0644 root bin 554 43566 1255617074
1 f none opt/d-cache/share/doc/xylophone/hello-world.xml 0644 root bin 581 46502 1255617074
1 d none opt/d-cache/share/lib 0755 root bin
1 f none opt/d-cache/share/lib/config.sed 0644 root bin 1289 39148 1255617074
1 f none opt/d-cache/share/lib/config.sh 0644 root bin 1467 41293 1255617074
1 f none opt/d-cache/share/lib/daemon 0644 root bin 2472 52788 1255617074
1 f none opt/d-cache/share/lib/namespace.sh 0644 root bin 2842 17403 1255617074
1 f none opt/d-cache/share/lib/paths.sh 0644 root bin 657 45268 1255617074
1 f none opt/d-cache/share/lib/pool.sh 0644 root bin 9194 35059 1255617074
1 f none opt/d-cache/share/lib/services.sh 0644 root bin 11489 48784 1255617074
1 f none opt/d-cache/share/lib/utils.sh 0644 root bin 3995 17697 1255617074
1 d none opt/d-cache/share/man 0755 root bin
1 d none opt/d-cache/share/man/man8 0755 root bin
1 f none opt/d-cache/share/man/man8/dcache.8 0644 root bin 8754 61545 1255617074
1 d none opt/d-cache/share/xml 0755 root bin
1 d none opt/d-cache/share/xml/xslt 0755 root bin
1 f none opt/d-cache/share/xml/xslt/wait-for-cells.xsl 0644 root bin 4610 52734 1255617074
1 d none opt/d-cache/share/xml/xylophone 0755 root bin
1 d none opt/d-cache/share/xml/xylophone/xsl 0755 root bin
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-import.xsl 0644 root bin 5064 5889 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-map.xsl 0644 root bin 9561 54461 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-markup.xsl 0644 root bin 8587 24867 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-output.xsl 0644 root bin 4706 46233 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-path.xsl 0644 root bin 6205 34007 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-predicate.xsl 0644 root bin 6777 13290 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-publish.xsl 0644 root bin 28791 13891 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-user-elements.xsl 0644 root bin 16976 3712 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone.xsl 0644 root bin 4289 15908 1255617074
1 i pkginfo 164 12763 1255617076
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!! 07070100204b3c000081a4000000650000000a000000014ad73234000000a4000000b600010008ffffffffffffffff0000000800000000pkginfo PKG=dCache
NAME=dCache Server
ARCH=all
VERSION=1.9.5-3
CATEGORY=application
VENDOR="dCache.ORG"
EMAIL=support@dcache.org
PSTAMP="dCache.ORG"
BASEDIR=/
CLASSES=none
07070100204b3b000081a4000000650000000a000000014ad7323400007843000000b600010008ffffffffffffffff0000000700000000pkgmap : 1 128689
1 d none opt 0755 root bin
1 d none opt/d-cache 0755 root bin
1 d none opt/d-cache/billing 0755 root bin
1 f none opt/d-cache/billing/README 0644 root bin 0 0 1255617074
1 d none opt/d-cache/bin 0755 root bin
1 f none opt/d-cache/bin/dCacheConfigure.sh 0755 root bin 5471 24369 1255617074
1 f none opt/d-cache/bin/dcache 0755 root bin 16710 30832 1255617074
1 f none opt/d-cache/bin/dcache-srm 0755 root bin 2979 25795 1255617074
1 f none opt/d-cache/bin/meta2yaml 0755 root bin 2720 22317 1255617074
1 d none opt/d-cache/classes 0755 root bin
1 d none opt/d-cache/classes/activemq 0755 root bin
1 f none opt/d-cache/classes/activemq/activemq-all-5.2.0.jar 0644 root bin 2631190 270 1255617058
1 f none opt/d-cache/classes/activemq/xbean-spring-3.4.jar 0644 root bin 130203 35021 1255617058
1 d none opt/d-cache/classes/axis 0755 root bin
1 f none opt/d-cache/classes/axis/axis-ant.jar 0644 root bin 33514 37176 1255617058
1 f none opt/d-cache/classes/axis/axis-schema.jar 0644 root bin 203807 29767 1255617058
1 f none opt/d-cache/classes/axis/axis.jar 0644 root bin 1632995 37294 1255617058
1 f none opt/d-cache/classes/axis/commons-discovery-0.2.jar 0644 root bin 71442 54573 1255617058
1 f none opt/d-cache/classes/axis/commons-logging-1.0.4.jar 0644 root bin 38015 22754 1255617058
1 f none opt/d-cache/classes/axis/jaxrpc.jar 0644 root bin 32062 17584 1255617058
1 f none opt/d-cache/classes/axis/saaj.jar 0644 root bin 19419 39008 1255617058
1 f none opt/d-cache/classes/axis/wsdl4j-1.5.1.jar 0644 root bin 126771 43198 1255617058
1 d none opt/d-cache/classes/berkeleyDB 0755 root bin
1 f none opt/d-cache/classes/berkeleyDB/je-3.2.76.jar 0644 root bin 1157968 35564 1255617058
1 f none opt/d-cache/classes/cells-protocols.jar 0644 root bin 3938 56251 1255617058
1 f none opt/d-cache/classes/cells.jar 0644 root bin 1093266 9205 1255617022
1 d none opt/d-cache/classes/chimera 0755 root bin
1 f none opt/d-cache/classes/chimera/chimera-core.jar 0644 root bin 135794 65030 1255617057
1 f none opt/d-cache/classes/chimera/commons-cli-1.0.jar 0644 root bin 30117 43413 1255617057
1 f none opt/d-cache/classes/chimera/commons-logging.jar 0644 root bin 31605 9482 1255617057
1 f none opt/d-cache/classes/chimera/grizzly-rpc.jar 0644 root bin 1410750 15443 1255617057
1 f none opt/d-cache/classes/chimera/oncrpc.jar 0644 root bin 85191 64553 1255617057
1 f none opt/d-cache/classes/chimera/portmap.jar 0644 root bin 91131 48069 1255617057
1 d none opt/d-cache/classes/cog 0755 root bin
1 f none opt/d-cache/classes/cog/cog-axis.jar 0644 root bin 31064 7031 1255617059
1 f none opt/d-cache/classes/cog/cog-jglobus-1.7.0.jar 0644 root bin 723795 35309 1255617059
1 f none opt/d-cache/classes/cog/cog-jobmanager-1.7.0.jar 0644 root bin 60229 59952 1255617059
1 f none opt/d-cache/classes/cog/cog-tomcat.jar 0644 root bin 23037 15845 1255617058
1 f none opt/d-cache/classes/cog/cog-url-1.7.0.jar 0644 root bin 2994 29845 1255617059
1 f none opt/d-cache/classes/cog/commons-logging-1.1.jar 0644 root bin 52915 39510 1255617058
1 f none opt/d-cache/classes/cog/cryptix-asn1.jar 0644 root bin 80392 4768 1255617058
1 f none opt/d-cache/classes/cog/cryptix.jar 0644 root bin 3608 6492 1255617059
1 f none opt/d-cache/classes/cog/cryptix32.jar 0644 root bin 366279 59239 1255617058
1 f none opt/d-cache/classes/cog/jgss.jar 0644 root bin 6567 63641 1255617058
1 f none opt/d-cache/classes/cog/puretls.jar 0644 root bin 191354 20670 1255617058
1 d none opt/d-cache/classes/dbcp 0755 root bin
1 f none opt/d-cache/classes/dbcp/c3p0-0.9.1.2.jar 0644 root bin 610790 21287 1255617058
1 f none opt/d-cache/classes/dcache-common.jar 0644 root bin 35675 47417 1255617016
1 f none opt/d-cache/classes/dcache.jar 0644 root bin 3162645 61923 1255617057
1 d none opt/d-cache/classes/endorsed 0755 root bin
1 f none opt/d-cache/classes/endorsed/xercesImpl-2.9.1.jar 0644 root bin 1229289 36377 1255617058
1 f none opt/d-cache/classes/endorsed/xml-apis-2.9.1.jar 0644 root bin 194354 28089 1255617058
1 f none opt/d-cache/classes/extern.classpath 0644 root bin 4765 58917 1255617074
1 d none opt/d-cache/classes/glite 0755 root bin
1 f none opt/d-cache/classes/glite/glite-security-trustmanager-1.8.16-1.norefresh.jar 0644 root bin 40737 30196 1255617058
1 f none opt/d-cache/classes/glite/glite-security-util-java.jar 0644 root bin 61580 52105 1255617058
1 f none opt/d-cache/classes/glite/vomsjapi.jar 0644 root bin 125920 765 1255617058
1 d none opt/d-cache/classes/glue 0755 root bin
1 f none opt/d-cache/classes/glue/GLUE-STD.jar 0644 root bin 633873 40260 1255617059
1 f none opt/d-cache/classes/glue/collections.jar 0644 root bin 259265 9277 1255617059
1 f none opt/d-cache/classes/glue/dom.jar 0644 root bin 13407 7806 1255617059
1 f none opt/d-cache/classes/glue/jcert.jar 0644 root bin 7637 22349 1255617059
1 f none opt/d-cache/classes/glue/jnet.jar 0644 root bin 3098 55989 1255617059
1 f none opt/d-cache/classes/glue/jsse.jar 0644 root bin 463471 53806 1255617059
1 f none opt/d-cache/classes/glue/servlet.jar 0644 root bin 40809 25019 1255617059
1 d none opt/d-cache/classes/gplazma 0755 root bin
1 f none opt/d-cache/classes/gplazma/activation.jar 0644 root bin 82297 56192 1255617059
1 f none opt/d-cache/classes/gplazma/alldepends.jar 0644 root bin 6357 5783 1255617059
1 f none opt/d-cache/classes/gplazma/anam.jar 0644 root bin 23593 19233 1255617059
1 f none opt/d-cache/classes/gplazma/gplazma.jar 0644 root bin 78802 37195 1255617023
1 f none opt/d-cache/classes/gplazma/mail.jar 0644 root bin 327603 65312 1255617059
1 f none opt/d-cache/classes/gplazma/privilege-1.0.1.5.jar 0644 root bin 70472 48610 1255617059
1 f none opt/d-cache/classes/gplazma/privilege-xacml-2.2.5.jar 0644 root bin 69937 56121 1255617059
1 d none opt/d-cache/classes/grizzly-nio 0755 root bin
1 f none opt/d-cache/classes/grizzly-nio/grizzly-nio-framework-1.9.19-SNAPSHOT.jar 0644 root bin 678371 64358 1255617063
1 f none opt/d-cache/classes/infoDynamicSE.jar 0644 root bin 30664 26777 1255617073
1 f none opt/d-cache/classes/javatunnel.jar 0644 root bin 30507 8569 1255617074
1 d none opt/d-cache/classes/jdbc-drivers 0755 root bin
1 f none opt/d-cache/classes/jdbc-drivers/commons-dbcp.jar 0644 root bin 107465 58992 1255617058
1 f none opt/d-cache/classes/jdbc-drivers/commons-pool.jar 0644 root bin 43080 21038 1255617058
1 f none opt/d-cache/classes/jdbc-drivers/postgresql-8.4-701.jdbc3.jar 0644 root bin 472831 64122 1255617058
1 d none opt/d-cache/classes/jdom 0755 root bin
1 f none opt/d-cache/classes/jdom/jdom.jar 0644 root bin 150794 3608 1255617059
1 d none opt/d-cache/classes/jline 0755 root bin
1 f none opt/d-cache/classes/jline/jline-0.9.92.jar 0644 root bin 87401 43959 1255617022
1 d none opt/d-cache/classes/jpox 0755 root bin
1 f none opt/d-cache/classes/jpox/jdo2-api-2.0.jar 0644 root bin 82512 65465 1255617059
1 f none opt/d-cache/classes/jpox/jpox-core-1.2.2.jar 0644 root bin 1503051 53163 1255617059
1 f none opt/d-cache/classes/jpox/jpox-rdbms-1.2.2.jar 0644 root bin 914243 11084 1255617059
1 d none opt/d-cache/classes/log4j 0755 root bin
1 f none opt/d-cache/classes/log4j/log4j-1.2.15.jar 0644 root bin 391834 57359 1255617058
1 d none opt/d-cache/classes/netty 0755 root bin
1 f none opt/d-cache/classes/netty/netty-3.1.2.GA.jar 0644 root bin 700665 45534 1255617058
1 d none opt/d-cache/classes/opensaml 0755 root bin
1 f none opt/d-cache/classes/opensaml/commons-collections-3.1.jar 0644 root bin 559366 32653 1255617058
1 f none opt/d-cache/classes/opensaml/commons-lang-2.1.jar 0644 root bin 207723 21772 1255617058
1 f none opt/d-cache/classes/opensaml/joda-time-1.5.2.jar 0644 root bin 531326 61821 1255617058
1 f none opt/d-cache/classes/opensaml/opensaml-1.0.1.jar 0644 root bin 105026 47615 1255617058
1 f none opt/d-cache/classes/opensaml/opensaml-2.2.0.jar 0644 root bin 1242124 14330 1255617058
1 f none opt/d-cache/classes/opensaml/openws-1.1.0.jar 0644 root bin 121144 62104 1255617058
1 f none opt/d-cache/classes/opensaml/velocity-1.5.jar 0644 root bin 392124 47990 1255617058
1 f none opt/d-cache/classes/opensaml/xalan-2.6.0.jar 0644 root bin 3149655 60052 1255617058
1 f none opt/d-cache/classes/opensaml/xml-security-1.4.1.jar 0644 root bin 415492 20711 1255617058
1 f none opt/d-cache/classes/opensaml/xmltooling-1.0.1.jar 0644 root bin 553805 34591 1255617058
1 d none opt/d-cache/classes/rrd4j 0755 root bin
1 f none opt/d-cache/classes/rrd4j/convertor-2.0.5.jar 0644 root bin 2501 64572 1255617059
1 f none opt/d-cache/classes/rrd4j/inspector-2.0.5.jar 0644 root bin 41703 39956 1255617059
1 f none opt/d-cache/classes/rrd4j/je.jar 0644 root bin 781019 40217 1255617059
1 f none opt/d-cache/classes/rrd4j/rrd4j-2.0.5.jar 0644 root bin 262626 42710 1255617059
1 d none opt/d-cache/classes/saxon 0755 root bin
1 f none opt/d-cache/classes/saxon/saxon.jar 0644 root bin 572551 52204 1255617063
1 d none opt/d-cache/classes/security 0755 root bin
1 f none opt/d-cache/classes/security/bcprov-jdk15-143.jar 0644 root bin 1632822 16952 1255617059
1 d none opt/d-cache/classes/slf4j 0755 root bin
1 f none opt/d-cache/classes/slf4j/slf4j-api-1.5.8.jar 0644 root bin 23445 243 1255617058
1 f none opt/d-cache/classes/slf4j/slf4j-log4j12-1.5.8.jar 0644 root bin 9679 38544 1255617058
1 d none opt/d-cache/classes/smc 0755 root bin
1 f none opt/d-cache/classes/smc/statemap.jar 0644 root bin 3854 23710 1255617058
1 d none opt/d-cache/classes/spring 0755 root bin
1 f none opt/d-cache/classes/spring/spring-beans.jar 0644 root bin 488068 34113 1255617058
1 f none opt/d-cache/classes/spring/spring-context.jar 0644 root bin 476894 56713 1255617058
1 f none opt/d-cache/classes/spring/spring-core.jar 0644 root bin 285603 38613 1255617058
1 f none opt/d-cache/classes/srm-tomcat.jar 0644 root bin 1409 48951 1255617029
1 f none opt/d-cache/classes/srm.jar 0644 root bin 988502 16610 1255617029
1 d none opt/d-cache/classes/terapaths 0755 root bin
1 f none opt/d-cache/classes/terapaths/FastInfoset.jar 0644 root bin 593190 1562 1255617059
1 f none opt/d-cache/classes/terapaths/activation.jar 0644 root bin 44623 53526 1255617059
1 f none opt/d-cache/classes/terapaths/jax-qname.jar 0644 root bin 7700 41183 1255617059
1 f none opt/d-cache/classes/terapaths/jaxp-api.jar 0644 root bin 217152 27469 1255617059
1 f none opt/d-cache/classes/terapaths/jaxrpc-api.jar 0644 root bin 57375 32308 1255617059
1 f none opt/d-cache/classes/terapaths/jaxrpc-impl.jar 0644 root bin 5566952 29876 1255617059
1 f none opt/d-cache/classes/terapaths/jaxrpc-spi.jar 0644 root bin 40820 13404 1255617059
1 f none opt/d-cache/classes/terapaths/jsr173_api.jar 0644 root bin 49672 52972 1255617059
1 f none opt/d-cache/classes/terapaths/mail.jar 0644 root bin 270394 64436 1255617059
1 f none opt/d-cache/classes/terapaths/relaxngDatatype.jar 0644 root bin 31204 33209 1255617059
1 f none opt/d-cache/classes/terapaths/saaj-api.jar 0644 root bin 36298 26215 1255617059
1 f none opt/d-cache/classes/terapaths/saaj-impl.jar 0644 root bin 618186 47200 1255617059
1 f none opt/d-cache/classes/terapaths/terapathsExampleJavaClient.jar 0644 root bin 150333 30659 1255617059
1 f none opt/d-cache/classes/terapaths/xsdlib.jar 0644 root bin 476636 10587 1255617059
1 d none opt/d-cache/classes/toplink 0755 root bin
1 f none opt/d-cache/classes/toplink/toplink-essentials.jar 0644 root bin 2461878 64656 1255617058
1 f none opt/d-cache/classes/xrootd-tokenauthz.jar 0644 root bin 330297 19717 1255617072
1 d none opt/d-cache/config 0755 root bin
1 f none opt/d-cache/config/JHRM.map 0644 root bin 2391 64201 1255617058
1 f none opt/d-cache/config/PoolManager.conf 0644 root bin 2913 53287 1255617057
1 f none opt/d-cache/config/adminDoor.batch 0644 root bin 1739 18070 1255617057
1 f none opt/d-cache/config/authdoor.batch 0644 root bin 1409 44445 1255617057
1 f none opt/d-cache/config/c3p0.properties 0644 root bin 132 11659 1255617058
1 f none opt/d-cache/config/chimera-config.xml 0644 root bin 521 41490 1255617057
1 f none opt/d-cache/config/chimera.batch 0644 root bin 3054 63209 1255617057
1 f none opt/d-cache/config/dCache.batch 0644 root bin 2650 30814 1255617057
1 f none opt/d-cache/config/dir.batch 0644 root bin 489 42483 1255617057
1 f none opt/d-cache/config/door.batch 0644 root bin 1804 12275 1255617057
1 f none opt/d-cache/config/gPlazma.batch 0644 root bin 1300 44406 1255617058
1 f none opt/d-cache/config/gridftpdoor.batch 0644 root bin 4601 55310 1255617058
1 f none opt/d-cache/config/gsidcapdoor.batch 0644 root bin 2785 34803 1255617058
1 f none opt/d-cache/config/httpd.batch 0644 root bin 6531 28093 1255617057
1 f none opt/d-cache/config/httpdoor.batch 0644 root bin 1024 16738 1255617058
1 f none opt/d-cache/config/info.batch 0644 root bin 695 58592 1255617057
1 f none opt/d-cache/config/infoProvider.batch 0644 root bin 1178 26159 1255617057
1 f none opt/d-cache/config/lm.batch 0644 root bin 543 47983 1255617057
1 f none opt/d-cache/config/lm.config 0644 root bin 264 21733 1255617057
1 f none opt/d-cache/config/log4j.properties 0644 root bin 2956 5919 1255617058
1 f none opt/d-cache/config/nfsv41.batch 0644 root bin 745 64821 1255617057
1 f none opt/d-cache/config/permission.fragment 0644 root bin 1599 14778 1255617057
1 f none opt/d-cache/config/pnfs.batch 0644 root bin 5062 44282 1255617057
1 f none opt/d-cache/config/pool.batch 0644 root bin 3232 23154 1255617057
1 f none opt/d-cache/config/replica.batch 0644 root bin 2807 37061 1255617057
1 f none opt/d-cache/config/setup.temp 0644 root bin 1119 29769 1255617057
1 f none opt/d-cache/config/srm.batch 0644 root bin 19293 39121 1255617058
1 f none opt/d-cache/config/stage.fragment 0644 root bin 513 46820 1255617057
1 f none opt/d-cache/config/statistics.batch 0644 root bin 685 58603 1255617057
1 f none opt/d-cache/config/tunnel.fragment 0644 root bin 1466 246 1255617057
1 d none opt/d-cache/config/users 0755 root bin
1 d none opt/d-cache/config/users/acls 0755 root bin
1 d none opt/d-cache/config/users/meta 0755 root bin
1 d none opt/d-cache/config/users/relations 0755 root bin
1 f none opt/d-cache/config/utility.batch 0644 root bin 2817 29642 1255617057
1 f none opt/d-cache/config/xrootdDoor.batch 0644 root bin 1137 36464 1255617057
1 d none opt/d-cache/docs 0755 root bin
1 d none opt/d-cache/docs/images 0755 root bin
1 f none opt/d-cache/docs/images/area.gif 0644 root bin 521 2416 1255617057
1 f none opt/d-cache/docs/images/bg-home.jpg 0644 root bin 5507 3144 1255617057
1 f none opt/d-cache/docs/images/bg.jpg 0644 root bin 31768 63713 1255617067
1 f none opt/d-cache/docs/images/birdline.gif 0644 root bin 545 3533 1255617057
1 f none opt/d-cache/docs/images/bluebox.gif 0644 root bin 378 49374 1255617057
1 f none opt/d-cache/docs/images/cian.gif 0644 root bin 378 49837 1255617057
1 f none opt/d-cache/docs/images/dCache-web-bg-logo.svg 0644 root bin 571312 15612 1255617057
1 f none opt/d-cache/docs/images/dark-grey.gif 0644 root bin 378 49799 1255617057
1 f none opt/d-cache/docs/images/dark-tabaco.gif 0644 root bin 378 49896 1255617057
1 f none opt/d-cache/docs/images/desy_logo.gif 0644 root bin 843 39562 1255617057
1 f none opt/d-cache/docs/images/desy_logo_trans.gif 0644 root bin 800 34998 1255617057
1 f none opt/d-cache/docs/images/dev_trans.gif 0644 root bin 2903 64770 1255617057
1 f none opt/d-cache/docs/images/developer.gif 0644 root bin 2890 3597 1255617057
1 f none opt/d-cache/docs/images/documentation.gif 0644 root bin 1154 19113 1255617057
1 f none opt/d-cache/docs/images/download.gif 0644 root bin 956 57584 1255617057
1 f none opt/d-cache/docs/images/eagle-grey.gif 0644 root bin 1665 22826 1255617057
1 f none opt/d-cache/docs/images/eagle-main.gif 0644 root bin 5434 21190 1255617057
1 f none opt/d-cache/docs/images/eagle_logo.gif 0644 root bin 1935 55315 1255617057
1 f none opt/d-cache/docs/images/eagle_logo_draft.gif 0644 root bin 2839 37709 1255617057
1 f none opt/d-cache/docs/images/eaglebw.gif 0644 root bin 1053 27702 1255617057
1 f none opt/d-cache/docs/images/eaglered.gif 0644 root bin 233 28455 1255617057
1 f none opt/d-cache/docs/images/eagleredtrans.gif 0644 root bin 241 28592 1255617057
1 f none opt/d-cache/docs/images/eurogate.gif 0644 root bin 3010 30069 1255617057
1 f none opt/d-cache/docs/images/eurogatetrans.gif 0644 root bin 1800 39230 1255617057
1 f none opt/d-cache/docs/images/eurogatetranssmall.gif 0644 root bin 1184 24465 1255617057
1 f none opt/d-cache/docs/images/fermi_logo.gif 0644 root bin 428 55068 1255617057
1 f none opt/d-cache/docs/images/fermi_logo_trans.gif 0644 root bin 436 55301 1255617057
1 f none opt/d-cache/docs/images/greenbox.gif 0644 root bin 378 49200 1255617057
1 f none opt/d-cache/docs/images/large001.gif 0644 root bin 1876 3849 1255617057
1 f none opt/d-cache/docs/images/line.gif 0644 root bin 261 32561 1255617057
1 f none opt/d-cache/docs/images/navybox.gif 0644 root bin 378 49251 1255617057
1 f none opt/d-cache/docs/images/new-green.gif 0644 root bin 378 49951 1255617057
1 f none opt/d-cache/docs/images/new01.gif 0644 root bin 1016 8100 1255617057
1 f none opt/d-cache/docs/images/newsletter.gif 0644 root bin 1810 36245 1255617057
1 f none opt/d-cache/docs/images/orangebox.gif 0644 root bin 378 49247 1255617057
1 f none opt/d-cache/docs/images/p2001.gif 0644 root bin 516 64695 1255617057
1 f none opt/d-cache/docs/images/pMarch.gif 0644 root bin 669 19396 1255617057
1 f none opt/d-cache/docs/images/pMay.gif 0644 root bin 527 1776 1255617057
1 f none opt/d-cache/docs/images/pnfslogo1.gif 0644 root bin 2652 31204 1255617057
1 f none opt/d-cache/docs/images/pnfslogotrans.gif 0644 root bin 1734 14849 1255617057
1 f none opt/d-cache/docs/images/rateDist.gif 0644 root bin 3053 58062 1255617057
1 f none opt/d-cache/docs/images/redbox.gif 0644 root bin 378 49973 1255617057
1 f none opt/d-cache/docs/images/s_top_tux.gif 0644 root bin 1041 46334 1255617057
1 f none opt/d-cache/docs/images/sgi.gif 0644 root bin 498 58351 1255617057
1 f none opt/d-cache/docs/images/sorry.gif 0644 root bin 6080 33470 1255617057
1 f none opt/d-cache/docs/images/sunlogo.gif 0644 root bin 1131 1606 1255617057
1 f none opt/d-cache/docs/images/tabaco.gif 0644 root bin 378 50051 1255617057
1 f none opt/d-cache/docs/images/trudex.gif 0644 root bin 16155 34318 1255617057
1 f none opt/d-cache/docs/images/trudey.gif 0644 root bin 8570 50880 1255617057
1 f none opt/d-cache/docs/images/tux.gif 0644 root bin 849 20141 1255617057
1 f none opt/d-cache/docs/images/violet.gif 0644 root bin 378 50129 1255617057
1 f none opt/d-cache/docs/images/yellowbox.gif 0644 root bin 378 49455 1255617057
1 d none opt/d-cache/docs/scripts 0755 root bin
1 d none opt/d-cache/docs/scripts/sorting 0755 root bin
1 f none opt/d-cache/docs/scripts/sorting/common.js 0644 root bin 2801 42094 1255617057
1 f none opt/d-cache/docs/scripts/sorting/css.js 0644 root bin 4449 32944 1255617057
1 f none opt/d-cache/docs/scripts/sorting/standardista-table-sorting.js 0644 root bin 12147 54760 1255617057
1 d none opt/d-cache/docs/skins 0755 root bin
1 f none opt/d-cache/docs/skins/home-skin-basic.html 0644 root bin 7039 59349 1255617057
1 f none opt/d-cache/docs/statisticsHelp.html 0644 root bin 3499 37274 1255617057
1 d none opt/d-cache/docs/styles 0755 root bin
1 f none opt/d-cache/docs/styles/billing.css 0644 root bin 451 36577 1255617057
1 f none opt/d-cache/docs/styles/common.css 0644 root bin 605 46877 1255617057
1 f none opt/d-cache/docs/styles/doors.css 0644 root bin 647 50026 1255617057
1 f none opt/d-cache/docs/styles/poolinfo.css 0644 root bin 1373 45658 1255617057
1 f none opt/d-cache/docs/styles/queueInfo.css 0644 root bin 244 18823 1255617057
1 f none opt/d-cache/docs/styles/restoreHandler.css 0644 root bin 281 22417 1255617057
1 f none opt/d-cache/docs/styles/transfers.css 0644 root bin 176 14589 1255617057
1 f none opt/d-cache/docs/styles/usageInfo.css 0644 root bin 555 46140 1255617057
1 d none opt/d-cache/etc 0755 root bin
1 f none opt/d-cache/etc/dCacheSetup.template 0644 root bin 41533 2429 1255617074
1 f none opt/d-cache/etc/dcache.kpwd.template 0644 root bin 1799 13989 1255617074
1 f none opt/d-cache/etc/dcachesrm-gplazma.policy 0644 root bin 3502 20410 1255617074
1 f none opt/d-cache/etc/glue-1.3.xml.template 0644 root bin 23169 63292 1255617074
1 f none opt/d-cache/etc/keystore.template 0644 root bin 169 13237 1255617074
1 f none opt/d-cache/etc/logConfig.xml 0644 root bin 4638 48147 1255617074
1 f none opt/d-cache/etc/node_config.template 0644 root bin 1729 10598 1255617074
1 f none opt/d-cache/etc/pool_path.template 0644 root bin 48 3683 1255617074
1 f none opt/d-cache/etc/psql_drop_companion.sql 0644 root bin 22 1730 1255617074
1 f none opt/d-cache/etc/psql_drop_dcache.sql 0644 root bin 782 435 1255617074
1 f none opt/d-cache/etc/psql_drop_replicas.sql 0644 root bin 110 8448 1255617074
1 f none opt/d-cache/etc/psql_install_companion.sql 0644 root bin 224 16798 1255617074
1 f none opt/d-cache/etc/psql_install_replicas.sql 0644 root bin 6347 30304 1255617074
1 f none opt/d-cache/etc/psql_upgrade_replicas.sql 0644 root bin 3855 34249 1255617074
1 f none opt/d-cache/etc/srm_setup.env 0644 root bin 1273 37977 1255617074
1 f none opt/d-cache/etc/srmv1-deploy.wsdd 0644 root bin 11887 40465 1255617038
1 f none opt/d-cache/etc/srmv2.2-deploy.wsdd 0644 root bin 74833 6553 1255617038
1 d none opt/d-cache/external 0755 root bin
1 f none opt/d-cache/external/apache-tomcat-5.5.20.tar.gz 0644 root bin 5949295 7569 1255617030
1 f none opt/d-cache/external/axis-1_3.tar.gz 0644 root bin 8498273 46141 1255617038
1 d none opt/d-cache/install 0755 root bin
1 f none opt/d-cache/install/deploy_srmv2.sh 0755 root bin 20288 47603 1255617038
1 f none opt/d-cache/install/install.sh 0755 root bin 26848 21717 1255617074
1 f none opt/d-cache/install/upgrade_space_manager_schema.sh 0755 root bin 379 31940 1255617038
1 d none opt/d-cache/jobs 0755 root bin
1 f none opt/d-cache/jobs/encp.sh 0755 root bin 4536 2227 1255617057
1 f none opt/d-cache/jobs/generic.lib.sh 0755 root bin 5444 16170 1255617057
1 f none opt/d-cache/jobs/hsmcp.rb 0755 root bin 3125 49133 1255617057
1 f none opt/d-cache/jobs/hsmcp.sh 0755 root bin 3498 60829 1255617057
1 f none opt/d-cache/jobs/hsmcpV4.sh 0755 root bin 7584 38051 1255617057
1 f none opt/d-cache/jobs/infoDynamicSE-plugin-dcache 0755 root bin 1018 9010 1255617058
1 f none opt/d-cache/jobs/infoDynamicSE-provider-dcache 0755 root bin 1018 9166 1255617058
1 f none opt/d-cache/jobs/initPackage.sh 0755 root bin 4405 57485 1255617057
1 f none opt/d-cache/jobs/needFulThings.sh 0755 root bin 7163 36191 1255617057
1 f none opt/d-cache/jobs/wrapper2.sh 0755 root bin 5936 28637 1255617057
1 d none opt/d-cache/libexec 0755 root bin
1 f none opt/d-cache/libexec/README 0644 root bin 0 0 1255617074
1 d none opt/d-cache/libexec/chimera 0755 root bin
1 f none opt/d-cache/libexec/chimera/chimera-cli.sh 0755 root bin 437 37539 1255617058
1 f none opt/d-cache/libexec/chimera/chimera-get-acl.sh 0755 root bin 302 26762 1255617058
1 f none opt/d-cache/libexec/chimera/chimera-nfs-run.sh 0755 root bin 3343 61182 1255617058
1 f none opt/d-cache/libexec/chimera/chimera-nfs-run.xml 0644 root bin 2685 23828 1255617058
1 f none opt/d-cache/libexec/chimera/chimera-set-acl.sh 0755 root bin 302 26774 1255617058
1 d none opt/d-cache/libexec/chimera/sql 0755 root bin
1 f none opt/d-cache/libexec/chimera/sql/add-timezone.sql 0644 root bin 2148 52309 1255617058
1 f none opt/d-cache/libexec/chimera/sql/addACLtoChimeraDB.sql 0644 root bin 528 38275 1255617058
1 f none opt/d-cache/libexec/chimera/sql/cacheinfo-pgs.sql 0644 root bin 302 23053 1255617058
1 f none opt/d-cache/libexec/chimera/sql/cacheinfo.sql 0644 root bin 205 14348 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create-dCacheACL.sql 0644 root bin 460 33857 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create-db2.sql 0644 root bin 9084 37365 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create-hsqldb.sql 0644 root bin 8730 24044 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create-oracle.sql 0644 root bin 9278 50366 1255617058
1 f none opt/d-cache/libexec/chimera/sql/create.sql 0644 root bin 10694 56800 1255617058
1 f none opt/d-cache/libexec/chimera/sql/migrate-2-1.9.3.sql 0644 root bin 799 563 1255617058
1 f none opt/d-cache/libexec/chimera/sql/pgsql-procedures.sql 0644 root bin 4661 61571 1255617058
1 f none opt/d-cache/libexec/chimera/sql/pnfsid-mapping.sql 0644 root bin 105 7613 1255617058
1 f none opt/d-cache/libexec/chimera/sql/top_dir.sql 0644 root bin 251 18353 1255617058
1 f none opt/d-cache/libexec/chimera/sql/transaction-loggin-pg.sql 0644 root bin 2867 62292 1255617058
1 d none opt/d-cache/libexec/infoProvider 0755 root bin
1 f none opt/d-cache/libexec/infoProvider/info-based-infoProvider.sh 0644 root bin 3580 33196 1255617074
1 f none opt/d-cache/libexec/infoprovidercms.rb 0644 root bin 5213 9626 1255617074
1 f none opt/d-cache/libexec/nsp-performance.sh 0644 root bin 537 44692 1255617074
1 f none opt/d-cache/libexec/wait-for-cells.sh 0644 root bin 2972 31602 1255617074
1 d none opt/d-cache/share 0755 root bin
1 d none opt/d-cache/share/dCacheConfigure 0755 root bin
1 d none opt/d-cache/share/dCacheConfigure/modules 0755 root bin
1 f none opt/d-cache/share/dCacheConfigure/modules/config_bdii_only 0644 root bin 1818 4940 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_gip_dcache 0644 root bin 25771 48197 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_gip_dcache_info 0644 root bin 8564 61094 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_gip_only 0644 root bin 3562 18254 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_pgsql 0644 root bin 15591 1657 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_sechimera 0644 root bin 13419 48203 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_sedcache 0644 root bin 64083 5365 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/config_sepnfs 0644 root bin 19005 24682 1255617074
1 f none opt/d-cache/share/dCacheConfigure/modules/reset_srm 0644 root bin 360 29961 1255617074
1 d none opt/d-cache/share/dCacheConfigure/utils 0755 root bin
1 f none opt/d-cache/share/dCacheConfigure/utils/central_certs 0644 root bin 334 26463 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/check_users_conf_format 0644 root bin 343 26610 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/config_file 0644 root bin 10130 27520 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/cron_job 0644 root bin 1306 34915 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/requires 0644 root bin 881 3229 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/run 0644 root bin 494 31815 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/set_mysql_passwd 0644 root bin 811 64521 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/split_quoted_variable 0644 root bin 185 13331 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/userhandling 0644 root bin 8436 27442 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getfirstpoolaccount 0644 root bin 447 33384 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getprduser 0644 root bin 517 40838 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getsgmuser 0644 root bin 517 40842 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getspecialusers 0644 root bin 676 53587 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getvogroup 0644 root bin 558 44770 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/users_getvoprefix 0644 root bin 627 50089 1255617074
1 f none opt/d-cache/share/dCacheConfigure/utils/yaimlog 0644 root bin 1095 12055 1255617074
1 d none opt/d-cache/share/dcache 0755 root bin
1 d none opt/d-cache/share/dcache/sh 0755 root bin
1 d none opt/d-cache/share/doc 0755 root bin
1 f none opt/d-cache/share/doc/README-GLUE 0644 root bin 9571 60807 1255617074
1 d none opt/d-cache/share/doc/dCacheConfigure 0755 root bin
1 d none opt/d-cache/share/doc/dCacheConfigure/examples 0755 root bin
1 f none opt/d-cache/share/doc/dCacheConfigure/examples/site-info.def 0644 root bin 21968 5981 1255617074
1 f none opt/d-cache/share/doc/dCacheConfigure/examples/users.conf 0644 root bin 77890 20414 1255617074
1 f none opt/d-cache/share/doc/dCacheConfigure/users.conf.README 0644 root bin 2938 52601 1255617074
1 d none opt/d-cache/share/doc/xylophone 0755 root bin
1 f none opt/d-cache/share/doc/xylophone/Guide.txt 0644 root bin 44872 29496 1255617074
1 f none opt/d-cache/share/doc/xylophone/dynamic.xml 0644 root bin 554 43566 1255617074
1 f none opt/d-cache/share/doc/xylophone/hello-world.xml 0644 root bin 581 46502 1255617074
1 d none opt/d-cache/share/lib 0755 root bin
1 f none opt/d-cache/share/lib/config.sed 0644 root bin 1289 39148 1255617074
1 f none opt/d-cache/share/lib/config.sh 0644 root bin 1467 41293 1255617074
1 f none opt/d-cache/share/lib/daemon 0644 root bin 2472 52788 1255617074
1 f none opt/d-cache/share/lib/namespace.sh 0644 root bin 2842 17403 1255617074
1 f none opt/d-cache/share/lib/paths.sh 0644 root bin 657 45268 1255617074
1 f none opt/d-cache/share/lib/pool.sh 0644 root bin 9194 35059 1255617074
1 f none opt/d-cache/share/lib/services.sh 0644 root bin 11489 48784 1255617074
1 f none opt/d-cache/share/lib/utils.sh 0644 root bin 3995 17697 1255617074
1 d none opt/d-cache/share/man 0755 root bin
1 d none opt/d-cache/share/man/man8 0755 root bin
1 f none opt/d-cache/share/man/man8/dcache.8 0644 root bin 8754 61545 1255617074
1 d none opt/d-cache/share/xml 0755 root bin
1 d none opt/d-cache/share/xml/xslt 0755 root bin
1 f none opt/d-cache/share/xml/xslt/wait-for-cells.xsl 0644 root bin 4610 52734 1255617074
1 d none opt/d-cache/share/xml/xylophone 0755 root bin
1 d none opt/d-cache/share/xml/xylophone/xsl 0755 root bin
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-import.xsl 0644 root bin 5064 5889 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-map.xsl 0644 root bin 9561 54461 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-markup.xsl 0644 root bin 8587 24867 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-output.xsl 0644 root bin 4706 46233 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-path.xsl 0644 root bin 6205 34007 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-predicate.xsl 0644 root bin 6777 13290 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-publish.xsl 0644 root bin 28791 13891 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone-user-elements.xsl 0644 root bin 16976 3712 1255617074
1 f none opt/d-cache/share/xml/xylophone/xsl/xylophone.xsl 0644 root bin 4289 15908 1255617074
1 i pkginfo 164 12763 1255617076
07070100204b3d000041ed000000650000000a000000034ad7323400000000000000b600010008ffffffffffffffff0000000600000000reloc 07070100204b3e000041ed000000650000000a000000034ad7323400000000000000b600010008ffffffffffffffff0000000a00000000reloc/opt 07070100204b3f000041ed000000650000000a0000000d4ad7323800000000000000b600010008ffffffffffffffff0000001200000000reloc/opt/d-cache 07070100204c34000041ed000000650000000a000000024ad7323800000000000000b600010008ffffffffffffffff0000001600000000reloc/opt/d-cache/etc 07070100204c42000081a4000000650000000a000000014ad7323200000f0f000000b600010008ffffffffffffffff0000003000000000reloc/opt/d-cache/etc/psql_upgrade_replicas.sql --
-- Create configuration table
--
CREATE TABLE configuration (
label text NOT NULL,
value text,
"comment" text
);
INSERT INTO configuration VALUES ('version','1.0','Initial version');
--
-- Create a sequence for poolids
--
CREATE SEQUENCE poolids
INCREMENT BY 1
NO MAXVALUE
MINVALUE 10001
CACHE 1;
--
-- Change "pools" table
--
ALTER TABLE pools ADD poolid integer DEFAULT nextval('poolids'::regclass) NOT NULL;
ALTER TABLE pools ADD countable boolean DEFAULT true;
CREATE UNIQUE INDEX poolid_idx ON pools USING btree (poolid);
--
-- Create new "file" table
--
CREATE TABLE files (
pnfsid text NOT NULL,
datestamp timestamp without time zone DEFAULT now(),
al integer,
rp integer,
fsize bigint,
nmin integer,
nmax integer,
excluded boolean DEFAULT false,
deleted boolean DEFAULT false,
state integer,
"valid" boolean DEFAULT true,
sclass text
);
--
-- Create primary key
--
ALTER TABLE ONLY files ADD CONSTRAINT files_pkey PRIMARY KEY (pnfsid);
--
-- Create the rule to handle multiple inserts for the same pnfsid
--
CREATE OR REPLACE RULE in_files AS
ON INSERT TO files
WHERE (EXISTS (SELECT 1 FROM files WHERE (files.pnfsid = new.pnfsid)))
DO INSTEAD NOTHING;
--
-- Change "replicas" table
--
ALTER TABLE replicas ADD poolid integer;
ALTER TABLE replicas ADD bitmask integer;
ALTER TABLE replicas ADD countable boolean;
ALTER TABLE replicas ADD excluded boolean;
ALTER TABLE ONLY replicas ADD CONSTRAINT replicas_pool_fkey FOREIGN KEY (pool) REFERENCES pools(pool);
ALTER TABLE ONLY replicas ADD CONSTRAINT replicas_poolid_fkey FOREIGN KEY (poolid) REFERENCES pools(poolid);
ALTER TABLE ONLY replicas ALTER poolid SET NOT NULL;
ALTER TABLE ONLY replicas ALTER countable SET NOT NULL;
ALTER TABLE ONLY replicas ALTER excluded SET NOT NULL;
--
-- Two rules for replicas table.
-- NOTICE that the rules for one table are aplied in the alphabethical order!
-- So rule add2files will be aplied first...
--
CREATE OR REPLACE RULE add2files AS
ON INSERT TO replicas
DO ALSO
INSERT INTO files (pnfsid, datestamp) VALUES (new.pnfsid, now());
--
-- Rule replace_replicas will be aplied second.
--
-- More tests required
--CREATE OR REPLACE RULE replace_replicas AS
-- ON INSERT TO replicas
-- WHERE (EXISTS (SELECT 1 FROM replicas WHERE ((replicas.pool = new.pool) AND (replicas.pnfsid = new.pnfsid))))
-- DO INSTEAD
-- UPDATE replicas SET datestamp = now() WHERE ((replicas.pool = new.pool) AND (replicas.pnfsid = new.pnfsid));
--
CREATE OR REPLACE RULE replace_heartbeat AS
ON INSERT TO heartbeat
WHERE EXISTS (SELECT 1 FROM heartbeat WHERE heartbeat.process = new.process)
DO INSTEAD
UPDATE heartbeat SET datestamp = now() WHERE (heartbeat.process = new.process);
--
-- Deficient table
--
CREATE TABLE deficient (pnfsid text, count int);
--
-- Redundant table
--
CREATE TABLE redundant (like deficient);
--
-- Drainoff table
--
CREATE TABLE drainoff (pnfsid text);
--
-- Name: actions; Type: TABLE; Schema: public;
--
CREATE TABLE actions (
"action" text NOT NULL,
spool text NOT NULL,
pnfsid text NOT NULL,
dpool text NOT NULL,
datestamp timestamp without time zone,
"timestamp" bigint
);
--
-- Name: excluded; Type: TABLE; Schema: public;
--
CREATE TABLE excluded (
pool text NOT NULL,
pnfsid text NOT NULL,
datestamp timestamp without time zone,
"timestamp" bigint,
poolid integer NOT NULL,
bitmask integer NOT NULL,
errcode text,
errmsg text
);
--
-- Drop action table inherited replicas
--
drop TABLE "action" ;
--
-- Create a new table named "shadow" nherited replicas to trick the planner
-- It does not have any data
--
CREATE TABLE shadow () INHERITS (replicas);
07070100204c3a000081a4000000650000000a000000014ad732320000121e000000b600010008ffffffffffffffff0000002400000000reloc/opt/d-cache/etc/logConfig.xml
07070100204c37000081a4000000650000000a000000014ad7323200000dae000000b600010008ffffffffffffffff0000002f00000000reloc/opt/d-cache/etc/dcachesrm-gplazma.policy # ###### dcachesrm-gplazma.policy #######
# ###### gPLAZMA: grid-aware PLuggable AuthoriZation MAnagement. #######
# ###### gPLAZMAlite Suite: Built-in light-weight services for #######
# ###### grid legacy mapping & VO Role fine-grain security. #######
# ###### Version 0.1-1 #######
# This file contains gPLAZMA module's policy configuration in dCache-SRM.
# Operational with: SRM, GridFTP.
# CAUTION: Commenting out a switch|priority|configuration line (with a # sign) in
# this file is equivalent to switching that plugin|service OFF. It is handled, but
# please exercise caution to maintain the marker intact for possible future use.
# Recommended way is to turn plugins|services OFF explicitly - using the switches.
# Assertion results in a Disallow|Allow decision.
# Authorization results in a Disallow|Allow decision with Authorization Record.
# Switches and Priorities for Loadable Assertion Plugins|Services - Not supported -
# #################################################################################
# #site-assertion=
# Switches and Priorities for Loadable Authorization Plugins|Services
# #################################################################################
# A valid switch is from { "OFF" | "ON" }.
# A priority (based on site|VO policies) is required if switch is ON.
# A valid priority is from { "1" | "2" | "3" | "4" } and must be unique.
# Please note -
# Each plugin returns a decision based on a different authorization repository|
# service. Priorities are translated into priority of access (as compared to priority
# of denial). A well-defined Over-riding Policy can be enforced while using multiple
# authorization services (multiple switches ON) by defining priorities differently.
# Turning all switches OFF leads the running system to a secure quasi-firewall mode.
# Switches
xacml-vo-mapping="OFF"
saml-vo-mapping="OFF"
kpwd="ON"
grid-mapfile="OFF"
gplazmalite-vorole-mapping="OFF"
# Priorities
xacml-vo-mapping-priority="5"
saml-vo-mapping-priority="1"
kpwd-priority="3"
grid-mapfile-priority="4"
gplazmalite-vorole-mapping-priority="2"
# Configurable Options for Plugins|Services
# #################################################################################
# Path to local or remotely accessible authorization repositories|services.
# A valid path is required if corresponding switch is ON.
# dcache.kpwd
kpwdPath="/opt/d-cache/etc/dcache.kpwd"
# grid-mapfile
gridMapFilePath="/etc/grid-security/grid-mapfile"
storageAuthzPath="/etc/grid-security/storage-authzdb"
# XACML-based grid VO role mapping
XACMLmappingServiceUrl="https://fledgling09.fnal.gov:8443/gums/services/GUMSXACMLAuthorizationServicePort"
# Time in seconds to cache the mapping in memory
xacml-vo-mapping-cache-lifetime="180"
# SAML-based grid VO role mapping
mappingServiceUrl="https://fledgling09.fnal.gov:8443/gums/services/GUMSAuthorizationServicePort"
# Time in seconds to cache the mapping in memory
saml-vo-mapping-cache-lifetime="180"
# Built-in gPLAZMAlite grid VO role mapping
gridVoRolemapPath="/etc/grid-security/grid-vorolemap"
gridVoRoleStorageAuthzPath="/etc/grid-security/storage-authzdb"
vomsValidation="false"
# SAZ Settings
saz-client="OFF"
SAZ_SERVER_HOST="saz-server.oursite.edu"
SAZ_SERVER_PORT="8888"
# #################################################################################
# END
07070100204c41000081a4000000650000000a000000014ad73232000018cb000000b600010008ffffffffffffffff0000003000000000reloc/opt/d-cache/etc/psql_install_replicas.sql --
-- Name: proc; Type: SCHEMA; Schema: -; Owner: dcache
--
CREATE SCHEMA proc;
--
-- Name: SCHEMA public; Type: COMMENT; Schema: -;
--
COMMENT ON SCHEMA public IS 'Standard public schema';
SET search_path = public, pg_catalog;
--
-- Name: poolids; Type: SEQUENCE; Schema: public;
--
CREATE SEQUENCE poolids
INCREMENT BY 1
NO MAXVALUE
MINVALUE 10001
CACHE 1;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: pools; Type: TABLE; Schema: public;
--
CREATE TABLE pools (
pool text NOT NULL,
status text,
datestamp timestamp without time zone,
poolid integer DEFAULT nextval('poolids'::regclass) NOT NULL,
countable boolean DEFAULT true
);
--
-- Name: replicas; Type: TABLE; Schema: public;
--
CREATE TABLE replicas (
pool text NOT NULL,
pnfsid text NOT NULL,
datestamp timestamp without time zone,
poolid integer NOT NULL,
bitmask integer NOT NULL,
countable boolean NOT NULL,
excluded boolean NOT NULL
);
SET search_path = proc, pg_catalog;
--
-- Name: replicas; Type: VIEW; Schema: proc;
--
CREATE VIEW replicas AS
SELECT replicas.pool, replicas.pnfsid FROM public.replicas, public.pools WHERE ((replicas.pool = pools.pool) AND (pools.status = 'online'::text));
SET search_path = public, pg_catalog;
--
-- Name: actions; Type: TABLE; Schema: public;
--
CREATE TABLE actions (
"action" text NOT NULL,
spool text NOT NULL,
pnfsid text NOT NULL,
dpool text NOT NULL,
datestamp timestamp without time zone,
"timestamp" bigint
);
--
-- Name: configuration; Type: TABLE; Schema: public;
--
CREATE TABLE configuration (
label text NOT NULL,
value text,
"comment" text
);
--
-- Name: deficient; Type: TABLE; Schema: public;
--
CREATE TABLE deficient (
pnfsid text,
count integer
);
--
-- Name: drainoff; Type: TABLE; Schema: public;
--
CREATE TABLE drainoff (
pnfsid text
);
--
-- Name: excluded; Type: TABLE; Schema: public;
--
CREATE TABLE excluded (
pool text NOT NULL,
pnfsid text NOT NULL,
datestamp timestamp without time zone,
"timestamp" bigint,
poolid integer NOT NULL,
bitmask integer NOT NULL,
errcode text,
errmsg text
);
--
-- Name: files; Type: TABLE; Schema: public;
--
CREATE TABLE files (
pnfsid text NOT NULL,
datestamp timestamp without time zone DEFAULT now(),
al integer,
rp integer,
fsize bigint,
nmin integer,
nmax integer,
excluded boolean DEFAULT false,
deleted boolean DEFAULT false,
state integer,
"valid" boolean DEFAULT true,
sclass text
);
--
-- Name: heartbeat; Type: TABLE; Schema: public;
--
CREATE TABLE heartbeat (
process text NOT NULL,
description text,
datestamp timestamp without time zone
);
--
-- Name: history; Type: TABLE; Schema: public;
--
CREATE TABLE history (
pool text NOT NULL,
pnfsid text NOT NULL,
datestamp timestamp without time zone,
"timestamp" timestamp without time zone DEFAULT now()
);
--
-- Name: history_a; Type: TABLE; Schema: public;
--
CREATE TABLE history_a (
"old" boolean DEFAULT false
)
INHERITS (history);
--
-- Name: history_b; Type: TABLE; Schema: public;
--
CREATE TABLE history_b (
"old" boolean DEFAULT true
)
INHERITS (history);
--
-- Name: redundant; Type: TABLE; Schema: public;
--
CREATE TABLE redundant (
pnfsid text,
count integer
);
--
-- Name: shadow; Type: TABLE; Schema: public;
--
CREATE TABLE shadow (
)
INHERITS (replicas);
--
-- Name: files_pkey; Type: CONSTRAINT; Schema: public;
--
ALTER TABLE ONLY files
ADD CONSTRAINT files_pkey PRIMARY KEY (pnfsid);
--
-- Name: hbprocess; Type: CONSTRAINT; Schema: public;
--
ALTER TABLE ONLY heartbeat
ADD CONSTRAINT hbprocess PRIMARY KEY (process);
--
-- Name: poolname; Type: CONSTRAINT; Schema: public;
--
ALTER TABLE ONLY pools
ADD CONSTRAINT poolname PRIMARY KEY (pool);
--
-- Name: replica; Type: CONSTRAINT; Schema: public;
--
ALTER TABLE ONLY replicas
ADD CONSTRAINT replica PRIMARY KEY (pool, pnfsid);
--
-- Name: history_a_idx; Type: INDEX; Schema: public;
--
CREATE INDEX history_a_idx ON history_a USING btree (pnfsid);
--
-- Name: history_b_idx; Type: INDEX; Schema: public;
--
CREATE INDEX history_b_idx ON history_b USING btree (pnfsid);
--
-- Name: history_idx; Type: INDEX; Schema: public;
--
CREATE INDEX history_idx ON history USING btree (pnfsid);
--
-- Name: poolid_idx; Type: INDEX; Schema: public;
--
CREATE UNIQUE INDEX poolid_idx ON pools USING btree (poolid);
--
-- Name: pools_pool_indx; Type: INDEX; Schema: public;
--
CREATE INDEX pools_pool_indx ON replicas USING btree (pool);
--
-- Name: replicas_pnfsid_indx; Type: INDEX; Schema: public;
--
CREATE INDEX replicas_pnfsid_indx ON replicas USING btree (pnfsid);
--
-- Name: add2files; Type: RULE; Schema: public;
--
CREATE RULE add2files AS ON INSERT TO replicas DO INSERT INTO files (pnfsid, datestamp) VALUES (new.pnfsid, now());
--
-- Name: in_files; Type: RULE; Schema: public;
--
CREATE RULE in_files AS ON INSERT TO files WHERE (EXISTS (SELECT 1 FROM files WHERE (files.pnfsid = new.pnfsid))) DO INSTEAD NOTHING;
--
-- Name: replace_heartbeat; Type: RULE; Schema: public;
--
CREATE RULE replace_heartbeat AS ON INSERT TO heartbeat WHERE (EXISTS (SELECT 1 FROM heartbeat WHERE (heartbeat.process = new.process))) DO INSTEAD UPDATE heartbeat SET datestamp = now() WHERE (heartbeat.process = new.process);
--
-- Name: replace_replicas; Type: RULE; Schema: public;
--
-- More test required
--CREATE RULE replace_replicas AS ON INSERT TO replicas WHERE (EXISTS (SELECT 1 FROM replicas WHERE ((replicas.pool = new.pool) AND (replicas.pnfsid = new.pnfsid)))) DO INSTEAD UPDATE replicas SET datestamp = now() WHERE ((replicas.pool = new.pool) AND (replicas.pnfsid = new.pnfsid));
--
--
-- Name: replicas_pool_fkey; Type: FK CONSTRAINT; Schema: public;
--
ALTER TABLE ONLY replicas
ADD CONSTRAINT replicas_pool_fkey FOREIGN KEY (pool) REFERENCES pools(pool);
--
-- Name: replicas_poolid_fkey; Type: FK CONSTRAINT; Schema: public;
--
ALTER TABLE ONLY replicas
ADD CONSTRAINT replicas_poolid_fkey FOREIGN KEY (poolid) REFERENCES pools(poolid);
INSERT INTO configuration VALUES ('version','1.0','Initial version');
07070100204c3d000081a4000000650000000a000000014ad7323200000016000000b600010008ffffffffffffffff0000002e00000000reloc/opt/d-cache/etc/psql_drop_companion.sql DROP TABLE cacheinfo;
07070100204c40000081a4000000650000000a000000014ad73232000000e0000000b600010008ffffffffffffffff0000003100000000reloc/opt/d-cache/etc/psql_install_companion.sql CREATE TABLE cacheinfo (
pnfsid CHAR(24) NOT NULL,
pool VARCHAR(255) NOT NULL,
ctime TIMESTAMP NOT NULL,
UNIQUE(pnfsid, pool)
);
CREATE INDEX pool_inx ON cacheinfo (pool);
CREATE INDEX pnfs_inx ON cacheinfo (pnfsid);
07070100204c3f000081a4000000650000000a000000014ad732320000006e000000b600010008ffffffffffffffff0000002d00000000reloc/opt/d-cache/etc/psql_drop_replicas.sql DROP TABLE action ;
DROP VIEW proc.replicas ;
DROP TABLE replicas ;
DROP TABLE pools ;
DROP TABLE heartbeat ;
07070100204c39000081a4000000650000000a000000014ad73232000000a9000000b600010008ffffffffffffffff0000002800000000reloc/opt/d-cache/etc/keystore.template KEY VO:* PRIVKEY:/opt/d-cache/etc/privkey PUBKEY:/opt/d-cache/etc/pubkey
#KEY VO:ALICE PRIVKEY:/opt/d-cache/etc/privkey PUBKEY:/opt/d-cache/etc/pubkey 07070100204c44000081a4000000650000000a000000014ad7320e00002e6f000000b600010008ffffffffffffffff0000002800000000reloc/opt/d-cache/etc/srmv1-deploy.wsdd
07070100204c38000081a4000000650000000a000000014ad7323200005a81000000b600010008ffffffffffffffff0000002c00000000reloc/opt/d-cache/etc/glue-1.3.xml.template
EXAMPLESITE-IDdcache-srm.example.orgUNDEFINEDVALUEUNDEFINEDVALUE13dcache0://:file transferhttpg://:/srm/managerv22.2.0space allocationspace managerfile pinningvolatileInformation for VO /d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='total']/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='total']/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='free']/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='removable']0/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='free']/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='removable']replicaonlineneverExpire/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='total']/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='free']/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='removable']/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='free']/d:dCache/d:poolgroups/d:poolgroup[@name='']/d:space/d:metric[@name='removable']10001000000000-1
07070100204c35000081a4000000650000000a000000014ad732320000a23d000000b600010008ffffffffffffffff0000002b00000000reloc/opt/d-cache/etc/dCacheSetup.template #
# based on dCacheSetup.template $Revision: 1.33 $
#
# -----------------------------------------------------------------------
# config/dCacheSetup
# -----------------------------------------------------------------------
#
# This is the central configuration file for a dCache instance. In
# most cases it should be possible to keep it identical across the
# nodes of one dCache instance.
#
# This template contains all options that can possibly be used.
# Most may be left at the default value. If the option is commented
# out below is indicates the default value. If it is not commented
# out it is set to a reasonable value.
#
# To get a dCache instance running it is sufficient to set the
# two options:
# java The absolute location of the java binary
# serviceLocatorHost The hostname of the admin node
#
# The other values should only be changed when advised to do so by
# the documentation.
#
# -----------------------------------------------------------------------
# Cell Communication
# -----------------------------------------------------------------------
# ---- Which message broker implementation to use
#
# Valid values are: cells, embedded-jms, jms
# The default is: cells
#
# Selects between various message brokers. The message broker
# determines how dCache cells communicate with each other.
#
# 'cells' is the classic cells location manager based system. The
# serviceLocatorHost and serviceLocatorPort settings determine the
# location service.
#
# 'embedded-jms' starts an embedded Apache ActiveMQ broker
# in dCacheDomain and instructs other domains to connect to it.
#
# 'jms' uses an external Apache ActiveMQ broker. That broker is
# configured outside of dCache.
#
#
#messageBroker=cells
# ---- Service Locater Host and Port
#
# Adjust this to point to one unique Service Location service.
# This service must support precisely one dCache instance. This is
# usually the admin node.
#
serviceLocatorHost=SERVER
serviceLocatorPort=11111
# ---- Port and host used for ActiveMQ broker
#
# Determines the host and port used for the ActiveMQ broker. The
# host defaults to the value of serviceLocatorHost. Only used if
# messageBroker is set to either jms or embedded-jms.
#
#amqPort=11112
#amqHost=SERVER
# ---- Connection URL for ActiveMQ
#
# By default, the ActiveMQ connection URL is formed from amqPort and
# amqHost. amqUrl may be used to configure more advanced broker
# topologies. Consult the ActiveMQ documentation for possible values.
# The default is 'failover:tcp://${amqHost}:${amqPort}'
#
#amqUrl=failover:tcp://${amqHost}:${amqPort}
# ---- ActiveMQ spool directory
#
# Determines the spool directory used by the embedded ActiveMQ
# broker. Only used when messageBroker is set to embedded-jms and
# only used by dCacheDomain.
#
#amqSpool=/var/spool/d-cache/amq
# -----------------------------------------------------------------------
# Components
# -----------------------------------------------------------------------
# To activate Replica Manager you need make changes in all 3 places:
# 1) etc/node_config on ALL ADMIN NODES in this dcache instance.
# 2) replicaSetup file on node where replica manager is runnig
# 3) define Resilient pool group(s) in PoolManager.conf
# ---- Will Replica Manager be started?
#
# Values: no, yes
# Default: no
#
# This has to be set to 'yes' on every node, if there is a replica
# manager in this dCache instance. Where the replica manager is
# started is controlled in 'etc/node_config'. If it is not started
# and this is set to 'yes' there will be error messages in
# log/dCacheDomain.log. If this is set to 'no' and a replica
# manager is started somewhere, it will not work properly.
#
#replicaManager=no
# ---- Which pool-group will be the group of resilient pools?
#
# Values: , a pool-group name existing in the PoolManager.conf
# Default: ResilientPools
#
# Only pools defined in pool group ResilientPools in
# config/PoolManager.conf will be managed by ReplicaManager. You
# must edit config/PoolManager.conf to make the replica manager
# work. To use another pool group defined in PoolManager.conf for
# replication, please specify group name by changing the setting:
# #resilientGroupName=ResilientPools
# Please scroll down "replica manager tuning" make this and other
# changes.
# -----------------------------------------------------------------------
# Java Configuration
# -----------------------------------------------------------------------
# ---- The binary of the Java VM
#
# Adjust to the absolute location of the JVM binary: java. This
# should be /bin/java
#
java="/usr/bin/java"
#
# ---- Options for the Java VM
#
# Do not change unless you know what you are doing.
#
# If the globus.tcp.port.range is changed, the clientDataPortRange
# variable below MUST be changed accordingly.
#
java_options="-server -Xmx512m -XX:MaxDirectMemorySize=512m \
-Dsun.net.inetaddr.ttl=1800 \
-Dorg.globus.tcp.port.range=20000,25000 \
-Djava.net.preferIPv4Stack=true \
-Dorg.dcache.dcap.port=0 \
-Dorg.dcache.net.tcp.portrange=33115:33145 \
-Dlog4j.configuration=file:${ourHomeDir}/config/log4j.properties \
-Dorg.globus.jglobus.delegation.cache.lifetime=30000 \
"
# ---- User
#
# If defined, the UID of the java process will be set. Notice that
# log files will continue to be generated with the user id that
# invoked the init script. When undefined or left blank, the UID
# will not be changed.
#
#user=
#
# Additional option for Kerberos5 authentication:
# -Djava.security.krb5.realm=FNAL.GOV \
# -Djava.security.krb5.kdc=krb-fnal-1.fnal.gov \
#
# Other additional options that might be useful:
# -Djavax.security.auth.useSubjectCredsOnly=false \
# -Djava.security.auth.login.config=/opt/d-cache/config/jgss.conf \
# -Xms400m \
# ---- Classpath
#
# Do not change unless you know what you are doing.
#
classesDir=${ourHomeDir}/classes
classpath=
# ---- The Library path
#
# Do not change unless yoy know what you are doing.
#
# This is currently not used. It might contain .so libraries for JNI.
#
librarypath=${ourHomeDir}/lib
# -----------------------------------------------------------------------
# Filesystem Locations
# -----------------------------------------------------------------------
# ---- Location of the configuration files
#
# Do not change unless you know what you are doing.
#
config=${ourHomeDir}/config
# ---- Location of the ssh
#
# Do not change unless you know what you are doing.
#
keyBase=${ourHomeDir}/config
# ---- SRM/GridFTP authentication file
#
# Do not change unless you know what you are doing.
#
kpwdFile=${ourHomeDir}/etc/dcache.kpwd
# ---- Location of PID files
#
# Do not change unless you know what you are doing.
#
pidDir=/var/run
# -----------------------------------------------------------------------
# pool tuning
# -----------------------------------------------------------------------
# ---- General settings
#
# Do not change unless you know what you are doing.
#
#poolIoQueue=
#checkRepository=true
#waitForRepositoryReady=false
# ---- Allow pool to remove precious files on request from cleaner.
#
# This option is respected only when a pool is connected to an HSM
# ( lfs=none ). If lfs=precious then removal of precious files is
# always allowed.
#
#allowCleaningPreciousFiles=false
# ---- Which meta data repository implementation to use.
#
# Valid values are:
# org.dcache.pool.repository.meta.file.FileMetaDataRepository
# org.dcache.pool.repository.meta.db.BerkeleyDBMetaDataRepository
# The default is:
# org.dcache.pool.repository.meta.file.FileMetaDataRepository
#
# This selects which meta data repository implementation to use.
# This is essentially a choice between storing meta data in a large
# number of small files in the control/ directory, or to use the
# embedded Berkeley database stored in the meta/ directory. Both
# directories are within the pool directory.
#
#metaDataRepository=org.dcache.pool.repository.meta.file.FileMetaDataRepository
# ---- Which meta data repository to import from.
#
# Valid values are:
# org.dcache.pool.repository.meta.file.FileMetaDataRepository
# org.dcache.pool.repository.meta.db.BerkeleyDBMetaDataRepository
# org.dcache.pool.repository.meta.EmptyMetaDataRepository
# The default is:
# org.dcache.pool.repository.meta.EmptyMetaDataRepository
#
# This variable selects which meta data repository to import data
# from if the information is missing from the main repository. This
# is useful for converting from one repository implementation to
# another, without having to fetch all the information from the
# central PnfsManager.
#
#metaDataRepositoryImport=org.dcache.pool.repository.meta.EmptyMetaDataRepository
# -----------------------------------------------------------------------
# gPlazma tuning
# -----------------------------------------------------------------------
#
# Do not change unless you know what you are doing.
#
gplazmaPolicy=${ourHomeDir}/etc/dcachesrm-gplazma.policy
#
#gPlazmaNumberOfSimutaneousRequests 30
#gPlazmaRequestTimeout 30
#
#useGPlazmaAuthorizationModule=false
#useGPlazmaAuthorizationCell=true
#delegateToGPlazma=false
# -----------------------------------------------------------------------
# dcap tuning
# -----------------------------------------------------------------------
#
#gsidcapIoQueue=
#gsidcapIoQueueOverwrite=denied
#gsidcapMaxLogin=1500
#dcapIoQueue=
#dcapIoQueueOverwrite=denied
#dcapMaxLogin=1500
# -----------------------------------------------------------------------
# gsiftp tuning
# -----------------------------------------------------------------------
# ---- Period between successive GridFTP performance markers
#
# This variable controls how often performance markers are written.
# The value is in seconds: set performanceMarkerPeriod to 180 to
# get performanceMarkers every 3 minutes. A value of 0 will
# disable performance markers.
#
# Default: 180
#
#performanceMarkerPeriod=180
#gsiftpPoolManagerTimeout=5400
#gsiftpPoolTimeout=600
#gsiftpPnfsTimeout=300
#gsiftpMaxRetries=80
#gsiftpMaxStreamsPerClient=10
#gsiftpDefaultStreamsPerClient=5
#gsiftpDeleteOnConnectionClosed=true
#gsiftpMaxLogin=100
#clientDataPortRange=20000:25000
#gsiftpIoQueue=
#gsiftpAdapterInternalInterface=
#remoteGsiftpIoQueue=
#FtpTLogDir=
# ---- Whether passive GridFTP transfers are allowed.
#
# This option defines whether a pool should accept incoming
# connections for GridFTP transfers.
#
# Valid values are:
# 'true'
# 'false'
# The default is:
# 'false' for FTP doors
# 'true' for pools
#
# If this variable is set to true, pools are allowed accept
# incoming connections for GridFTP transfers. This only affects
# passive transfers. Only passive transfers using GFD.47 GETPUT
# (aka GridFTP 2) can be redirected to the pool. Other passive
# transfers will be channelled through a proxy component at the FTP
# door. If this variable is set to false, all passive transfers to
# through a proxy.
#
# This setting is interpreted by both FTP doors and pools, with
# different defaults. If set to true at the door, then the setting
# at the individual pool will be used.
#
#gsiftpAllowPassivePool=false
# -----------------------------------------------------------------------
# common to gsiftp and srm
# -----------------------------------------------------------------------
# ---- Whether the SRM Space Manager should be enabled.
#
#srmSpaceManagerEnabled=no
# ---- Whether implicit space reservations should be enabled.
#
# The following variable will have no effect unless the SRM Space
# Manager is enabled.
#
#srmImplicitSpaceManagerEnabled=yes
#overwriteEnabled=no
# -----------------------------------------------------------------------
# Web Interface Configuration
# -----------------------------------------------------------------------
# ---- Directory locations for dCache web interface
#
# The following two variables specify the absolute location of the
# image and style directories for the dCache-internal web server.
#
# Do not change them unless you know what you are doing.
#
images=${ourHomeDir}/docs/images
styles=${ourHomeDir}/docs/styles
# -----------------------------------------------------------------------
# Network Configuration
# -----------------------------------------------------------------------
# ---- Port Numbers for the various services
#
# Do not change these variables unless you know what you are doing.
#
portBase=22
dCapPort=${portBase}125
ftpPort=${portBase}126
kerberosFtpPort=${portBase}127
dCapGsiPort=${portBase}128
#gsiFtpPortNumber=2811
srmPort=8443
xrootdPort=1094
# ---- GridFTP port range
#
# Do not change unless you know what you are doing.
#
clientDataPortRange=20000:25000
# ---- Port Numbers for the monitoring and administration
#
# Do not change unless you know what you are doing.
#
adminPort=${portBase}223
httpdPort=${portBase}88
sshPort=${portBase}124
# Telnet is only started if the telnetPort line is uncommented.
# This should be for debug use only.
#telnetPort=${portBase}123
# ---- Transfer / TCP Buffer Size
#
# Do not change unless you know what you are doing.
#
bufferSize=1048576
tcpBufferSize=1048576
# -----------------------------------------------------------------------
# Maintenance Module Setup
# -----------------------------------------------------------------------
#
#maintenanceLibPath=${ourHomeDir}/var/lib/dCache/maintenance
#maintenanceLibAutogeneratePaths=true
#maintenanceLogoutTime=18000
# -----------------------------------------------------------------------
# Database Configuration
# -----------------------------------------------------------------------
#
# The srmDbHost variable is obsolete. For compatibility reasons,
# it is still used if set and the following variables are not.
#
# The current setup assumes that one or more PostgreSQL servers are
# used by the various dCache components. Currently the database user
# 'srmdcache' with password 'srmdcache' is used by all components.
# They use the databases 'dcache', 'replicas', 'companion' and
# 'billing'. However, these might be located on separate hosts.
#
# The most performant configuration is to have the database server
# running on the same host as the dCache component that will
# access it. Therefore, the default value for all the following
# variables is 'localhost'. Uncomment and change these variables
# only if you have a reason to deviate from this scheme.
#
# For example, one valid deployment would be to put the 'billing'
# database on different host than the pnfs server database and
# companion, but keep the httpDomain on the admin host.
# ---- pnfs Companion Database Host
#
# Do not change unless you know what you are doing.
#
# Database name: companion
#
#companionDatabaseHost=localhost
# ---- SRM Database Host
#
# NB. If the srmDbHost variable is set and the following variable
# is not then the value of srmDbHost is used.
#
# Do not change unless you know what you are doing.
#
# Database name: dcache
#
#srmDatabaseHost=localhost
# ---- Space Manager Database Host
#
# NB. If the srmDbHost variable is set and the following variable
# is not then the value of srmDbHost is used.
#
# Do not change unless you know what you are doing.
#
# Database name: dcache
#
#spaceManagerDatabaseHost=localhost
# ---- Pin Manager Database Host
#
# NB. If the srmDbHost variable is set and the following variable
# is not then the value of srmDbHost is used.
#
# Do not change unless you know what you are doing.
#
#pinManagerDbHost=localhost
# ---- Pin Manager Database Name
#
# NB. If the srmDbName variable is set and the following variable
# is not then the value of srmDbName is used.
#
# Do not change unless you know what you are doing.
#
#pinManagerDbName=dcache
# ---- Pin Manager Database User
#
# NB. If the srmDbUser variable is set and the following variable
# is not then the value of srmDbUser is used.
#
# Do not change unless you know what you are doing.
#
#pinManagerDbUser="srmdcache"
# ---- Pin Manager Database Host
#
# NB. If the srmDbPassword variable is set and the following
# variable is not then the value of srmDbPassword is used.
#
# Do not change unless you know what you are doing.
#
#pinManagerDbPassword=
# ---- Pin Manager Database Host
#
# NB. If the srmDbPasswordFile variable is set and the following
# variable is not then the value of srmDbPasswordFile is used.
#
# Do not change unless you know what you are doing.
#
# - Database name: dcache
#
#pinManagerPasswordFile=""
#
# ---- Pin Manager Maximum Number of Database connections
# Do not change unless yoy know what you are doing.
#
#pinManagerMaxActiveJdbcConnections=50
#
# ---- Pin Manager Maximum Number of seconds to wait for the connections
# before returning an error
# Do not change unless yoy know what you are doing.
#
#pinManagerMaxJdbcConnectionsWaitSec=180
#
# ---- Pin Manager Maximum Number of Idle Database connections
# Do not change unless yoy know what you are doing.
#
#pinManagerMaxIdleJdbcConnections=10
# ---- Replica Manager database settings
#
# Do not change unless you know what you are doing.
#
# Database name: replicas
#
#replicaManagerDatabaseHost=localhost
#replicaDbName=replicas
#replicaDbUser=srmdcache
#replicaDbPassword=srmdcache
#replicaPasswordFile=""
#resilientGroupName=ResilientPools
#replicaPoolWatchDogPeriod=600
#replicaWaitDBUpdateTimeout=600
#replicaExcludedFilesExpirationTimeout=43200
#replicaDelayDBStartTimeout=1200
#replicaAdjustStartTimeout=1200
#replicaWaitReplicateTimeout=43200
#replicaWaitReduceTimeout=43200
#replicaDebug=false
#replicaMaxWorkers=6
#replicaMin=2
#replicaMax=3
# ---- Allow overwrite of existing files via GSIdCap
#
# allow=true, disallow=false
#
truncate=false
# ---- pnfs Mount Point for (Grid-)FTP
#
# The current FTP door needs pnfs to be mounted for some file exist
# checks and for the directory listing. Therefore it needs to know
# where pnfs is mounted. In future the Ftp and dCap deamons will
# ask the pnfsManager cell for help and the directory listing is
# done by a DirListPool.
#
ftpBase=/pnfs/ftpBase
# -----------------------------------------------------------------------
# pnfs Manager Configuration
# -----------------------------------------------------------------------
# ---- pnfs Mount Point
#
# The mount point of pnfs on the admin node. The default value is:
# /pnfs/fs
#
pnfs=/pnfs/fs
# ---- Default pnfs server
#
# An older version of the pnfsManager actually autodetects the
# possible pnfs filesystems. The defaultPnfsServer variable is
# choosen from the list and used as primary pnfs filesystem.
# Currently the others are ignored. The pnfs variable can be used
# to override this mechanism.
#
#defaultPnfsServer=localhost
# -- leave this unless you are running an enstore HSM backend.
#
#pnfsInfoExtractor=diskCacheV111.util.OsmInfoExtractor
# ---- Number of threads per thread group
#
# Depending on how powerful your pnfs server host is you may set
# this to up to 50.
#
#pnfsNumberOfThreads=4
# ---- Number of cache location threads
#
# The number of threads used for cache location updates and
# lookups. If 0 then the regular pnfs manager thread queues are
# used for cache location lookups. If non-zero then dedicated
# threads for cache location operations are created.
#
#pnfsNumberOfLocationThreads=0
# ---- Number of thread groups
#
# A PNFS tree may be split into multiple databases. Each database is
# single threaded and hence accessing the same database from
# multiple threads provides only a minor speed-up. To ensure good
# load balancing when using multiple databases, the PnfsManager
# supports thread groups. Any database is assigned to one and only
# one thread group, thus databases assigned to different thread
# groups are guaranteed not to block each other. Each thread group
# will have $pnfsNumberOfThreads threads.
#
# For best performance isolation, set this to be equal the largest
# database ID defined in PNFS. When increasing
# pnfsNumberOfThreadGroups, you may want to lower
# pnfsNumberOfThreads.
#
# Notice that PNFS access is still subject to the number of threads
# created in the PNFS daemon. If this number is lower than the
# number of concurrent requests, then contention may still occur
# even though multiple databases are used.
#
#pnfsNumberOfThreadGroups=1
# ---- Number of list threads
#
# The PnfsManager uses dedicated threads for directory list
# operations. This variable controls the number of threads to
# use.
#
#pnfsNumberOfListThreads=1
# -- don't change this
#
#namespaceProvider=diskCacheV111.namespace.provider.BasicNameSpaceProviderFactory
# ---- Database configuration
#
# Only change these variables if you have configured you PostGreSQL
# instance other than as recommended in the dCache Book.
#
#pnfsDbUser=srmdcache
#pnfsDbPassword=srmdcache
#pnfsPasswordFile=
# ---- PnfsManager message folding
#
# Whether to use message folding in PnfsManager. When message folding
# is enabled, the PnfsManager will try to fold or collapse processing of
# identical messages. This can reduce the load on PNFS or Chimera if a
# large number of simulatenous requests on the same objects are performed.
#
#pnfsFolding=false
# ---- Storage for cacheinfo
#
# This variable defines where cacheinfo is to be stored.
#
# Valid values are:
# companion
# pnfs
#
# The default value is:
# pnfs
#
# If 'companion' is specified then the cacheinfo will be stored in a
# separate database. If 'pnfs' is specified, then cacheinfo will
# be stored in pnfs.
#
# For new installations, 'companion' is recommended.
#
# For existing installations that store cacheinfo in pnfs must use
# 'pnfs register' on every pool after switching from 'pnfs' to
# 'companion'. See the documentation for more details.
#
cacheInfo=companion
# ---- Default Access Latency and Retention Policy
#
# These variables affect only newly created files.
#
# The valid values are:
# AccessLatency : NEARLINE, ONLINE
# RetentionPolicy: CUSTODIAL, REPLICA, OUTPUT
# However, do not use OUTPUT.
#
#DefaultRetentionPolicy=CUSTODIAL
#DefaultAccessLatency=NEARLINE
# ---- Location of the trash directory
#
# The cleaner, which can only run on the pnfs server machine
# itself, autodetects the 'trash' directory. Non-empty 'trash'
# overwrites this autodetected value.
#
#trash=
# ---- Cleaner settings
#
# The cleaner stores persistency information in subdirectories of
# the following directory.
#
# cleanerDB=/opt/pnfsdb/pnfs/trash/2
# cleanerRefresh=120
# cleanerRecover=240
# cleanerPoolTimeout=100
# cleanerProcessFilesPerRun=500
# cleanerArchive=none
# ---- Whether to enable the HSM cleaner
#
# Valid values are:
# disabled
# enabled
#
# The default value is:
# disabled
#
# The HSM cleaner scans the PNFS trash directory for deleted
# files stored on an HSM and sends a request to an attached
# pool to delete that file from the HSM.
#
# The HSM cleaner by default runs in the PNFS domain. To
# enable the cleaner, this setting needs to be set to enabled
# at the PNFS domain *and* at all pools that are supposed
# to delete files from an HSM.
#
#hsmCleaner=disabled
# ---- Location of trash directory for files on tape
#
# The HSM cleaner periodically scans this directory to
# detect deleted files.
#
#hsmCleanerTrash=/opt/pnfsdb/pnfs/1
# ---- Location of repository directory of the HSM cleaner
#
# The HSM cleaner uses this directory to store information
# about files in could not clean right away. The cleaner
# will reattempt to clean the files later.
#
#hsmCleanerRepository=/opt/pnfsdb/pnfs/1/repository
# ---- Interval between scans of the trash directory
#
# Specifies the time in seconds between successive scans of the
# trash directory.
#
#hsmCleanerScan=90
# ---- Interval between retries
#
# Specifies the time in seconds between successive attempts to
# clean files stored in the cleaner repository.
#
#hsmCleanerRecover=3600
# ---- Interval between flushing failures to the repository
#
# When the cleaner fails to clean a file, information about this
# file is added to the repository. This setting specifies the time
# in seconds between successive flushes to the repository. Until
# the information is kept in memory and in the trash directory.
#
# Each flush will create a new file. A lower value will cause the
# repository to be split into more files. A higher value will
# cause a higher memory usage and a larger number of files in the
# trash directory.
#
#hsmCleanerFlush=60
# ---- Max. length of in memory queue of files to clean
#
# When the trash directory is scanned, information about deleted
# files is queued in memory. This variable specifies the maximum
# length of this queue. When the queue length is reached, scanning
# is suspended until files have been cleaned or flushed to the
# repository.
#
#hsmCleanerCleanerQueue=10000
# ---- Timeout for pool communication
#
# Files are cleaned from an HSM by sending a message to a pool to
# do so. This variable specifies the timeout in seconds after
# which the operation is considered to have failed.
#
#hsmCleanerTimeout=120
# ---- Maximum concurrent requests to a single HSM
#
# Files are cleaned in batches. This variable specified the
# largest number of files to include in a batch per HSM.
#
#hsmCleanerRequest=100
# -----------------------------------------------------------------------
# Directory Pools
# -----------------------------------------------------------------------
#
#directoryPoolPnfsBase=/pnfs/fs
# -----------------------------------------------------------------------
# Srm Settings for experts
# -----------------------------------------------------------------------
#
#srmVersion=version1
#pnfsSrmPath=/
#parallelStreams=10
#srmAuthzCacheLifetime=60
#srmGetLifeTime=14400000
#srmBringOnlineLifeTime=14400000
#srmPutLifeTime=14400000
#srmCopyLifeTime=14400000
#srmTimeout=3600
#srmVacuum=true
#srmVacuumPeriod=21600
#srmProxiesDirectory=/tmp
#srmBufferSize=1048576
#srmTcpBufferSize=1048576
#srmDebug=true
#srmGetReqThreadQueueSize=10000
#srmGetReqThreadPoolSize=250
#srmGetReqMaxWaitingRequests=1000
#srmGetReqReadyQueueSize=10000
#srmGetReqMaxReadyRequests=2000
#srmGetReqMaxNumberOfRetries=10
#srmGetReqRetryTimeout=60000
#srmGetReqMaxNumOfRunningBySameOwner=100
#srmBringOnlineReqThreadQueueSize=10000
#srmBringOnlineReqThreadPoolSize=250
#srmBringOnlineReqMaxWaitingRequests=1000
#srmBringOnlineReqReadyQueueSize=10000
#srmBringOnlineReqMaxReadyRequests=2000
#srmBringOnlineReqMaxNumberOfRetries=10
#srmBringOnlineReqRetryTimeout=60000
#srmBringOnlineReqMaxNumOfRunningBySameOwner=100
#srmPutReqThreadQueueSize=10000
#srmPutReqThreadPoolSize=250
#srmPutReqMaxWaitingRequests=1000
#srmPutReqReadyQueueSize=10000
#srmPutReqMaxReadyRequests=1000
#srmPutReqMaxNumberOfRetries=10
#srmPutReqRetryTimeout=60000
#srmPutReqMaxNumOfRunningBySameOwner=100
#srmCopyReqThreadQueueSize=10000
#srmCopyReqThreadPoolSize=250
#srmCopyReqMaxWaitingRequests=1000
#srmCopyReqMaxNumberOfRetries=10
#srmCopyReqRetryTimeout=60000
#srmCopyReqMaxNumOfRunningBySameOwner=100
#srmPoolManagerTimeout=300
#srmPoolTimeout=300
#srmPnfsTimeout=300
#srmMoverTimeout=7200
#remoteCopyMaxTransfers=150
#remoteHttpMaxTransfers=30
#remoteGsiftpMaxTransfers=${srmCopyReqThreadPoolSize}
#
#srmDbName=dcache
#srmDbUser=srmdcache
#srmDbPassword=srmdcache
#srmDbLogEnabled=false
#
# srmls settings follow
#
# The following variable turnes of asynchronous srmls
# behavior. SrmLs is executed in non-blocking mode on a
# thread queue in the server and client is given request token.
# Client can query status of request using this token. Async.
# srmls avoids holding connections to the server while srmls is
# executed.
#
#srmAsynchronousLs=false
#
# Number of entries allowed to be returnes in a single srmls request
# (e.g. number of files in directory)
#
#srmLsMaxNumberOfEntries=1000
#
# Maximum recursion depth
#
#srmLsMaxNumberOfLevels=100
#
# Srmls schedule parameters:
#
#srmLsRequestThreadQueueSize=1000
#srmLsRequestThreadPoolSize=30
#srmLsRequestMaxWaitingRequests=1000
#srmLsRequestReadyQueueSize= 1000
#srmLsRequestMaxReadyRequests=60
#srmLsRequestMaxNumberOfRetries=10
#srmLsRequestRetryTimeout=60000
#srmLsRequestMaxNumberOfRunningBySameOwner=100
#srmLsRequestLifetime=3600000
#
# The following variable enables logging of the history of the SRM
# request transitions in the database so that it can be examined
# though the srmWatch monitoring tool.
#srmJdbcMonitoringLogEnabled=false
#
# Enabling the following option turns off the latest changes that
# made service to honor the SRM client's protocol list order for
# GET/PUT commands. This is needed temporarily to support old
# srmcp clients.
#srmIgnoreClientProtocolOrder=false
# ---- SRM Password file.
#
# Set the following variable to /root/.pgpass for improved security.
#
# srmPasswordFile=
# -- Enable overwrite for SRM v1.1.
#
# Set the following variable to true if you want overwrite to be
# enabled for the SRM v1.1 interface as well as for SRM v2.2
# interface when client does not specify desired overwrite mode.
# This option will be considered only if the overwriteEnabled
# variable is set to yes (or true).
#
# srmOverwriteByDefault=false
# ---- Enable custom address resolution.
#
# The srmCustomGetHostByAddr option enables a custom IP resolution,
# if the standard InetAddress method fails.
#
# srmCustomGetHostByAddr=false
# --srmClientDNSLookup
# perform the lookup of the client hostname on basis of client ip
# the result is used in pool pool selection
# if srmClientDNSLookup is set to false (default)
# client ip is used
# srmClientDNSLookup=false
# ---- Enable automatic creation of directories.
#
# Allow automatic creation of directories via SRM
#
# allow=true, disallow=false
#
RecursiveDirectoryCreation=true
# ---- Allow delete via SRM
#
# Allow deletion of files via the SRM interface.
#
# allow=true, disallow=false
#
AdvisoryDelete=true
#pinManagerDatabaseHost=${srmDbHost}
#spaceManagerDatabaseHost=${srmDbHost}
# ---- Reserve space for non SRM transfers.
#
# If the transfer request comes from the door and there was no
# prior space reservation made for this file, should we try to
# reserve space before satisfying the request?
#
#SpaceManagerReserveSpaceForNonSRMTransfers=false
# ---- Location of LinkGroupAuthorizationFile
#
# The LinkGroupAuthorizationFileName file contains the list of VOMS
# FQANs that are allowed to make space reservations within a given
# link group.
#
#SpaceManagerLinkGroupAuthorizationFileName=/opt/d-cache/etc/LinkGroupAuthorization.conf
# --- Default access latency used if space reservation request
# does not specify one
#
#DefaultAccessLatencyForSpaceReservation=${DefaultAccessLatency}
# if the srm is restarted and there are pending requests
# their state will change to Failed or Done
# if srmCleanPendingRequestsOnRestart is true
#srmCleanPendingRequestsOnRestart=false
# -----------------------------------------------------------------------
# Logging Configuration
# -----------------------------------------------------------------------
# ---- Directory for the Log Files
#
# If no value is set, the default value is:
# ${ourHomeDir}/log/
#
logArea=/var/log
# ---- Restart behaviour
#
# This variable describes what should be done with an existing log
# file when a domain is restarted. The options are either to rename
# LOGFILE to LOGFILE.old so allowing a new log file to be created,
# or to retain the log file and subsequent logging information will
# be appended.
#
# The valid values are:
# new
# keep
# The default value is:
# keep
#
#logMode=keep
# -----------------------------------------------------------------------
# Billing / Accounting
# -----------------------------------------------------------------------
# ---- Directory for billing logs
#
# The directory within which the billing logs are to be written.
#
billingDb=${ourHomeDir}/billing
# ---- Store billing data in database
#
# This variable describes whether the billing information should be
# written to a PostgreSQL database. A database called 'billing' must
# be created.
#
#billingToDb=no
# The PostgreSQL database host:
# EXPERT: First is default if billingToDb=no, second for billingToDb=yes
#billingDatabaseHost=localhost
#billingDbUer=srmdcache
#billingDbPass=srmdcache
#billingDbName=billing
#billingDbCommitRows=100
#billingDbCommitIntervalInMilliseconds=30000
# the following enables using pgfile, which is disabled by
#billingDbPgPassFileName=/root/.pgpass
# ------------------------------------------------------------------------
# Info-based info provider
# ------------------------------------------------------------------------
#
# The following variables are used by the script that generates
# LDIF-formatted data from the XML data the info service provides.
# This requires both the info service and the internal dCache web
# service to be running. The web service must be accessible from
# whichever machine the info provider is executed on.
# ---- Host that is running the web service
#
# The name of the machine that is running the dCache web service.
# This is used to build the URI for fetching dCache's current
# state. If no value is used, localhost is used as a default
# value.
#
#httpHost=localhost
# ---- TCP port used by web service
#
# The TCP port on which the web service listens. If no value
# is specified then 2288 is used as a default.
#
#httpPort=2288
# ---- Directory of LDAP transformation configuration
#
# This variable describes in which directory the configuration file
# is stored. The default value is $ourHomeDir/etc
#
#xylophoneConfigurationDir=$ourHomeDir/etc
# ---- Filename of LDAP transformation configuration
#
# This variable provides the filename that describes how the XML
# should be transformed. The default value is glue-1.3.xml
#
#xylophoneConfigurationFile=glue-1.3.xml
# ---- XSLT processor
#
# This variable describes which XSLT processor to use. The current
# valid options are xsltproc and saxon. If none is specified then
# saxon is used by deafult.
#
#xsltProcessor=saxon
# -----------------------------------------------------------------------
# Info Provider
# -----------------------------------------------------------------------
#
# The following variables are used by the (old) dynamic info
# provider, which is used for integration of dCache as a storage
# element in the WLCG information system. All variables are used by
# the client side of the dynamic info provider which is called
# at regular intervals by the gLite GIP (generic info provider)
# framework. It consists of the two scripts:
#
# jobs/infoDynamicSE-plugin-dcache
# jobs/infoDynamicSE-provider-dcache
# ---- Time between retrievals
#
# The time, in seconds, between successive information retrievals.
# Default: 180
#
#infoCollectorInterval=180
# ---- Location of static LDIF
#
# The static LDIF file used by GIP. This is also used by the
# plugin to determine the info it should output.
# Default: /opt/lcg/var/gip/ldif/lcg-info-static-se.ldif
#
#infoProviderStaticFile=/opt/lcg/var/gip/ldif/lcg-info-static-se.ldif
# ---- Where infoCollector service is running
#
# This is the hostname of the node that runs the infoCollector
# service. The default value is localhost.
#
#infoCollectorHost=localhost
# ---- The port on which the InfoCollector cell will listen
#
# This variable is used by the InfoCollector cell as well as the
# dynamic info provider scripts. The default value is 22111.
#
#infoCollectorPort=22111
# ------------------------------------------------------------------------
# Statistics module
# ------------------------------------------------------------------------
# ---- Directory for storing statistics.
#
# This is the directory under which the statistics module will
# store historic data.
#
statisticsLocation=${ourHomeDir}/statistics
# ------------------------------------------------------------------------
# xrootd Configuration
# ------------------------------------------------------------------------
# ---- Global read-only
#
# This variable controls whether any write access is permitted.
# This is to avoid any unauthenticated writes. The variable
# overrides all other authorization settings.
#
#xrootdIsReadOnly=true
# ---- Writable paths
#
# This variable describes which directories have write access.
# Xrootd clients may only write into these directories and their
# subdirectories. This variable overrides any remote authorization
# settings; for example, from the filecatalogue.
#
#xrootdAllowedPaths=/path1:/path2:/path3
# ---- Authorization options
#
# The following two variables enable authorization in the xrootd
# door. Currently, dCache supports only one plugin, which
# implements token based authorization controlled by a remote
# filecatalogue. This requires an additional keystore file that
# holds the keypairs needed to do the authorisation. A template
# keystore file can be found in ${ourHomeDir}/etc/keystore.temp.
#
#xrootdAuthzPlugin=org.dcache.xrootd.security.plugins.tokenauthz.TokenAuthorizationFactory
#xrootdAuthzKeystore=${ourHomeDir}/etc/keystore
# ---- Mover queue
#
# The mover queue on the pool to which this request will be scheduled.
#
#xrootdIoQueue=
# ---- Max concurrent connections.
#
# The maximum number of simultaneous physical connections (aka
# Logins) to permit.
#
#xrootdMaxLogin=50
# ---- Max concurrent open files per connection.
#
# This variable describes the maximum number of simultaneous open
# files per physical connection (e.g., a single ROOT client
# instance).
#
#xrootdMaxOpenFilesPerConnection=5000
# -----------------------------------------------------------------------
# ACL Configuration
# -----------------------------------------------------------------------
#
# The following options describe how dCache ACL support will contact
# a database for querying and updating ACLs.
# By default, the table 't_acl' is used in database 'chimera' on
# the machine 'localhost'.
# If Chimera is deployed with the 'chimera' database on the same machine
# as ChimeraDomain then the table will exist locally and
# no configuration is needed.
# If PNFS is deployed then a suitable table must be created and
# the acl variables adjusted accordingly.
#
# One of the following cases must be used:
# 1) only UNIX permissions are used
# permissionHandler=diskCacheV111.services.acl.UnixPermissionHandler
# 2) only ACL permissions are used
# permissionHandler=diskCacheV111.services.acl.ACLPermissionHandler
# 3) ACL permissions are used first. If ACLs do not state whether
# an operation is allowed or denied then UNIX permissions are used
# permissionHandler=diskCacheV111.services.acl.ACLPermissionHandler,diskCacheV111.services.acl.UnixPermissionHandler
#
# The default case is 1).
#
#
#permissionHandler=diskCacheV111.services.acl.UnixPermissionHandler
#aclEnabled=false
#aclTable=t_acl
#aclConnDriver=org.postgresql.Driver
#aclConnUrl=jdbc:postgresql://localhost/chimera?prepareThreshold=3
#aclConnUser=postgres
#aclConnPswd=
# -----------------------------------------------------------------------
# Tape protection
# -----------------------------------------------------------------------
# Tape protection feature is only available if stageConfigurationFilePath line is uncommented,
# and there is a similarly named file containing a list of FQANs and DNs whose owners
# are allowed to stage files (i.e., to read files from dCache that are stored only on tape).
#
# Stage configuration can be provided either on the door or on the PoolManager as described
# in the following two cases below:
# 1) stage configuration provided on the door
# (remember to repeat the same configuration on each door):
# stagePolicyEnforcementPoint=doors
# 2) stage configuration provided on the PoolManager:
# stagePolicyEnforcementPoint=PoolManager
#
# The default case is 1).
#
#stageConfigurationFilePath=${ourHomeDir}/config/StageConfiguration.conf
#stagePolicyEnforcementPoint=doors
07070100204c36000081a4000000650000000a000000014ad7323200000707000000b600010008ffffffffffffffff0000002b00000000reloc/opt/d-cache/etc/dcache.kpwd.template # This file was automatically generated by KAuthFile class
# Semiformal definition of the file format follows
#
# The file has the following format:
# FILE = TOKENS
# TOKENS = TOKEN | TONENS NL TOKEN
# TOKEN = COMMENT | MAPPING | RECORD | PWDRECORD | EMPTYLINE
# NL =
# WS =
# COMMENT = WS '#'
# PWDRECORD = WS passwd WS USER WS PASSWDHASH WS UID WS GID WS HOME WS ROOT WS [FSROOT WS]
# PASSWDHASH =
# PWDRECORD = WS USER WS PASSWDHASH WS UID WS GID WS HOME WS ROOT WS [FSROOT WS]
# RECORD = USERAUTHENTICATION [SECUREIDS] EMPTYLINE
# USERAUTHENTICATION = WS login WS USER WS UID WS GID WS HOME WS ROOT WS [FSROOT WS]
# USER =
# UID =
# GID =
# HOME =
# ROOT =
# FSROOT =
# SECUREIDS = SECUREIDS ([COMMENT] |[SECUREIDLINE]) NL
# SECUREIDLINE = WS SECUREID WS NL
# SECUREID = |
# EMPTYLINE = WS NL
# MAPPING = WS mapping WS SECUREID USER NL
#
# the following are the mappings from secure credetials ids to user names
# these are used to map credentials to the default user,
# if user is not supplied and can not be derived from credentials
# in user created files this do not have to be in a separate section
version 2.1
mapping "/O=Grid/O=Globus/OU=domain.org/CN=EXP Production" local-account
# the following are the user auth records
login local-account read-write uid gid / / /
/O=Grid/O=Globus/OU=domain.org/CN=EXP Production
# the following are the user auth records
07070100204c3b000081a4000000650000000a000000014ad73232000006c1000000b600010008ffffffffffffffff0000002b00000000reloc/opt/d-cache/etc/node_config.template #
# $Id: node_config.template,v 1.6 2007-06-19 10:04:10 tigran Exp $
#
# ---- Overall configuration
#
DCACHE_HOME=/opt/d-cache
POOL_PATH=/opt/d-cache/etc
NUMBER_OF_MOVERS=100
# ---- Name Space configuration
#
# The supported name space implementations are Chimera and PNFS.
#
# Possible values for the NAMESPACE variable are chimera or pnfs.
# If nothing is specified or the value is invalid then pnfs is used.
#
NAMESPACE=pnfs
PNFS_ROOT=/pnfs
PNFS_INSTALL_DIR=/opt/pnfs
PNFS_START=yes
PNFS_OVERWRITE=no
# SERVER_ID defaults to `hostname -d`
#SERVER_ID=domain.name
# ---- Name Space Node
#
# The name space node is the node that exports the name space
# through NFS. For PNFS this will be the node running the PNFS
# daemons. For Chimera this will be any node running the Chimera
# NFSv3 daemon.
#
# This variable was formally known as the "ADMIN_NODE" and now
# has been renamed.
#
#NAMESPACE_NODE=myNameSpaceNode
# ---- Service groups to be started on this node
#
# Service groups to start on this host. Legitimate values are:
#
# admin
#
# Starts the following services in addition to what is specified
# in the SERVICES parameter: lm, dCache, chimera or pnfs, dir,
# admin, httpd, utility and gPlazma.
#
NODE_TYPE=
# ---- Custom services to be started on this node
#
# White space separated list of services or domains to start on this
# host. Legitimate service names are
#
# dcap, gPlazma, xrootd, gridftp, gsidcap, srm, admin,
# infoProvider, chimera, pnfs, httpd, utility, dir, info,
# statistics, lm, dCache, replica
#
# or any domain name prefix. These services are started in addition
# to the services selected by the NODE_TYPE parameter.
#
SERVICES=
07070100204c3c000081a4000000650000000a000000014ad7323200000030000000b600010008ffffffffffffffff0000002900000000reloc/opt/d-cache/etc/pool_path.template /xxxx 10 no
/xxxx 30 no
/xxxx 20 no
/xxxx 50 no
07070100204c43000081a4000000650000000a000000014ad73232000004f9000000b600010008ffffffffffffffff0000002400000000reloc/opt/d-cache/etc/srm_setup.env #
#
#
JAVA_HOME=/opt/jdk1.5.0_09
JAVA_OPTS="-Xmx512m -Djava.awt.headless=true -Dorg.globus.jglobus.delegation.cache.lifetime=30000"
DCACHE_HOME=/opt/d-cache
DCACHE_JARS_DIR=${DCACHE_HOME}/classes
SRM_JARS_DIR=${DCACHE_JARS_DIR}
CELLS_JARS_DIR=${DCACHE_JARS_DIR}
AXIS_ARCHIVE=${DCACHE_HOME}/external/axis-1_3.tar.gz
TOMCAT_ARCHIVE=${DCACHE_HOME}/external/apache-tomcat-5.5.20.tar.gz
GLOBUS_JARS_DIR=${DCACHE_HOME}/classes/cog
AXIS_BASE_PATH=${DCACHE_HOME}/libexec
TOMCAT_BASE_PATH=${DCACHE_HOME}/libexec
TOMCAT_PORT=8080
TOMCAT_HTTP_ENABLED=false #must be true to enable srm monitoring
SRM_WEBAPP_DIR=${DCACHE_HOME}/srm-webapp
SRM_BATCH=${DCACHE_HOME}/config/srm.batch
SRM_SETUP=${DCACHE_HOME}/config/srmSetup
SRM_STORAGE_CLASS=diskCacheV111.srm.dcache.Storage
SRM_LOG_CONFIG=${DCACHE_HOME}/etc/logConfig.xml
X509_CERT=/etc/grid-security/hostcert.pem
X509_KEY=/etc/grid-security/hostkey.pem
X509_CA_CERT_DIR=/etc/grid-security/certificates
GRID_MAPFILE=/etc/grid-security/grid-mapfile
SRM_V2_PORT=8443
SRMV1_WSDD=${DCACHE_HOME}/etc/srmv1-deploy.wsdd
SRMV2_WSDD=${DCACHE_HOME}/etc/srmv2.2-deploy.wsdd
TOMCAT_STARTUP_DELAY=10
DELETE_OLD_AXIS_TOMCAT=true
TOMCAT_MAX_THREADS=500
TOMCAT_MIN_SPARE_THREADS=25
TOMCAT_MAX_SPARE_THREADS=200
PID_DIR=/var/run
TOMCAT_ACCEPT_COUNT=1024
07070100204c45000081a4000000650000000a000000014ad7320e00012451000000b600010008ffffffffffffffff0000002a00000000reloc/opt/d-cache/etc/srmv2.2-deploy.wsdd
07070100204c3e000081a4000000650000000a000000014ad732320000030e000000b600010008ffffffffffffffff0000002b00000000reloc/opt/d-cache/etc/psql_drop_dcache.sql DROP TABLE copyfilerequests ;
DROP TABLE copyfilerequests_b ;
DROP TABLE copyrequests ;
DROP TABLE copyrequests_b ;
DROP TABLE getrequests_protocols ;
DROP TABLE getrequests_protocols_b ;
DROP TABLE getfilerequests ;
DROP TABLE getfilerequests_b ;
DROP TABLE getrequests ;
DROP TABLE getrequests_b ;
DROP TABLE pins ;
DROP TABLE pinrequests ;
DROP TABLE srmnextrequestid ;
DROP TABLE putrequests_protocols ;
DROP TABLE putrequests_protocols_b ;
DROP TABLE putfilerequests ;
DROP TABLE putfilerequests_b ;
DROP TABLE putrequests ;
DROP TABLE putrequests_b ;
DROP TABLE srmrequestcredentials ;
DROP TABLE nextpinrequestid ;
DROP TABLE pinrequestsv1 ;
DROP TABLE spacemanagernextid ;
DROP TABLE spacemanagerpoolreservation ;
DROP TABLE spacemanagerpoolspace ;
07070100204b42000041ed000000650000000a000000024ad7323400000000000000b600010008ffffffffffffffff0000001600000000reloc/opt/d-cache/bin 07070100204b43000081ed000000650000000a000000014ad732320000155f000000b600010008ffffffffffffffff0000002900000000reloc/opt/d-cache/bin/dCacheConfigure.sh #!/bin/sh
UTILMODULES="central_certs userhandling yaimlog check_users_conf_format users_getspecialusers cron_job requires config_file run set_mysql_passwd split_quoted_variable users_getfirstpoolaccount users_getprduser users_getsgmuser users_getvogroup users_getvoprefix "
#UTILSDIR=`pwd`/utils
#MODULEDIR=`pwd`/modules/
CONFIGTARGETS="config_se_dcache"
help()
{
echo "-s --site-info [site-info.def] Siteinfo"
echo "-c --configure [target] select the target or 'all'"
echo "-d --dcache-home [/opt/d-cache] The location of dcache home"
echo "-l --list List all the configuration targets."
echo "-m --dirmodules Directory with configuration modules."
echo "-u --dirutils Directory with Utility Modules."
echo "-h --help show this help."
}
getDcacheInstallPrefix()
{
if [ -n "${HOMEDCACHE}" ] ; then
RET=${HOMEDCACHE}
return
fi
if [ -z "${HOMEDCACHE}" ] ; then
HOMEDCACHE="/opt/d-cache/"
fi
RET=${HOMEDCACHE}
}
getModulesDir()
{
local testDir
RET=""
if [ -n "${MODULEDIR}" ] ; then
RET=${MODULEDIR}
return
fi
testDir=`pwd`/modules
if [ -d "${testDir}" ] ; then
RET=${testDir}
return
else
getDcacheInstallPrefix
testDir="${RET}/share/dCacheConfigure/modules/"
if [ -d "${testDir}" ] ; then
RET=${testDir}
return
fi
fi
return
}
getUtilsDir()
{
local testDir
RET=""
if [ -n "${UTILSDIR}" ] ; then
RET=${UTILSDIR}
return
fi
testDir=`pwd`/utils
if [ -d "${testDir}" ] ; then
RET=${testDir}
return
else
getDcacheInstallPrefix
testDir="${RET}/share/dCacheConfigure/utils/"
RET=""
if [ -d "${testDir}" ] ; then
RET=${testDir}
return
fi
fi
return
}
requiresAlist=0
while [ $# -ne 0 ]
do
# Default to shifting to next parameter
shift_size=1
if [ $1 = "--help" -o $1 = "-h" ]
then
help
exit 0
fi
if [ $1 = "--site-info" -o $1 = "-s" ]
then
SITEINFOFILELOCATION=$2
shift_size=2
fi
if [ $1 = "--configure" -o $1 = "-c" ]
then
SELECTEDMODULES="${SELECTEDMODULES} ${2}"
shift_size=2
fi
if [ $1 = "--list" -o $1 = "-l" ]
then
requiresAlist=1
fi
if [ $1 = "--dcache-home" -o $1 = "-d" ]
then
HOMEDCACHE=$2
shift_size=2
fi
if [ $1 = "--dirmodules" -o $1 = "-m" ]
then
MODULEDIR=$2
shift_size=2
fi
if [ $1 = "--dirutils" -o $1 = "-u" ]
then
UTILSDIR=$2
shift_size=2
fi
if [ $# -ge $shift_size ]
then
# Shift correctly for paramters
shift $shift_size
else
# Ok so a paramaterised function contains no valid attribute
echo "${0} parameter ${1} requires an attribute"
exit 1
fi
done
getUtilsDir
UTILSDIR=${RET}
getModulesDir
MODULEDIR=${RET}
if [ "${UTILSDIR}" == "" ] ; then
help
echo Utility directory not found please specify it on the command line.
exit 1
fi
if [ "${MODULEDIR}" == "" ] ; then
help
echo Modules directory not found please specify it on the command line.
exit 1
fi
if [ ! -d "${UTILSDIR}" ] ; then
echo Utility directory ${UTILSDIR} does not exist.
exit 1
fi
if [ ! -d "${MODULEDIR}" ] ; then
echo Modules directory ${MODULEDIR} does not exist.
exit 1
fi
for util in ${UTILMODULES}
do
if [ -f "${UTILSDIR}/${util}" ] ; then
. ${UTILSDIR}/${util}
else
echo "ERROR UTIL '${UTILSDIR}/${util}' not found"
exit 1
fi
done
# now source all the modules.
for module in `ls ${MODULEDIR}/`
do
if [ -f "${MODULEDIR}/$module" ] ; then
worthSrcing=$(grep ${module}_check ${MODULEDIR}/$module)
# Evil code which should be deleted when lfield fixes his code
if [ "${module}" == "config_bdii_only" -o "${module}" == "config_gip_only" ] ; then
worthSrcing="yes"
fi
# Evil code end.
if [ -n "${worthSrcing}" ] ; then
. ${MODULEDIR}/${module}
#echo ${module}_check
${module}_check 2> /dev/null
moduleRet=$?
if [ "${moduleRet}" == "0" ] ; then
AVAILABLEMODS="${AVAILABLEMODS} ${module}"
fi
else
echo "INFO module '$module' does not have a ${module}_check function."
fi
else
echo "INFO module '$module' not found"
exit 1
fi
done
# now list the modules
if [ "${requiresAlist}" == "1" ] ; then
echo "The Following configuration modules exist"
for module in ${AVAILABLEMODS}
do
echo $module
done
exit 0
fi
VERIFIEDMODS=""
for selmodule in ${SELECTEDMODULES}
do
if [ "$selmodule" == "all" ] ; then
VERIFIEDMODS=$AVAILABLEMODS
else
for vermodule in ${AVAILABLEMODS}
do
if [ "${vermodule}" == "${selmodule}" ] ; then
VERIFIEDMODS="${VERIFIEDMODS} ${vermodule}"
fi
done
fi
done
if [ "${AVAILABLEMODS}" == "" ] ; then
echo No modules available please check your modules directory.
echo Modules directory is currently set to ${MODULEDIR}.
exit 1
fi
if [ "${VERIFIEDMODS}" == "" ] ; then
echo "No valid modules selected to be run."
echo "The following modules can be selected"
for amodule in ${AVAILABLEMODS}
do
echo ${amodule}
done
exit 1
fi
if [ -z "$SITEINFOFILELOCATION" ] ; then
echo site-info file not set.
help
exit 1
fi
if [ ! -f "$SITEINFOFILELOCATION" ] ; then
echo site-info.def file not found.
exit 1
fi
. $SITEINFOFILELOCATION
# Now run the modules
for module in ${VERIFIEDMODS}
do
${module}_run
done
07070100204b45000081ed000000650000000a000000014ad7323200000ba3000000b600010008ffffffffffffffff0000002100000000reloc/opt/d-cache/bin/dcache-srm #!/bin/sh
# $Id: dcache-srm,v 1.5 2007-08-14 21:13:00 tigran Exp $
#
# chkconfig: - 91 9
# description: srm tomcat startup script
#
ourHomeDir=/opt/d-cache
cmd1=$1
if [ -r ${ourHomeDir}/etc/srm_setup.env ] ; then
. ${ourHomeDir}/etc/srm_setup.env
fi
hostname=`hostname | awk -F. '{print $1}'`
PID_DIR=${PID_DIR:-/var/run}
JAVA_OPTS="${JAVA_OPTS} -Dorg.globus.jglobus.delegation.cache.lifetime=30000"
# we need to activate the globus gsi key pair caching for those installations that
# continue to use dCacheSetup where -Dorg.globus.jglobus.delegation.cache.lifetime is not
# specified
if ! echo "${JAVA_OPTS}" | grep -- "-Dorg\.globus\.jglobus\.delegation\.cache\.lifetime=" 2>&1 >/dev/null ; then
JAVA_OPTS="${JAVA_OPTS} \
-Dorg.globus.jglobus.delegation.cache.lifetime=30000"
fi
export JAVA_HOME
export JAVA_OPTS
export CATALINA_HOME=${TOMCAT_BASE_PATH}/apache-tomcat-5.5.20
export config=${ourHomeDir}/config
export CATALINA_PID=${PID_DIR}/dcache.srm-${hostname}Domain.pid
export X509_CERT
export X509_KEY
export SRM_V2_PORT
procStop() {
if [ ! -f ${CATALINA_PID} ] ; then
echo "Cannot find appropriate pid file (${CATALINA_PID})" 1>&2
exit 0
fi
x=`cat ${CATALINA_PID}`
if [ -z "$x" ] ; then
echo "Pid file (${CATALINA_PID}) does not contain valid PID" 1>&2
exit 1
fi
touch ${config}/realStop.lastPid.srm-${hostname} 2>/dev/null
kill -TERM $x 1>/dev/null 2>/dev/null
printf "Stopping srm-${hostname} (pid=`cat ${CATALINA_PID}`) "
for c in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
kill -0 $x 1>/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
rm -f $CATALINA_PID
echo "Done"
exit 0
fi
printf "$c "
sleep 1
if [ $c -eq 9 ] ; then
kill -9 $x
fi
done
echo "Giving up : srm-${hostname} might still be running" 1>&2
exit 4
}
case $cmd1 in
start)
if [ -f ${CATALINA_PID} ] ; then
x=`cat ${CATALINA_PID}`
kill -0 $x 1>/dev/null 2>/dev/null
if [ $? -eq 0 ] ; then
echo "srm-${hostname} might still be running" 1>&2
exit 4
fi
fi
${TOMCAT_BASE_PATH}/apache-tomcat-5.5.20/bin/startup.sh
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/srm-tomcat
echo "Pinging srm server to wake it up, will take few seconds ..."
export CLASSPATH
sleep 2
for jar in `find /opt/d-cache/classes/ -name '*jar'`; do CLASSPATH=${CLASSPATH}:${jar}; done
$JAVA_HOME/bin/java org.dcache.srm.client.SrmStartUpPing
echo "Done"
;;
stop)
${TOMCAT_BASE_PATH}/apache-tomcat-5.5.20/bin/shutdown.sh
procStop
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/srm-tomcat
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
07070100204b44000081ed000000650000000a000000014ad7323200004146000000b600010008ffffffffffffffff0000001d00000000reloc/opt/d-cache/bin/dcache #!/bin/sh
#
# chkconfig: 2345 92 8
# description: dCache init script
# Solaris doesn't have a POSIX compliant shell as /bin/sh. We
# try to find one and execute it.
if [ "$1" = "%" ]; then
shift
elif [ "`uname`" = "SunOS" ]; then
if [ -x /usr/xpg4/bin/sh ]; then
exec /usr/xpg4/bin/sh $0 % $*
elif [ -x /bin/bash ]; then
exec /bin/bash $0 % $*
else
echo "Cannot find POSIX compliant shell. This script will"
echo "probably break, but we attempt to execute it anyway."
fi
fi
# Prints help screen and exits with error status 2
usage()
{
echo "Usage: $(basename $0) [OPTION]... COMMAND"
echo
echo "Valid options are:"
echo " -d= default is /opt/d-cache"
echo
echo "Valid commands are:"
echo " condrestart [ ...]"
echo " dump heap [--force] "
echo " dump threads [ ...]"
echo " pool create "
echo " pool add [--fqdn] [--domain=] [--lfs=] "
echo " pool ls"
echo " pool reconstruct "
echo " pool remove "
echo " restart [ ...]"
echo " services"
echo " start [ ...]"
echo " status"
echo " stop [ ...]"
echo " version"
echo
echo "Size is specified in bytes, or optionally followed by K, M, G or T"
echo "for powers of 1024. Size is rounded down to the nearest integer "
echo "number of GiB."
exit 2
} 1>&2
checkReadlinkf()
{
if [ ! "$hasReadlinkf" ] ; then
readlink -f . > /dev/null 2>&1
hasReadlinkf=$?
fi
return $hasReadlinkf
}
# Get the canonical path of $1. Only returns a truely canonical path
# if readlink is available. Otherwise an absolute path which does not
# end in a symlink is returned.
getCanonicalPath() # $1 = path
{
local link
link="$1"
if checkReadlinkf ; then
RET="$(readlink -f $link)"
else
RET="$(cd $(dirname $link); pwd)/$(basename $link)"
while [ -h "$RET" ]; do
link="$(ls -ld $RET | sed 's/.*-> //')"
if [ -z "${link##/*}" ]; then
RET="${link}"
else
link="$(dirname $RET)/${link}"
RET="$(cd $(dirname $link); pwd)/$(basename $link)"
fi
done
fi
}
# Returns true if $1 is contained as a word in $2.
contains() # $1 = word, $2+ = list
{
local word
word=$1
shift
for i in "$@"; do
if [ "$word" = "$i" ]; then
return 0
fi
done
return 1
}
# Generic option parser. Both single and multi character options are
# supported. Single character options start with a single dash and
# multi character options with a double dash. Single character options
# can be combined, e.g. rather than -a -b -c one can use -abc.
#
# The first argument is a list of valid options. Remaining arguments
# are the options to be parsed. When finding an option not in the list
# of valid options, the usage() is called.
#
# Parsing stops when no arguments are left or a non-option argument
# is found.
#
# Options can have an optional value.
#
# For each option found the variable opt_X, where X is the
# option, is defined. If a value is provided for the option, then
# opt_X is set to that value, otherwise to 1.
#
# The return value is the number of words of $1 that were processed.
#
parseOptions() # $1 = list of valid options
{
local valid
local count
local name
local value
local rest
local option
valid=$1
count=0
shift
while [ $# -gt 0 ]; do
option=$1
case $option in
--*=*)
option=${option#--} # Strip leading double dash
name=${option%%=*}
value=${option#*=}
;;
-?=*)
option=${option#-} # Strip leading dash
name=${option%%=*}
value=${option#*=}
;;
--?*)
name=${option#--} # Strip leading double dash
value=1
;;
-?*)
option=${option#-} # Strip leading dash
while [ -n "$option" ]; do
rest=${option#?} # Strip leading character
name=${option%${rest}} # Strip the rest to get name
if ! contains $name $valid; then
usage
fi
option=${rest}
eval "opt_${name}=1"
done
count=$((${count}+1))
shift
continue
;;
*)
break
;;
esac
if ! contains $name $valid; then
usage
fi
eval "opt_${name}=${value}"
shift
count=$((${count}+1))
done
return $count
}
# Sets the jmap variable such that it contains the command to invoke
# the jmap utility. Exits if jmap could not be found.
requireJmap()
{
if [ -n "$jmap" ]; then
if [ ! -x "$jmap" ]; then
return 0
fi
else
jmap="$(dirname ${java})/jmap"
if [ -x "$jmap" ]; then
return 0
fi
if [ -n "$JAVA_HOME" ]; then
jmap="$JAVA_HOME/bin/jmap"
if [ -x "$jmap" ]; then
return 0
fi
fi
fi
fail 1 "Could not find the jmap command, part of the Java 6 JDK.
This command is required for producing a heap dump. Please
ensure that either jmap is in the path or update
dCacheSetup to point to its location."
}
# Dumps the heap. Terminates the script in case of failure.
dumpHeap() # $1=force, $2=live, $3=file, $4=pid, $5=error
{
if ! jmap ${1:+-F} -dump:${2:+live,}format=b,file=$3 $4; then
fail 1 "$5"
fi
if [ ! -f "$3" ]; then
fail 1 "$5"
fi
}
# display dCache package version
showVersion()
{
${java} -jar ${classesDir}/dcache.jar
}
# Parse global options
parseOptions "d" $*
shift $?
if [ $# -eq 0 ]; then
usage
fi
# Set home path
if [ -n "$opt_d" ]; then
DCACHE_HOME="$opt_d"
elif [ -z "$DCACHE_HOME" ]; then
getCanonicalPath "$0"
DCACHE_HOME=${RET%/bin/dcache}
fi
if [ ! -d "$DCACHE_HOME" ]; then
echo "$DCACHE_HOME is not a directory"
exit 2
fi
# Load libraries
. ${DCACHE_HOME}/share/lib/paths.sh
. ${DCACHE_LIB}/utils.sh
. ${DCACHE_LIB}/config.sh
. ${DCACHE_LIB}/services.sh
. ${DCACHE_LIB}/namespace.sh
. ${DCACHE_LIB}/pool.sh
# Check prerequisites
require awk df egrep grep sed cat hostname wc dirname basename mount mv
# Read configuration files
readconf ${DCACHE_HOME}/etc/node_config NODE_CONFIG_ ||
readconf ${DCACHE_HOME}/etc/door_config NODE_CONFIG_
loadServiceConfigurationFile dCache
loadServiceConfigurationFile pool
# We sometimes need to start java; import the path from dCacheSetup
java="${dCache_java}"
classesDir="${dCache_classesDir}"
# Sanitycheck for java
if [ -z "${java}" ] || [ ! -x "${java}" ] || ! ${java} -version 2>&1 | egrep -e 'version "1\.[6]' >/dev/null ; then
fail 1 "The variable 'java' in ${ourHomeDir}/config/dCacheSetup
has to be set to a Java VM version 6."
fi
determineHostName
case "$1" in
start)
shift
domains=$(printExpandedServiceAndDomainList $*)
if isNameSpaceMountNeeded $domains; then
autoMountNameSpace
fi
for domain in $domains; do
runDomain $domain start
done
touch $DCACHE_LOCK 2> /dev/null || :
;;
stop)
shift
domains=$(printExpandedServiceAndDomainList $*)
reverse $domains; domains_backward="$RET"
for domain in $domains_backward; do
if getPidOfDomain $domain; then
runDomain $domain stop
fi
done
rm -f $DCACHE_LOCK
;;
restart)
shift
domains=$(printExpandedServiceAndDomainList $*)
reverse $domains; domains_backward="$RET"
for domain in $domains_backward; do
if getPidOfDomain $domain; then
runDomain $domain stop
fi
done
if isNameSpaceMountNeeded $domains; then
autoMountNameSpace
fi
for domain in $domains; do
runDomain $domain start
done
;;
condrestart)
shift
domains=$(printExpandedServiceAndDomainList $*)
reverse $domains; domains_backward="$RET"
for domain in $domains_backward; do
if getPidOfDomain $domain; then
running_domains="$running_domains $domain"
runDomain $domain stop
fi
done
reverse $running_domains; domains_to_start="$RET"
for domain in $domains_to_start; do
runDomain $domain start
done
;;
status)
domains=$(printAllDomains)
maxWidth $domains; width="$RET"
format="%-${width}s %-10s %-10s%5s\n"
printf "$format" "Domain" "Service" "Status" "Pid"
for domain in $domains; do
if getPidOfDomain $domain; then
pid="$RET"
status="running"
else
pid=""
status="stopped"
fi
if getService $domain; then
service="$RET"
else
service=""
fi
printf "$format" "$domain" "$service" "$status" "$pid"
done
;;
services)
domains=$(printAllDomains)
maxWidth $domains; width="$RET"
format="%-${width}s %-10s %s\n"
printf "$format" "Domain" "Service" "Log"
for domain in $domains; do
if getService $domain; then
service="$RET"
else
service=""
fi
if getLogOfDomain ${domain} && [ -f "$RET" ]; then
log="$RET"
else
log=""
fi
printf "$format" "$domain" "$service" "$log"
done
;;
version)
showVersion
;;
pool)
shift
if [ $# -eq 0 ]; then
usage
fi
command=$1
shift
case "$command" in
ls)
[ $# -gt 0 ] && usage
domains=$(printAllPoolDomains)
pools=$(printAllPools $domains)
maxWidth $pools; width_1="$RET"
maxWidth $domains; width_2="$RET"
format="%-${width_1}s %-${width_2}s %-9s %7s%7s %s\n"
printf "$format" "Pool" "Domain" "LFS" "Size" "Free" "Path"
for domain in $domains; do
printPoolsInDomain $domain | while read pool path param; do
lfs=$(echo $param | sed -n -e 's/.*lfs=\([^ ]*\).*/\1/p')
if [ -f "${path}/setup" ]; then
getSizeOfPool $path; size="$RET"
getFreeSpace $path; free="$RET"
printf "$format" "$pool" "$domain" "$lfs" "$size" "$free" "$path"
else
printf "$format" "$pool" "$domain" "$lfs" "-" "-" "$path (missing)"
fi
done
done
echo
printp "Disk space is measured in GiB. Free space is
reported for the partition containing the pool,
not for the pool itself."
;;
create)
[ $# -ne 2 ] && usage
size=$1
path=$2
createPool ${size} ${path}
;;
add)
parseOptions "domain fqdn lfs" $*
shift $?
[ $# -ne 2 ] && usage
pool=$1
path=$2
addPool ${pool} ${path} ${opt_domain:-"${hostname}Domain"} ${opt_fqdn:-0} ${opt_lfs:-precious}
;;
remove)
[ $# -ne 1 ] && usage
pool=$1
removePool ${pool}
;;
reconstruct)
[ $# -ne 2 ] && usage
pool="$1"
dst="$2"
# First find the domain containing the pool
domains=$(printAllPoolDomains)
if ! getDomainOfPool "$pool" $domains; then
fail 2 "Cannot find a pool named $pool."
fi
domain="$RET"
# Make sure the pool is not running right now
if getPidOfDomain "$domain"; then
fail 1 "$domain contains $pool, however the domain is
still running. Please stop the domain before
attempting to reconstruct the meta data. The
domain can be stopped using the command
'$0 stop $domain'."
fi
# Find the path to the pool
getPoolPath "$pool" "$domain" || fail 1 "Failed to locate pool"
path="$RET"
# Check that we have a meta directory
if [ ! -d "$path/meta" ]; then
fail 2 "$pool appears to be stored in $path, however the
pool appears not to have a Berkeley DB holding the
meta data, as there is no $path/meta directory."
fi
# Make sure the destination does not exist
if [ -e "$dst" ]; then
fail 2 "$dst already exists. The target directory must"
"not exist prior to recovering a pool."
fi
# Reconstruct the DB
mkdir -p "$dst" || fail 1 "Failed to create $dst"
reconstructMeta "${path}/meta" "${dst}" || fail 1 "Operation aborted"
printp "The pool meta data database of $pool was reconstructed
and stored in $dst. You have to manually replace
$path/meta with the content of $dst."
;;
*)
usage
;;
esac
;;
dump)
shift
if [ $# -eq 0 ]; then
usage
fi
command=$1
shift
case "$command" in
heap)
parseOptions "force" $*
shift $?
[ $# -ne 2 ] && usage
domain=$1
file=$2
requireJmap
if [ -f ${file} ]; then
fail 1 "${file} already exists. Heap not dumped."
fi
if ! getPidOfDomain ${domain}; then
fail 1 "Domain ${domain} is not running."
fi
pid="$RET"
if [ -z "$opt_force" ]; then
dumpHeap "" "live" "$file" "$pid" \
"Failed to dump the heap; please consult
the previous error message for possible
reasons. The dump might succeed when using
the --force option."
else
dumpHeap "force" "" "$file" "$pid" \
"Failed to dump the heap; please consult
the previous error message for possible
reasons."
fi
printp "The heap of domain ${domain} has been written to
${file}. Notice that the file might contain
confidential information."
;;
threads)
domains=$(printExpandedServiceAndDomainList $*)
for domain in $domains; do
if getPidOfDomain ${domain}; then
if ! kill -s QUIT ${RET}; then
fail 1 "Failed to dump stack traces. Likely
the current user does not have the
proper permissions."
fi
fi
done
printp "Stack traces have been written to the log files."
;;
*)
usage
;;
esac
;;
*)
usage
;;
esac
07070100204b46000081ed000000650000000a000000014ad7323200000aa0000000b600010008ffffffffffffffff0000002000000000reloc/opt/d-cache/bin/meta2yaml #!/bin/sh
usage() # $1 = exit status
{
echo "Dumps pool meta data catalogue to YAML format."
echo
echo "Usage: $(basename $0) [OPTION]... DIR"
echo
echo "Valid options are:"
echo " -d= default is /opt/d-cache"
echo
echo "DIR is the pool meta data directory."
exit $1
}
# Generic option parser. Both single and multi character options are
# supported. Single character options start with a single dash and
# multi character options with a double dash. Single character options
# can be combined, e.g. rather than -a -b -c one can use -abc.
#
# The first argument is a list of valid options. Remaining arguments
# are the options to be parsed. When finding an option not in the list
# of valid options, the usage() is called.
#
# Parsing stops when no arguments are left or a non-option argument
# is found.
#
# Options can have an optional value.
#
# For each option found the variable opt_X, where X is the
# option, is defined. If a value is provided for the option, then
# opt_X is set to that value, otherwise to 1.
#
# The return value is the number of words consumed.
#
parseOptions() # $1 = list of valid options
{
local valid=$1
local count=0
local name
local value
shift
while [ $# -gt 0 ]; do
local option=$1
case $option in
--*=*)
option=${option#--}
name=${option%=*}
value=${option#*=}
;;
-?=*)
name=${option:1:1}
value=${option#*=}
;;
--?*)
name=${option:2}
value=1
;;
-?*)
option=${option#-}
while [ -n "$option" ]; do
name=${option:0:1}
if ! contains $name "$valid"; then
usage 1
fi
option=${option:1}
eval "opt_${name}=1"
done
let count=count+1
shift
continue
;;
*)
break
;;
esac
if ! contains $name "$valid"; then
usage 1
fi
eval "opt_${name}=${value}"
shift
let count=count+1
done
return $count
}
# Parse global options
parseOptions "d" $*
shift $?
ourHomeDir=${opt_d:-/opt/d-cache}
# Directory argument must be left
if [ $# -ne 1 ]; then
usage 1
fi
# Read dCacheSetup
if [ -r ${ourHomeDir}/config/dCacheSetup ] ; then
. ${ourHomeDir}/config/dCacheSetup
else
print "${ourHomeDir}/config/dCacheSetup does not exist. You have
to install and setup dCache before you can use this
script." 1>&2
exit 1
fi
# Generate class path
if [ -r ${ourHomeDir}/classes/extern.classpath ]; then
. ${ourHomeDir}/classes/extern.classpath
fi
CLASSPATH=${ourHomeDir}/classes/cells.jar:${ourHomeDir}/classes/dcache.jar:${externalLibsClassPath}
${java} -cp ${CLASSPATH} org.dcache.pool.repository.meta.db.BerkeleyDBMetaDataRepository $107070100204c58000041ed000000650000000a000000044ad7323800000000000000b600010008ffffffffffffffff0000001a00000000reloc/opt/d-cache/libexec 07070100204c6f000041ed000000650000000a000000024ad7323800000000000000b600010008ffffffffffffffff0000002700000000reloc/opt/d-cache/libexec/infoProvider 07070100204c70000081a4000000650000000a000000014ad7323200000dfc000000b600010008ffffffffffffffff0000004200000000reloc/opt/d-cache/libexec/infoProvider/info-based-infoProvider.sh #!/bin/bash
#
# Script to invoke XSLT program that transforms the output from dCache's
# info service into LDIF. This conversion process is achieved using
# Xylophone and is controlled by a configuration file. This file
# is, by default, located at:
#
# /opt/d-cache/etc/glue-1.3.xml
#
# The general documentation for the format of this is in
# /opt/d-cache/share/doc/xylophone/Guide.txt
# Utility function for printing to stderr with a line width
# maximum of 75 characters. Longer lines are broken into several
# lines. Each argument is interpreted as a separate paragraph.
printp() # $* = list of paragraphs
{
local line
local line2
while [ $# -gt 0 ]; do
# If line is non empty, then we need to print a
# paragraph separator.
if [ -n "$line" ]; then
echo
fi
line=
for word in $1; do
line2="$line $word"
if [ ${#line2} -gt 75 ]; then
echo $line >&2
line=$word
else
line=$line2
fi
done
echo $line
shift
done
}
# Read in the dCacheSetup file
readSetup()
{
if [ -r $dCacheSetupFile ]; then
. $dCacheSetupFile
else
printp "[WARNING] The dCacheSetup file (expected in $dCacheSetupDir) could not be read."
fi
}
# Apply any sanity checks before launching the XSLT processor
sanityCheck()
{
if [ ! -r "$xylophoneXMLFile" ]; then
printp "[ERROR] Unable to read $xylophoneXMLFile. Try creating this file or editing the variable 'xylophoneConfigurationDir' (currently \"$xylophoneConfigurationDir\") or 'xylophoneConfigurationFile' (currently \"$xylophoneConfigurationFile\") in $dCacheSetupFile"
exit 1
fi
if [ ! -r "$xylophoneXSLTFile" ]; then
printp "[ERROR] Unable to read ${xylophoneXSLTFile}. If the file exists, try editing the variable 'xylophoneXSLTDir' (currently \"$xylophoneXSLTDir\") in $dCacheSetupFile"
exit 1
fi
}
# Default value for ourHomeDir
if [ -z "$ourHomeDir" ]; then
ourHomeDir=/opt/d-cache
fi
# Default values: don't edit these values; instead, change them in dCacheSetup
dCacheSetupDir=$ourHomeDir/config
dCacheSetupFile=$dCacheSetupDir/dCacheSetup
xsltProcessor=saxon
xylophoneConfigurationFile=glue-1.3.xml
xylophoneConfigurationDir=$ourHomeDir/etc
httpHost=localhost
httpPort=2288
xylophoneXSLTDir=$ourHomeDir/share/xml/xylophone
saxonDir=$ourHomeDir/classes/saxon
# Import the dCacheSetup configuration.
readSetup
# Apply any environment overrides
if [ -n "$XSLT_PROCESSOR" ]; then
xsltProcessor=$XSLT_PROCESSOR
fi
if [ -n "$XYLOPHONE_CONFIG_DIR" ]; then
xylophoneConfigurationDir=$XYLOPHONE_CONFIG_DIR
fi
if [ -n "$HTTP_HOST" ]; then
httpHost=$HTTP_HOST
fi
if [ -n "$HTTP_PORT" ]; then
httpPort=$HTTP_PORT
fi
# Build derived variables after allowing changes from default values
xylophoneXSLTFile=$xylophoneXSLTDir/xsl/xylophone.xsl
xylophoneXMLFile=$xylophoneConfigurationDir/$xylophoneConfigurationFile
dCacheInfoUri=http://${httpHost}:${httpPort}/info
sanityCheck
# Generate LDIF
case $xsltProcessor in
xsltproc)
xsltproc -stringparam xml-src-uri "$dCacheInfoUri" "$xylophoneXSLTFile" "$xylophoneXMLFile"
;;
saxon)
${java} -classpath ${saxonDir}/saxon.jar com.icl.saxon.StyleSheet "$xylophoneXMLFile" "$xylophoneXSLTFile" xml-src-uri="$dCacheInfoUri"
;;
*)
printp "[ERROR] Unknown type of XSLT processor (\"$xsltProcessor\")"
printp "Please use either \"xsltproc\" or \"saxon\"" >&2
exit 1
;;
esac07070100204c71000081a4000000650000000a000000014ad732320000145d000000b600010008ffffffffffffffff0000002d00000000reloc/opt/d-cache/libexec/infoprovidercms.rb #!/usr/bin/env ruby
require 'optparse'
require 'optparse/time'
require 'ostruct'
require 'pp'
require 'open-uri'
require 'rexml/document'
def processXML ( inFile, outFile, vos, options )
doc = REXML::Document.new( File.new(inFile))
if options.has_key?("SITE-UNIQUE-ID")
doc.elements['//[@id="SITE-UNIQUE-ID"]'].text = options["SITE-UNIQUE-ID"]
end
if options.has_key?("SE-UNIQUE-ID")
doc.elements['//[@id="SE-UNIQUE-ID"]'].text = options["SE-UNIQUE-ID"]
end
if options.has_key?("SE-NAME")
doc.elements['//[@id="SE-NAME"]'].text = options["SE-NAME"]
end
if options.has_key?("DCACHE-STATUS")
doc.elements['//[@id="DCACHE-STATUS"]'].text = options["DCACHE-STATUS"]
end
if options.has_key?("DCACHE-ARCHITECTURE")
doc.elements['//[@id="DCACHE-ARCHITECTURE"]'].text = options["DCACHE-ARCHITECTURE"]
end
e = doc.elements['//[@name="SRM-supported-VOs"]']
e.delete_if { true }
vos.each do |vo|
e.add_element("item").text = vo
end
e = doc.elements['//[@name="GlueSA-VOs"]']
e.delete_if { true }
vos.each do |vo|
e.add_element("item").text = vo
end
if options.has_key?("NAME-SPACE-PREFIX")
e = doc.elements['//[@name="VO-name-to-path"]']
e.delete_if { true }
vos.each do |vo|
e.add_element("sub", { "match" => vo, "replace-with" => options["NAME-SPACE-PREFIX"] + "/" + vo })
end
e.add_element("default", { "value" => "/UNDEFINEDPATH" })
end
File.open(outFile, "w") { |f| f.puts doc }
end
vos = []
options = {}
fileInput = ""
fileOutput = ""
ARGV.options do |o|
script_name = File.basename($0)
o.set_summary_indent(' ')
o.banner = "Usage: #{script_name} [options]"
o.define_head "Infor provider XSL configuration tool."
o.separator ""
o.separator "Mandatory arguments to long options are mandatory for " +
"short options too."
o.on("-i", "--input [EXTENSION]",
"Input XML file path",
" (XML file to read)") { |fileInput| }
o.on("-o", "--output [EXTENSION]",
"Output XML file path",
" (XML file to write)") { |fileOutput| }
o.on("-s", "--site-unique-id [EXTENSION]",
"GlueSiteUniqueID",
"A unique reference for your site. This must match the GlueSiteUniqueID defined in other services.") { |options["SITE-UNIQUE-ID"]| }
o.on("-S", "--se-unique-id [EXTENSION]",
"GlueSEUniqueID",
"Your dCache's Unique ID. Currently, this *must* be the FQDN of your SRM end-point.") { |options["SE-UNIQUE-ID"]| }
o.on("-n", "--se-name [EXTENSION]",
"GlueSEName",
"A human understandable name for your SE (it may contain spaces). You may leave this empty and a GlueSEName will not be published.") { |options["SE-NAME"]| }
o.on("-u", "--dcache-status [EXTENSION]",
"GlueSEStatus",
"Current status of dCache. This should be one of the following values: Production, Queuing, Closed, Draining.") { |options["DCACHE-STATUS"]| }
o.on("-a", "--dcache-architecture [EXTENSION]",
"GlueSEArchitecture",
"The architecture of the underlying storage dCache is using.") { |options["DCACHE-ARCHITECTURE"]| }
o.on("-p", "--name-space-prefix [EXTENSION]",
"Name space prefix.",
"This describes which paths to publish for each VO.") { |options["NAME-SPACE-PREFIX"]| }
# List of arguments.
o.on("-V","--vos x,y,z", Array, "A 'list' of vo's") { |vos| }
o.separator ""
o.on_tail("-h", "--help", "Show this help message.") { puts o; exit }
o.parse!
end
#pp options
#pp object
if options.has_key?("DCACHE-STATUS")
if !["Production","Queuing","Closed","Draining"].include?(options["DCACHE-STATUS"])
print "GlueSEStatus can only be set to Production, Queuing, Closed, Draining\n\n"
print "Production The SE processes old and new requests\n"
print " according to its policies.\n\n"
print "Queuing The SE can accept new requests, but they\n"
print " will be kept on hold\n\n"
print "Closed The SE does not accept new requests and\n"
print " does not process old requests\n\n"
print "Draining The SE does not accept new request but\n"
print " still processes old requests.\n"
exit 1
end
end
if options.has_key?("DCACHE-ARCHITECTURE")
if !["disk","multidisk","tape"].include?(options["DCACHE-ARCHITECTURE"])
print "GlueSEArchitecture: the architecture of the underlying\n"
print " storage dCache is using. This should be one of the\n"
print "disk non-robust, single-disk storage\n\n"
print "multidisk disk-based storage that is robust against\n"
print " single disk failures.\n\n"
print "tape dCache has access to an HSM system.\n"
exit 1
end
end
if fileInput == ""
print "Input file needs to be stated on the command line.\n"
exit 1
end
if fileOutput == ""
print "Output file needs to be stated on the command line.\n"
exit 1
end
processXML(fileInput,fileOutput,vos,options)
07070100204c72000081a4000000650000000a000000014ad7323200000219000000b600010008ffffffffffffffff0000002d00000000reloc/opt/d-cache/libexec/nsp-performance.sh #!/bin/sh
#
# A simple shell wrapper around the NameSpaceProvider performance
# testing tool.
# Default location for dCache.
DCACHE_HOME=${DCACHE_HOME:-/opt/d-cache}
# Ask dCache for the externalLibsClassPath.
ourHomeDir=${DCACHE_HOME} . $DCACHE_HOME/classes/extern.classpath
LOG4J_FILE=${DCACHE_HOME}/config/log4j.properties
DCACHE_JAR=$DCACHE_HOME/classes/dcache.jar
CLASS=diskCacheV111.namespace.PerformanceTest
OPTIONS=-Dlog4j.configuration=file:$LOG4J_FILE
java -cp $DCACHE_JAR:$externalLibsClassPath $OPTIONS $CLASS "$@"
07070100204c5a000041ed000000650000000a000000034ad7323800000000000000b600010008ffffffffffffffff0000002200000000reloc/opt/d-cache/libexec/chimera 07070100204c5b000081ed000000650000000a000000014ad73222000001b5000000b600010008ffffffffffffffff0000003100000000reloc/opt/d-cache/libexec/chimera/chimera-cli.sh #!/bin/sh
if [ $# -lt 2 ]
then
echo "Usage [options]"
exit 1
fi
command=$1
shift
if [ -z ${ourHomeDir} ]
then
ourHomeDir=/opt/d-cache
fi
. ${ourHomeDir}/classes/extern.classpath
. ${ourHomeDir}/config/dCacheSetup
${java} ${java_options} -classpath ${ourHomeDir}/classes/cells.jar:${externalLibsClassPath} \
org.dcache.chimera.examples.cli.${command} ${ourHomeDir}/config/chimera-config.xml $*
07070100204c5d000081ed000000650000000a000000014ad7322200000d0f000000b600010008ffffffffffffffff0000003500000000reloc/opt/d-cache/libexec/chimera/chimera-nfs-run.sh #!/bin/sh
# chkconfig: 345 25 75
# description: chimera nfs3 startup script
PORTMAP_PORT=111
if [ "x" = "x${ourHomeDir}" ]
then
ourHomeDir=/opt/d-cache
fi
. ${ourHomeDir}/classes/extern.classpath
. ${ourHomeDir}/config/dCacheSetup
if [ "x" = "x${logArea}" ]
then
logArea=/var/log
fi
if [ "x" = "x${log}" ]
then
log=${logArea}/chimera-nfsv3.log
fi
if [ "x" = "x${pidDir}" ]
then
pidDir=/var/run
fi
if [ "x" = "x${pfile}" ]
then
pfile=${pidDir}/chimera-nfsv3.pid
fi
# A handy wrapper to allow us to delay continuing until some event has
# happened. A function is called to check whether the event has happened yet.
# If that method returns 0, we assume the event has happened, other
# return-codes will result in the code looping until a timeout has occurred.
# Should the function time-out whilst waiting for an event, an error message
# is emitted.
#
# Parameters:
# $1 the function called when checking if the event has happened,
# $2 the message to display if waiting is required,
# $3 the error message to display if timeout
#
# Returns 0 on success, 1 on timeout.
#
waitForEvent()
{
for try in 0 1 2 3 4 5 6 7 8 9 10 too-much; do
$1
if [ $? -eq 0 ]; then
[ "x$try" != "x0" ] && echo
break
fi
if [ "x$try" = "x0" ]; then
echo -n "$2: "
else
echo -n "."
fi
if [ "x$try" = "xtoo-much" ]; then
echo
echo "$3"
return 1
else
sleep 1
fi
done
return 0
}
portmapPortPresent()
{
netstat -na | grep [^0-9]$PORTMAP_PORT >/dev/null
}
portmapAnswersQueries()
{
rpcinfo -p >/dev/null 2>&1
}
nfsV3ServiceRegistered()
{
rpcinfo -t localhost 100003 3 >/dev/null 2>&1
}
dCacheChimeraStart()
{
if [ -f ${pfile} ]
then
pid=`cat ${pfile}`
kill -s 0 ${pid} > /dev/null 2>&1
if [ $? -eq 0 ]
then
echo "Old NFS process still running"
exit 1
fi
fi
echo "Starting Chimera-NFSv3 interface"
${java} ${java_options} \
-classpath ${ourHomeDir}/classes/cells.jar:${externalLibsClassPath} \
org.dcache.chimera.nfs.v3.Main \
${ourHomeDir}/config/chimera-config.xml >> ${log} 2>&1 &
echo $! > ${pfile}
waitForEvent portmapPortPresent "Waiting for portmap port" \
"Chimera portmap port is taking too long to appear; carrying on"
waitForEvent portmapAnswersQueries "Waiting for portmap service" \
"Chimera portmap is taking too long to appear; carrying on"
waitForEvent nfsV3ServiceRegistered "Waiting for NFS server to register itself" \
"Chimera is taking too long; giving up."
}
dCacheChimeraStop()
{
if [ -f ${pfile} ]
then
pid=`cat ${pfile}`
kill -s 0 ${pid} > /dev/null 2>&1
if [ $? -eq 0 ]
then
echo "Shutting down Chimera-NFSv3 interface"
kill `cat ${pfile}`
rm -f ${pfile}
else
echo "NFS process not running"
fi
else
echo "Pid file missing. NFS process not running?"
fi
}
case $1 in
start)
dCacheChimeraStart
;;
stop)
dCacheChimeraStop
;;
restart)
dCacheChimeraStop
dCacheChimeraStart
;;
*)
echo "Usage: `basename $0` [start | stop | restart]"
exit 1;
esac
exit 0
07070100204c5c000081ed000000650000000a000000014ad732220000012e000000b600010008ffffffffffffffff0000003500000000reloc/opt/d-cache/libexec/chimera/chimera-get-acl.sh #!/bin/sh
ourHomeDir=/opt/d-cache
ourHomeDir=/opt/d-cache
. ${ourHomeDir}/classes/extern.classpath
. ${ourHomeDir}/config/dCacheSetup
${java} ${java_options} -classpath ${externalLibsClassPath} \
-Xmx512M org.dcache.chimera.acl.client.GetAclClient ${ourHomeDir}/config/acl.properties
07070100204c60000041ed000000650000000a000000024ad7323800000000000000b600010008ffffffffffffffff0000002600000000reloc/opt/d-cache/libexec/chimera/sql 07070100204c61000081a4000000650000000a000000014ad7322200000864000000b600010008ffffffffffffffff0000003700000000reloc/opt/d-cache/libexec/chimera/sql/add-timezone.sql --
-- fix timestamp field to support TIME ZONE
--
ALTER TABLE t_inodes ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_inodes ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_inodes ALTER imtime TYPE timestamp with time zone;
ALTER TABLE t_level_1 ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_level_1 ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_level_1 ALTER imtime TYPE timestamp with time zone;
ALTER TABLE t_level_2 ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_level_2 ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_level_2 ALTER imtime TYPE timestamp with time zone;
ALTER TABLE t_level_3 ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_level_3 ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_level_3 ALTER imtime TYPE timestamp with time zone;
ALTER TABLE t_level_4 ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_level_4 ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_level_4 ALTER imtime TYPE timestamp with time zone;
ALTER TABLE t_level_5 ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_level_5 ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_level_5 ALTER imtime TYPE timestamp with time zone;
ALTER TABLE t_level_6 ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_level_6 ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_level_6 ALTER imtime TYPE timestamp with time zone;
ALTER TABLE t_level_7 ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_level_7 ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_level_7 ALTER imtime TYPE timestamp with time zone;
ALTER TABLE t_tags_inodes ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_tags_inodes ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_tags_inodes ALTER imtime TYPE timestamp with time zone;
ALTER TABLE t_locationinfo ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_locationinfo ALTER iatime TYPE timestamp with time zone;
ALTER TABLE t_locationinfo_trash ALTER ictime TYPE timestamp with time zone;
ALTER TABLE t_locationinfo_trash ALTER iatime TYPE timestamp with time zone;
07070100204c68000081a4000000650000000a000000014ad732220000243e000000b600010008ffffffffffffffff0000003800000000reloc/opt/d-cache/libexec/chimera/sql/create-oracle.sql --
-- Chimera table layout
-- for ORACLE (10g)
--
-- $Id: create-oracle.sql 296 2007-10-30 21:09:30Z tigran $
--
-- Inodes
--
CREATE TABLE t_inodes (
ipnfsid CHAR(36) PRIMARY KEY,
itype NUMBER NOT NULL,
imode NUMBER NOT NULL,
inlink NUMBER NOT NULL,
iuid NUMBER NOT NULL,
igid NUMBER NOT NULL,
isize NUMBER NOT NULL,
iio NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
imtime DATE NOT NULL
);
--
-- dirs
--
CREATE TABLE t_dirs (
iparent CHAR(36) NOT NULL,
iname VARCHAR(255) NOT NULL,
ipnfsid CHAR(36) NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
PRIMARY KEY (iparent,iname)
);
--
-- data
--
CREATE TABLE t_inodes_data (
ipnfsid CHAR(36) PRIMARY KEY,
ifiledata LONG RAW,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
--
-- Checksums
--
CREATE TABLE t_inodes_checksum (
ipnfsid CHAR(36) PRIMARY KEY,
itype NUMBER NOT NULL,
isum VARCHAR(128) NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
--
-- pnfs levels 1-7
--
CREATE TABLE t_level_1 (
ipnfsid CHAR(36) PRIMARY KEY,
imode NUMBER NOT NULL,
inlink NUMBER NOT NULL,
iuid NUMBER NOT NULL,
igid NUMBER NOT NULL,
isize NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
imtime DATE NOT NULL,
ifiledata LONG RAW,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_2 (
ipnfsid CHAR(36) PRIMARY KEY,
imode NUMBER NOT NULL,
inlink NUMBER NOT NULL,
iuid NUMBER NOT NULL,
igid NUMBER NOT NULL,
isize NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
imtime DATE NOT NULL,
ifiledata LONG RAW,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_3 (
ipnfsid CHAR(36) PRIMARY KEY,
imode NUMBER NOT NULL,
inlink NUMBER NOT NULL,
iuid NUMBER NOT NULL,
igid NUMBER NOT NULL,
isize NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
imtime DATE NOT NULL,
ifiledata LONG RAW,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_4 (
ipnfsid CHAR(36) PRIMARY KEY,
imode NUMBER NOT NULL,
inlink NUMBER NOT NULL,
iuid NUMBER NOT NULL,
igid NUMBER NOT NULL,
isize NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
imtime DATE NOT NULL,
ifiledata LONG RAW,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_5 (
ipnfsid CHAR(36) PRIMARY KEY,
imode NUMBER NOT NULL,
inlink NUMBER NOT NULL,
iuid NUMBER NOT NULL,
igid NUMBER NOT NULL,
isize NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
imtime DATE NOT NULL,
ifiledata LONG RAW,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_6 (
ipnfsid CHAR(36) PRIMARY KEY,
imode NUMBER NOT NULL,
inlink NUMBER NOT NULL,
iuid NUMBER NOT NULL,
igid NUMBER NOT NULL,
isize NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
imtime DATE NOT NULL,
ifiledata LONG RAW,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_7 (
ipnfsid CHAR(36) PRIMARY KEY,
imode NUMBER NOT NULL,
inlink NUMBER NOT NULL,
iuid NUMBER NOT NULL,
igid NUMBER NOT NULL,
isize NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
imtime DATE NOT NULL,
ifiledata LONG RAW,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
--
-- Name: t_tags_inodes; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_tags_inodes (
itagid CHAR(36) PRIMARY KEY,
imode NUMBER NOT NULL,
inlink NUMBER NOT NULL,
iuid NUMBER NOT NULL,
igid NUMBER NOT NULL,
isize NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
imtime DATE NOT NULL,
ivalue LONG RAW
);
--
-- Name: t_tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_tags (
ipnfsid CHAR(36) NOT NULL,
itagname VARCHAR(255) NOT NULL,
itagid CHAR(36) NOT NULL,
isorign NUMBER NOT NULL,
PRIMARY KEY (ipnfsid, itagname),
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
FOREIGN KEY (itagid) REFERENCES t_tags_inodes( itagid )
);
--
-- populate Inodes
--
INSERT INTO t_inodes VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', 16384, 493, 2, 0, 0, 512, 0, current_DATE, current_DATE, current_DATE );
INSERT INTO t_inodes VALUES ('000000000000000000000000000000000000', 16384, 493, 6, 0, 0, 512, 0, current_DATE, current_DATE, current_DATE );
INSERT INTO t_inodes VALUES ('A0D739870178504FF109C52075F44287F9DE', 16384, 493, 4, 0, 0, 512, 0, current_DATE, current_DATE, current_DATE );
INSERT INTO t_inodes VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 16384, 493, 6, 0, 0, 512, 1, current_DATE, current_DATE, current_DATE );
INSERT INTO t_inodes VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', 16384, 493, 2, 0, 0, 512, 1, current_DATE, current_DATE, current_DATE );
INSERT INTO t_inodes VALUES ('80D1B8B90CED30430608C58002811B3285FC', 16384, 493, 2, 0, 0, 512, 1, current_DATE, current_DATE, current_DATE );
--
-- directory
--
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', '.', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', 'admin','A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', '.', 'A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', 'usr', 'F674EC8B0CFF104AA109828000696CAD6CAC');
INSERT INTO t_dirs VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', '.', 'F674EC8B0CFF104AA109828000696CAD6CAC');
INSERT INTO t_dirs VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', 'etc', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', '.', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', '..', 'A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 'config','80D1B8B90CED30430608C58002811B3285FC');
INSERT INTO t_dirs VALUES ('80D1B8B90CED30430608C58002811B3285FC', '.', '80D1B8B90CED30430608C58002811B3285FC');
INSERT INTO t_dirs VALUES ('80D1B8B90CED30430608C58002811B3285FC', '..', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 'exports','E3BB936F04F6D047A70B75201EDBA32FA9F5');
INSERT INTO t_dirs VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', '.', 'E3BB936F04F6D047A70B75201EDBA32FA9F5');
INSERT INTO t_dirs VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', '..', '1B3BB44C05C9904DFB0928F06F2467395CD5');
--
-- For faster lookups
--
CREATE INDEX i_dirs_iparent ON t_dirs(iparent);
--
-- For faster getparent
--
CREATE INDEX i_dirs_ipnfsid ON t_dirs(ipnfsid);
-- STORAGE INFO
--
-- Generic storage information. Represents X:Y@Z + AL +RP
-- ipnfsid : pnfsid of the inode
-- ihsmName : Z-component of storageGroup
-- istorageGroup : X-component of storageGroup
-- istorageSubGroup : Y-component of storageGroup
-- iaccessLatency : ONLINE / NEARLINE ( keep on disk / keep on disk, if there is a space)
-- iretentionPolicy : CUSTODIAL / OUTPUT ( tape / disk )
CREATE TABLE t_storageinfo (
ipnfsid CHAR(36) PRIMARY KEY,
ihsmName VARCHAR(64) NOT NULL,
istorageGroup VARCHAR(64) NOT NULL,
istorageSubGroup VARCHAR(64) NOT NULL,
iaccessLatency NUMBER NOT NULL,
iretentionPolicy NUMBER NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
-- LOCATION INFO
--
-- Generic storage information
-- ipnfsid : pnfsid of the inode
-- itype : type of storage, e.g. tape, disk
-- ilocation : type specific information like pool name for disk and HSM connetion for tape
-- ipriority : in case of multiple locations of hint for performance or other needs
-- ictime : location creation time
-- iatime : last access time, probably performance killer, but nice to have for statistics
-- istate : location status ONLINE/OFF-LINE
CREATE TABLE t_locationinfo (
ipnfsid CHAR(36),
itype NUMBER NOT NULL,
ilocation VARCHAR(1024) NOT NULL,
ipriority NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
istate NUMBER NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
PRIMARY KEY (ipnfsid,itype,ilocation)
);
--
-- removed locations
-- required for HSM and pools cleanup
--
CREATE TABLE t_locationinfo_trash (
ipnfsid CHAR(36),
itype NUMBER NOT NULL,
ilocation VARCHAR(1024) NOT NULL,
ipriority NUMBER NOT NULL,
ictime DATE NOT NULL,
iatime DATE NOT NULL,
istate NUMBER NOT NULL,
PRIMARY KEY (ipnfsid,itype,ilocation)
);
CREATE INDEX i_locationinfo_ipnfsid ON t_locationinfo(ipnfsid);
07070100204c6c000081a4000000650000000a000000014ad7322200000069000000b600010008ffffffffffffffff0000003900000000reloc/opt/d-cache/libexec/chimera/sql/pnfsid-mapping.sql
CREATE TABLE t_pnfsid_mapping (
ipnfsid CHAR(24) PRIMARY KEY,
ichimeraid CHAR(36) UNIQUE NOT NULL
);
07070100204c6e000081a4000000650000000a000000014ad7322200000b33000000b600010008ffffffffffffffff0000004000000000reloc/opt/d-cache/libexec/chimera/sql/transaction-loggin-pg.sql --
-- $Id: transaction-loggin-pg.sql 296 2007-10-30 21:09:30Z tigran $
-- transaction logging
--
CREATE TABLE t_inodes_actionlog (
iaction varchar(64) NOT NULL,
ittime timestamp without time zone NOT NULL,
ipnfsid character(36) NOT NULL,
itype_old integer ,
itype_new integer NOT NULL,
imode_old integer ,
imode_new integer NOT NULL,
inlink_old integer ,
inlink_new integer NOT NULL,
iuid_old integer ,
iuid_new integer NOT NULL,
igid_old integer ,
igid_new integer NOT NULL,
isize_old bigint ,
isize_new bigint NOT NULL,
iio_old integer ,
iio_new integer NOT NULL,
ictime_old timestamp without time zone ,
ictime_new timestamp without time zone NOT NULL,
iatime_old timestamp without time zone ,
iatime_new timestamp without time zone NOT NULL,
imtime_old timestamp without time zone ,
imtime_new timestamp without time zone NOT NULL
);
CREATE OR REPLACE FUNCTION f_actionlog() RETURNS TRIGGER AS $t_actionlog$
BEGIN
IF (TG_OP = 'UPDATE') THEN
INSERT INTO t_inodes_actionlog (
iaction,
ittime,
ipnfsid,
itype_old,
itype_new,
imode_old,
imode_new,
inlink_old,
inlink_new,
iuid_old,
iuid_new,
igid_old,
igid_new,
isize_old,
isize_new,
iio_old,
iio_new,
ictime_old,
ictime_new,
iatime_old,
iatime_new,
imtime_old,
imtime_new
) VALUES (
'UPDATE',
NOW(),
NEW.ipnfsid,
OLD.itype,
NEW.itype,
OLD.imode,
NEW.imode,
OLD.inlink,
NEW.inlink,
OLD.iuid,
NEW.iuid,
OLD.igid,
NEW.igid,
OLD.isize,
NEW.isize,
OLD.iio,
NEW.iio,
OLD.ictime,
NEW.ictime,
OLD.iatime,
NEW.iatime,
OLD.imtime,
NEW.imtime
);
ELSIF (TG_OP = 'INSERT') THEN
INSERT INTO t_inodes_actionlog (
iaction,
ittime,
ipnfsid,
itype_new,
imode_new,
inlink_new,
iuid_new,
igid_new,
isize_new,
iio_new,
ictime_new,
iatime_new,
imtime_new
) VALUES (
'INSERT',
NOW(),
NEW.ipnfsid,
NEW.itype,
NEW.imode,
NEW.inlink,
NEW.iuid,
NEW.igid,
NEW.isize,
NEW.iio,
NEW.ictime,
NEW.iatime,
NEW.imtime
);
END IF;
RETURN NEW;
END ;
$t_actionlog$ LANGUAGE plpgsql;
CREATE TRIGGER tgr_actionlog BEFORE INSERT OR UPDATE ON t_inodes FOR EACH ROW EXECUTE PROCEDURE f_actionlog(); 07070100204c69000081a4000000650000000a000000014ad73222000029c6000000b600010008ffffffffffffffff0000003100000000reloc/opt/d-cache/libexec/chimera/sql/create.sql --
-- Chimera table layout
-- for postgreSQL
--
-- $Id: create.sql 780 2008-07-21 17:48:42Z tigran $
--
-- Inodes
--
CREATE TABLE t_inodes (
ipnfsid character(36) PRIMARY KEY,
itype integer NOT NULL,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
iio integer NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
imtime timestamp with time zone NOT NULL
);
--
-- dirs
--
CREATE TABLE t_dirs (
iparent character(36) NOT NULL,
iname character varying(255) NOT NULL,
ipnfsid character(36) NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
PRIMARY KEY (iparent,iname)
);
--
-- data
--
CREATE TABLE t_inodes_data (
ipnfsid character(36) PRIMARY KEY,
ifiledata bytea,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
--
-- Checksums
--
CREATE TABLE t_inodes_checksum (
ipnfsid character(36) PRIMARY KEY,
itype integer NOT NULL,
isum character varying(128) NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
--
-- pnfs levels 1-7
--
CREATE TABLE t_level_1 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
imtime timestamp with time zone NOT NULL,
ifiledata bytea,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_2 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
imtime timestamp with time zone NOT NULL,
ifiledata bytea,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_3 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
imtime timestamp with time zone NOT NULL,
ifiledata bytea,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_4 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
imtime timestamp with time zone NOT NULL,
ifiledata bytea,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_5 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
imtime timestamp with time zone NOT NULL,
ifiledata bytea,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_6 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
imtime timestamp with time zone NOT NULL,
ifiledata bytea,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_7 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
imtime timestamp with time zone NOT NULL,
ifiledata bytea,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
--
-- Name: t_tags_inodes; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_tags_inodes (
itagid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
imtime timestamp with time zone NOT NULL,
ivalue bytea
);
--
-- Name: t_tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_tags (
ipnfsid character(36) NOT NULL,
itagname character varying(255) NOT NULL,
itagid character(36) NOT NULL,
isorign integer NOT NULL,
PRIMARY KEY (ipnfsid, itagname),
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
FOREIGN KEY (itagid) REFERENCES t_tags_inodes( itagid )
);
--
-- populate Inodes
--
INSERT INTO t_inodes VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', 16384, 493, 2, 0, 0, 512, 0, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('000000000000000000000000000000000000', 16384, 493, 6, 0, 0, 512, 0, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('A0D739870178504FF109C52075F44287F9DE', 16384, 493, 4, 0, 0, 512, 0, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 16384, 493, 6, 0, 0, 512, 1, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', 16384, 493, 2, 0, 0, 512, 1, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('80D1B8B90CED30430608C58002811B3285FC', 16384, 493, 2, 0, 0, 512, 1, NOW(), NOW(), NOW() );
--
-- directory
--
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', '.', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', 'admin','A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', '.', 'A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', 'usr', 'F674EC8B0CFF104AA109828000696CAD6CAC');
INSERT INTO t_dirs VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', '.', 'F674EC8B0CFF104AA109828000696CAD6CAC');
INSERT INTO t_dirs VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', 'etc', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', '.', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', '..', 'A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 'config','80D1B8B90CED30430608C58002811B3285FC');
INSERT INTO t_dirs VALUES ('80D1B8B90CED30430608C58002811B3285FC', '.', '80D1B8B90CED30430608C58002811B3285FC');
INSERT INTO t_dirs VALUES ('80D1B8B90CED30430608C58002811B3285FC', '..', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 'exports','E3BB936F04F6D047A70B75201EDBA32FA9F5');
INSERT INTO t_dirs VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', '.', 'E3BB936F04F6D047A70B75201EDBA32FA9F5');
INSERT INTO t_dirs VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', '..', '1B3BB44C05C9904DFB0928F06F2467395CD5');
--
-- For faster lookups
--
CREATE INDEX i_dirs_iparent ON t_dirs(iparent);
--
-- For faster getparent
--
CREATE INDEX i_dirs_ipnfsid ON t_dirs(ipnfsid);
-- STORAGE INFO
--
-- Generic storage information. Represents X:Y@Z + AL +RP
-- ipnfsid : pnfsid of the inode
-- ihsmName : Z-component of storageGroup
-- istorageGroup : X-component of storageGroup
-- istorageSubGroup : Y-component of storageGroup
-- iaccessLatency : ONLINE / NEARLINE ( keep on disk / keep on disk, if there is a space)
-- iretentionPolicy : CUSTODIAL / OUTPUT ( tape / disk )
CREATE TABLE t_storageinfo (
ipnfsid CHAR(36) PRIMARY KEY,
ihsmName VARCHAR(64) NOT NULL,
istorageGroup VARCHAR(64) NOT NULL,
istorageSubGroup VARCHAR(64) NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
CREATE TABLE t_access_latency (
ipnfsid CHAR(36) PRIMARY KEY,
iaccessLatency INT NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
CREATE TABLE t_retention_policy (
ipnfsid CHAR(36) PRIMARY KEY,
iretentionPolicy INT NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
-- LOCATION INFO
--
-- Generic storage information
-- ipnfsid : pnfsid of the inode
-- itype : type of storage, e.g. tape, disk
-- ilocation : type specific information like pool name for disk and HSM connetion for tape
-- ipriority : in case of multiple locations of hint for performance or other needs
-- ictime : location creation time
-- iatime : last access time, probably performance killer, but nice to have for statistics
-- istate : location status ONLINE/OFF-LINE
CREATE TABLE t_locationinfo (
ipnfsid CHAR(36),
itype INT NOT NULL,
ilocation VARCHAR(1024) NOT NULL,
ipriority INT NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
istate INT NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE,
PRIMARY KEY (ipnfsid,itype,ilocation)
);
--
-- removed locations
-- required for HSM and pools cleanup
--
CREATE TABLE t_locationinfo_trash (
ipnfsid CHAR(36),
itype INT NOT NULL,
ilocation VARCHAR(1024) NOT NULL,
ipriority INT NOT NULL,
ictime timestamp with time zone NOT NULL,
iatime timestamp with time zone NOT NULL,
istate INT NOT NULL,
PRIMARY KEY (ipnfsid,itype,ilocation)
);
CREATE INDEX i_locationinfo_ipnfsid ON t_locationinfo(ipnfsid);
--
-- ACL table layout
-- for postgreSQL
--
CREATE TABLE t_acl (
rs_id CHAR(36) NOT NULL,
rs_type int4 NOT NULL,
type smallint NOT NULL DEFAULT 0,
flags int4 NULL,
access_msk int4 NOT NULL DEFAULT 0,
who smallint NOT NULL,
who_id int4,
address_msk varchar(32) NOT NULL DEFAULT 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',
ace_order int4 NOT NULL DEFAULT 0,
PRIMARY KEY (rs_id, ace_order),
FOREIGN KEY (rs_id) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
CREATE INDEX i_t_acl_rs_id ON t_acl(rs_id); 07070100204c65000081a4000000650000000a000000014ad73222000001cc000000b600010008ffffffffffffffff0000003b00000000reloc/opt/d-cache/libexec/chimera/sql/create-dCacheACL.sql --
-- ACL table layout
-- for postgreSQL
--
CREATE TABLE t_acl (
rs_id varchar(36) NOT NULL,
rs_type int4 NOT NULL,
type smallint NOT NULL DEFAULT 0,
flags int4 NULL,
access_msk int4 NOT NULL DEFAULT 0,
who smallint NOT NULL,
who_id int4,
address_msk varchar(32) NOT NULL DEFAULT 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',
ace_order int4 NOT NULL DEFAULT 0,
PRIMARY KEY (rs_id, ace_order)
);
CREATE INDEX i_t_acl_rs_id ON t_acl(rs_id);
07070100204c62000081a4000000650000000a000000014ad7322200000210000000b600010008ffffffffffffffff0000003c00000000reloc/opt/d-cache/libexec/chimera/sql/addACLtoChimeraDB.sql --
-- ACL table layout
-- for postgreSQL
--
CREATE TABLE t_acl (
rs_id CHAR(36) NOT NULL,
rs_type int4 NOT NULL,
type smallint NOT NULL DEFAULT 0,
flags int4 NULL,
access_msk int4 NOT NULL DEFAULT 0,
who smallint NOT NULL,
who_id int4,
address_msk CHAR(32) NOT NULL DEFAULT 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',
ace_order int4 NOT NULL DEFAULT 0,
PRIMARY KEY (rs_id, ace_order),
FOREIGN KEY (rs_id) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
CREATE INDEX i_t_acl_rs_id ON t_acl(rs_id);07070100204c6b000081a4000000650000000a000000014ad7322200001235000000b600010008ffffffffffffffff0000003b00000000reloc/opt/d-cache/libexec/chimera/sql/pgsql-procedures.sql -- $Id: pgsql-procedures.sql 796 2008-09-05 13:40:45Z tigran $
-- some procedures to push some work to SQL server
CREATE OR REPLACE FUNCTION "public"."inode2path" (varchar) RETURNS varchar AS $$
DECLARE
inode VARCHAR := $1;
ipath varchar := '';
ichain RECORD;
BEGIN
LOOP
SELECT INTO ichain * FROM t_dirs WHERE ipnfsid=inode AND iname != '.' AND iname != '..';
IF FOUND AND ichain.iparent != inode
THEN
ipath := '/' || ichain.iname || ipath;
inode := ichain.iparent;
ELSE
EXIT;
END IF;
END LOOP;
RETURN ipath;
END;
$$
LANGUAGE 'plpgsql';
CREATE OR REPLACE FUNCTION path2inode(root varchar, path varchar) RETURNS varchar AS $$
DECLARE
id varchar := root;
elements varchar[] := string_to_array(path, '/');
child varchar;
itype integer;
link varchar;
BEGIN
FOR i IN 1..array_upper(elements,1) LOOP
SELECT dir.ipnfsid, inode.itype INTO child, itype FROM t_dirs dir, t_inodes inode WHERE dir.ipnfsid = inode.ipnfsid AND dir.iparent=id AND dir.iname=elements[i];
IF itype=40960 THEN
SELECT ifiledata INTO link FROM t_inodes_data WHERE ipnfsid=child;
IF link LIKE '/%' THEN
child := path2inode('000000000000000000000000000000000000',
substring(link from 2));
ELSE
child := path2inode(id, link);
END IF;
END IF;
IF child IS NULL THEN
RETURN NULL;
END IF;
id := child;
END LOOP;
RETURN id;
END;
$$ LANGUAGE plpgsql;
--
-- store location of deleted inodes in trash table
--
-- stores a old values into the trash table except last access time,
-- which replaced with a time, when the trigger was running
--
CREATE OR REPLACE FUNCTION f_locationinfo2trash() RETURNS TRIGGER AS $t_inodes_trash$
BEGIN
IF (TG_OP = 'DELETE') THEN
INSERT INTO t_locationinfo_trash SELECT
ipnfsid ,
itype,
ilocation ,
ipriority,
ictime ,
iatime ,
istate FROM t_locationinfo WHERE ipnfsid = OLD.ipnfsid;
END IF;
RETURN OLD;
END;
$t_inodes_trash$ LANGUAGE plpgsql;
--
-- trigger to store removed inodes
--
CREATE TRIGGER tgr_locationinfo_trash BEFORE DELETE ON t_inodes FOR EACH ROW EXECUTE PROCEDURE f_locationinfo2trash();
---
--- populate inhereted tags
---
CREATE OR REPLACE FUNCTION f_populate_tags() RETURNS TRIGGER AS $t_populate_tags$
BEGIN
IF TG_OP = 'INSERT' AND NEW.iname = '..'
THEN
INSERT INTO t_tags ( SELECT NEW.iparent, itagname, itagid, 0 from t_tags WHERE ipnfsid=NEW.ipnfsid );
END IF;
RETURN NEW;
END;
$t_populate_tags$ LANGUAGE plpgsql;
--
-- trigger to store removed inodes
--
CREATE TRIGGER tgr_populate_tags AFTER INSERT ON t_dirs FOR EACH ROW EXECUTE PROCEDURE f_populate_tags();
--
-- ******** ACL in dCache **********
--
-------------------------------------------------------------------------------
-- trigger to inherit ACLs for newly created file/directory
-------------------------------------------------------------------------------
-- optimized by mdavid
--
CREATE SEQUENCE serial MINVALUE 0;
CREATE OR REPLACE FUNCTION f_insertACL() RETURNS trigger AS $$
DECLARE
msk INTEGER;
flag INTEGER;
rstype INTEGER;
id character(36);
parentid character(36);
BEGIN
IF (TG_OP = 'INSERT') THEN
msk := 0;
SELECT INTO rstype itype FROM t_inodes WHERE ipnfsid = NEW.ipnfsid;
IF rstype = 32768 THEN
id := NEW.ipnfsid;
parentid := NEW.iparent;
rstype := 1; -- inserted object is a file
flag := 1; -- check flags for 'f' bit
msk := 11; -- mask contains 'o','d' and 'f' bits
ELSIF (rstype = 16384 AND NEW.iname = '..') THEN
id := NEW.iparent;
parentid := NEW.ipnfsid;
rstype := 0; -- inserted object is a directory
flag := 3; -- check flags for 'd' and 'f' bits
msk := 8; -- mask contains 'o' bit
END IF;
IF msk > 0 THEN
ALTER SEQUENCE serial START 0;
INSERT INTO t_acl
SELECT id, rstype, type, (flags | msk) # msk, access_msk, who, who_id, address_msk, nextval('serial')
FROM t_acl
WHERE rs_id = parentid AND (flags & flag > 0)
ORDER BY ace_order;
END IF;
END IF;
RETURN NULL;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER tgr_insertACL AFTER INSERT ON t_dirs FOR EACH ROW EXECUTE PROCEDURE f_insertACL();
07070100204c66000081a4000000650000000a000000014ad732220000237c000000b600010008ffffffffffffffff0000003500000000reloc/opt/d-cache/libexec/chimera/sql/create-db2.sql --
-- Chinera table layout
-- for DB2 (9.1)
--
-- $Id: create-db2.sql 296 2007-10-30 21:09:30Z tigran $
--
-- Inodes
--
CREATE TABLE t_inodes (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
itype INTEGER NOT NULL,
imode INTEGER NOT NULL,
inlink INTEGER NOT NULL,
iuid INTEGER NOT NULL,
igid INTEGER NOT NULL,
isize BIGINT NOT NULL,
iio INTEGER NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
imtime TIMESTAMP NOT NULL
);
--
-- dirs
--
CREATE TABLE t_dirs (
iparent CHAR(36) NOT NULL,
iname VARCHAR(255) NOT NULL,
ipnfsid CHAR(36) NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
PRIMARY KEY (iparent,iname)
);
--
-- data
--
CREATE TABLE t_inodes_data (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
ifiledata BLOB,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
--
-- pnfs levels 1-7
--
CREATE TABLE t_level_1 (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
imode INTEGER NOT NULL,
inlink INTEGER NOT NULL,
iuid INTEGER NOT NULL,
igid INTEGER NOT NULL,
isize BIGINT NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
imtime TIMESTAMP NOT NULL,
ifiledata BLOB,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_2 (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
imode INTEGER NOT NULL,
inlink INTEGER NOT NULL,
iuid INTEGER NOT NULL,
igid INTEGER NOT NULL,
isize BIGINT NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
imtime TIMESTAMP NOT NULL,
ifiledata BLOB,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_3 (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
imode INTEGER NOT NULL,
inlink INTEGER NOT NULL,
iuid INTEGER NOT NULL,
igid INTEGER NOT NULL,
isize BIGINT NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
imtime TIMESTAMP NOT NULL,
ifiledata BLOB,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_4 (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
imode INTEGER NOT NULL,
inlink INTEGER NOT NULL,
iuid INTEGER NOT NULL,
igid INTEGER NOT NULL,
isize BIGINT NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
imtime TIMESTAMP NOT NULL,
ifiledata BLOB,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_5 (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
imode INTEGER NOT NULL,
inlink INTEGER NOT NULL,
iuid INTEGER NOT NULL,
igid INTEGER NOT NULL,
isize BIGINT NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
imtime TIMESTAMP NOT NULL,
ifiledata BLOB,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_6 (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
imode INTEGER NOT NULL,
inlink INTEGER NOT NULL,
iuid INTEGER NOT NULL,
igid INTEGER NOT NULL,
isize BIGINT NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
imtime TIMESTAMP NOT NULL,
ifiledata BLOB,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_7 (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
imode INTEGER NOT NULL,
inlink INTEGER NOT NULL,
iuid INTEGER NOT NULL,
igid INTEGER NOT NULL,
isize BIGINT NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
imtime TIMESTAMP NOT NULL,
ifiledata BLOB,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
--
-- Name: t_tags_inodes; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_tags_inodes (
itagid CHAR(36) PRIMARY KEY NOT NULL,
imode INTEGER NOT NULL,
inlink INTEGER NOT NULL,
iuid INTEGER NOT NULL,
igid INTEGER NOT NULL,
isize BIGINT NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
imtime TIMESTAMP NOT NULL,
ivalue BLOB
);
--
-- Name: t_tags; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--
CREATE TABLE t_tags (
ipnfsid CHAR(36) NOT NULL,
itagname VARCHAR(255) NOT NULL,
itagid CHAR(36) NOT NULL,
isorign INTEGER NOT NULL,
PRIMARY KEY (ipnfsid, itagname),
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
FOREIGN KEY (itagid) REFERENCES t_tags_inodes( itagid )
);
--
-- populate Inodes
--
INSERT INTO t_inodes VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', 16384, 493, 2, 0, 0, 512, 0, current_TIMESTAMP, current_TIMESTAMP, current_TIMESTAMP );
INSERT INTO t_inodes VALUES ('000000000000000000000000000000000000', 16384, 493, 6, 0, 0, 512, 0, current_TIMESTAMP, current_TIMESTAMP, current_TIMESTAMP );
INSERT INTO t_inodes VALUES ('A0D739870178504FF109C52075F44287F9DE', 16384, 493, 4, 0, 0, 512, 0, current_TIMESTAMP, current_TIMESTAMP, current_TIMESTAMP );
INSERT INTO t_inodes VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 16384, 493, 6, 0, 0, 512, 1, current_TIMESTAMP, current_TIMESTAMP, current_TIMESTAMP );
INSERT INTO t_inodes VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', 16384, 493, 2, 0, 0, 512, 1, current_TIMESTAMP, current_TIMESTAMP, current_TIMESTAMP );
INSERT INTO t_inodes VALUES ('80D1B8B90CED30430608C58002811B3285FC', 16384, 493, 2, 0, 0, 512, 1, current_TIMESTAMP, current_TIMESTAMP, current_TIMESTAMP );
--
-- directory
--
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', '.', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', 'admin','A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', '.', 'A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', 'usr', 'F674EC8B0CFF104AA109828000696CAD6CAC');
INSERT INTO t_dirs VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', '.', 'F674EC8B0CFF104AA109828000696CAD6CAC');
INSERT INTO t_dirs VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', 'etc', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', '.', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', '..', 'A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 'config','80D1B8B90CED30430608C58002811B3285FC');
INSERT INTO t_dirs VALUES ('80D1B8B90CED30430608C58002811B3285FC', '.', '80D1B8B90CED30430608C58002811B3285FC');
INSERT INTO t_dirs VALUES ('80D1B8B90CED30430608C58002811B3285FC', '..', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 'exports','E3BB936F04F6D047A70B75201EDBA32FA9F5');
INSERT INTO t_dirs VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', '.', 'E3BB936F04F6D047A70B75201EDBA32FA9F5');
INSERT INTO t_dirs VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', '..', '1B3BB44C05C9904DFB0928F06F2467395CD5');
--
-- For faster lookups
--
CREATE INDEX i_dirs_iparent ON t_dirs(iparent);
--
-- For faster getparent
--
CREATE INDEX i_dirs_ipnfsid ON t_dirs(ipnfsid);
-- STORAGE INFO
--
-- Generic storage information. Represents X:Y@Z + AL +RP
-- ipnfsid : pnfsid of the inode
-- ihsmName : Z-component of storageGroup
-- istorageGroup : X-component of storageGroup
-- istorageSubGroup : Y-component of storageGroup
-- iaccessLatency : ONLINE / NEARLINE ( keep on disk / keep on disk, if there is a space)
-- iretentionPolicy : CUSTODIAL / OUTPUT ( tape / disk )
CREATE TABLE t_storageinfo (
ipnfsid CHAR(36) PRIMARY KEY NOT NULL,
ihsmName VARCHAR(64) NOT NULL,
istorageGroup VARCHAR(64) NOT NULL,
istorageSubGroup VARCHAR(64) NOT NULL,
iaccessLatency INTEGER NOT NULL,
iretentionPolicy INTEGER NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
-- LOCATION INFO
--
-- Generic storage information
-- ipnfsid : pnfsid of the inode
-- itype : type of storage, e.g. tape, disk
-- ilocation : type specific information like pool name for disk and HSM connetion for tape
-- ipriority : in case of multiple locations of hint for performance or other needs
-- ictime : location creation time
-- iatime : last access time, probably performance killer, but nice to have for statistics
-- istate : location status ONLINE/OFF-LINE
CREATE TABLE t_locationinfo (
ipnfsid CHAR(36) NOT NULL,
itype INTEGER NOT NULL,
ilocation VARCHAR(512) NOT NULL,
ipriority INTEGER NOT NULL,
ictime TIMESTAMP NOT NULL,
iatime TIMESTAMP NOT NULL,
istate INTEGER NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
PRIMARY KEY (ipnfsid,itype,ilocation)
);
CREATE INDEX i_locationinfo_ipnfsid ON t_locationinfo(ipnfsid);
07070100204c67000081a4000000650000000a000000014ad732220000221a000000b600010008ffffffffffffffff0000003800000000reloc/opt/d-cache/libexec/chimera/sql/create-hsqldb.sql SET PROPERTY "sql.enforce_strict_size" TRUE;
CREATE TABLE t_inodes (
ipnfsid character(36) PRIMARY KEY,
itype integer NOT NULL,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
iio integer NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
imtime timestamp NOT NULL
);
CREATE TABLE t_dirs (
iparent character(36) NOT NULL,
iname character varying(255) NOT NULL,
ipnfsid character(36) NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
PRIMARY KEY (iparent,iname)
);
CREATE TABLE t_inodes_data (
ipnfsid character(36) PRIMARY KEY,
ifiledata LONGVARBINARY,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
CREATE TABLE t_inodes_checksum (
ipnfsid character(36) PRIMARY KEY,
itype integer NOT NULL,
isum character varying(128) NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
CREATE TABLE t_level_1 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
imtime timestamp NOT NULL,
ifiledata LONGVARBINARY,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_2 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
imtime timestamp NOT NULL,
ifiledata LONGVARBINARY,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_3 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
imtime timestamp NOT NULL,
ifiledata LONGVARBINARY,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_4 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
imtime timestamp NOT NULL,
ifiledata LONGVARBINARY,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_5 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
imtime timestamp NOT NULL,
ifiledata LONGVARBINARY,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_6 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
imtime timestamp NOT NULL,
ifiledata LONGVARBINARY,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_level_7 (
ipnfsid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
imtime timestamp NOT NULL,
ifiledata LONGVARBINARY,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid )
);
CREATE TABLE t_tags_inodes (
itagid character(36) PRIMARY KEY,
imode integer NOT NULL,
inlink integer NOT NULL,
iuid integer NOT NULL,
igid integer NOT NULL,
isize bigint NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
imtime timestamp NOT NULL,
ivalue LONGVARBINARY
);
CREATE TABLE t_tags (
ipnfsid character(36) NOT NULL,
itagname character varying(255) NOT NULL,
itagid character(36) NOT NULL,
isorign integer NOT NULL,
PRIMARY KEY (ipnfsid, itagname),
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
FOREIGN KEY (itagid) REFERENCES t_tags_inodes( itagid )
);
INSERT INTO t_inodes VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', 16384, 493, 2, 0, 0, 512, 0, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('000000000000000000000000000000000000', 16384, 493, 6, 0, 0, 512, 0, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('A0D739870178504FF109C52075F44287F9DE', 16384, 493, 4, 0, 0, 512, 0, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 16384, 493, 6, 0, 0, 512, 1, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', 16384, 493, 2, 0, 0, 512, 1, NOW(), NOW(), NOW() );
INSERT INTO t_inodes VALUES ('80D1B8B90CED30430608C58002811B3285FC', 16384, 493, 2, 0, 0, 512, 1, NOW(), NOW(), NOW() );
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', '.', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', 'admin','A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', '.', 'A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('000000000000000000000000000000000000', 'usr', 'F674EC8B0CFF104AA109828000696CAD6CAC');
INSERT INTO t_dirs VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', '.', 'F674EC8B0CFF104AA109828000696CAD6CAC');
INSERT INTO t_dirs VALUES ('F674EC8B0CFF104AA109828000696CAD6CAC', '..', '000000000000000000000000000000000000');
INSERT INTO t_dirs VALUES ('A0D739870178504FF109C52075F44287F9DE', 'etc', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', '.', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', '..', 'A0D739870178504FF109C52075F44287F9DE');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 'config','80D1B8B90CED30430608C58002811B3285FC');
INSERT INTO t_dirs VALUES ('80D1B8B90CED30430608C58002811B3285FC', '.', '80D1B8B90CED30430608C58002811B3285FC');
INSERT INTO t_dirs VALUES ('80D1B8B90CED30430608C58002811B3285FC', '..', '1B3BB44C05C9904DFB0928F06F2467395CD5');
INSERT INTO t_dirs VALUES ('1B3BB44C05C9904DFB0928F06F2467395CD5', 'exports','E3BB936F04F6D047A70B75201EDBA32FA9F5');
INSERT INTO t_dirs VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', '.', 'E3BB936F04F6D047A70B75201EDBA32FA9F5');
INSERT INTO t_dirs VALUES ('E3BB936F04F6D047A70B75201EDBA32FA9F5', '..', '1B3BB44C05C9904DFB0928F06F2467395CD5');
CREATE INDEX i_dirs_iparent ON t_dirs(iparent);
CREATE INDEX i_dirs_ipnfsid ON t_dirs(ipnfsid);
CREATE TABLE t_storageinfo (
ipnfsid CHAR(36) PRIMARY KEY,
ihsmName VARCHAR(64) NOT NULL,
istorageGroup VARCHAR(64) NOT NULL,
istorageSubGroup VARCHAR(64) NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
CREATE TABLE t_access_latency (
ipnfsid CHAR(36) PRIMARY KEY,
iaccessLatency INT NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
CREATE TABLE t_retention_policy (
ipnfsid CHAR(36) PRIMARY KEY,
iretentionPolicy INT NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ) ON DELETE CASCADE
);
CREATE TABLE t_locationinfo (
ipnfsid CHAR(36),
itype INT NOT NULL,
ilocation VARCHAR(1024) NOT NULL,
ipriority INT NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
istate INT NOT NULL,
FOREIGN KEY (ipnfsid) REFERENCES t_inodes( ipnfsid ),
PRIMARY KEY (ipnfsid,itype,ilocation)
);
CREATE TABLE t_locationinfo_trash (
ipnfsid CHAR(36),
itype INT NOT NULL,
ilocation VARCHAR(1024) NOT NULL,
ipriority INT NOT NULL,
ictime timestamp NOT NULL,
iatime timestamp NOT NULL,
istate INT NOT NULL,
PRIMARY KEY (ipnfsid,itype,ilocation)
);
CREATE INDEX i_locationinfo_ipnfsid ON t_locationinfo(ipnfsid);
CREATE TABLE t_acl (
rs_id CHAR(36) NOT NULL,
rs_type INT NOT NULL,
type INT DEFAULT 0 NOT NULL,
flags INT NULL,
access_msk INT DEFAULT 0 NOT NULL,
who INT NOT NULL,
who_id INT,
address_msk CHAR(32) DEFAULT 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' NOT NULL,
ace_order INT DEFAULT 0 NOT NULL,
PRIMARY KEY (rs_id, ace_order)
);
CREATE INDEX i_t_acl_rs_id ON t_acl(rs_id); 07070100204c6a000081a4000000650000000a000000014ad732220000031f000000b600010008ffffffffffffffff0000003a00000000reloc/opt/d-cache/libexec/chimera/sql/migrate-2-1.9.3.sql --
-- convert pre 1.9.2 db schema to the new one
--
--
-- create new tables and populate them
--
CREATE TABLE t_access_latency AS SELECT ipnfsid, iaccessLatency FROM t_storageinfo;
CREATE TABLE t_retention_policy AS SELECT ipnfsid, iretentionPolicy FROM t_storageinfo;
--
-- remove obsolete columns
--
ALTER TABLE t_storageinfo DROP COLUMN iretentionpolicy ;
ALTER TABLE t_storageinfo DROP COLUMN iaccesslatency ;
--
-- add foreign key:
--
-- remove entry when inode is removed
--
ALTER TABLE ONLY t_access_latency ADD CONSTRAINT t_access_latency_ipnfsid_fkey
FOREIGN KEY (ipnfsid) REFERENCES t_inodes(ipnfsid) ON DELETE CASCADE;
ALTER TABLE ONLY t_retention_policy ADD CONSTRAINT t_retention_policy_ipnfsid_fkey
FOREIGN KEY (ipnfsid) REFERENCES t_inodes(ipnfsid) ON DELETE CASCADE;
07070100204c6d000081a4000000650000000a000000014ad73222000000fb000000b600010008ffffffffffffffff0000003200000000reloc/opt/d-cache/libexec/chimera/sql/top_dir.sql -- $Id: top_dir.sql 297 2007-10-30 21:13:05Z tigran $
-- top dir
SELECT iparent, COUNT(iparent) AS pcount FROM t_dirs GROUP BY iparent ORDER BY pcount;
-- file of user uid 3750
SELECT * FROM t_inodes WHERE iuid=3750 AND NOT (imode & 16384 = 16384 );
07070100204c63000081a4000000650000000a000000014ad732220000012e000000b600010008ffffffffffffffff0000003800000000reloc/opt/d-cache/libexec/chimera/sql/cacheinfo-pgs.sql
DROP TABLE cacheinfo;
DROP INDEX pool_inx;
DROP INDEX pnfs_inx;
CREATE TABLE cacheinfo (
pnfsid CHAR(24) NOT NULL,
pool VARCHAR(255) NOT NULL,
ctime TIMESTAMP NOT NULL,
UNIQUE(pnfsid, pool)
);
create index pool_inx on cacheinfo (pool);
create index pnfs_inx on cacheinfo (pnfsid);
07070100204c64000081a4000000650000000a000000014ad73222000000cd000000b600010008ffffffffffffffff0000003400000000reloc/opt/d-cache/libexec/chimera/sql/cacheinfo.sql
DROP TABLE IF EXISTS cacheinfo;
CREATE TABLE cacheinfo (
pnfsid CHAR(24) NOT NULL ,
pool VARCHAR(255) NOT NULL,
ctime TIMESTAMP NOT NULL,
INDEX(pnfsid),
INDEX(pool),
UNIQUE(pnfsid,pool)
);
07070100204c5e000081a4000000650000000a000000014ad7322200000a7d000000b600010008ffffffffffffffff0000003600000000reloc/opt/d-cache/libexec/chimera/chimera-nfs-run.xml
07070100204c5f000081ed000000650000000a000000014ad732220000012e000000b600010008ffffffffffffffff0000003500000000reloc/opt/d-cache/libexec/chimera/chimera-set-acl.sh #!/bin/sh
ourHomeDir=/opt/d-cache
ourHomeDir=/opt/d-cache
. ${ourHomeDir}/classes/extern.classpath
. ${ourHomeDir}/config/dCacheSetup
${java} ${java_options} -classpath ${externalLibsClassPath} \
-Xmx512M org.dcache.chimera.acl.client.SetAclClient ${ourHomeDir}/config/acl.properties
07070100204c73000081a4000000650000000a000000014ad7323200000b9c000000b600010008ffffffffffffffff0000002c00000000reloc/opt/d-cache/libexec/wait-for-cells.sh #!/bin/sh
#
# Wait for dCache to have certain cells present. The function will time-out if
# dCache takes too long.
#
ourHomeDir=${ourHomeDir:-/opt/d-cache}
# Default polling frequency, in seconds.
poll=5
# Our return code; default is 0 (=> OK)
rc=0
xslt_dir=$ourHomeDir/share/xml/xslt
usage()
{
echo "Usage:"
echo " `basename $0` [-p ] [-d | --dots] [-l | --list-missing]"
echo " [-H ] [-P ] [ ...]"
echo
echo "Checks every seconds (${poll}s by default) whether the listed cells are up."
echo "Obtains dCache current status by querying the web interface. This is assumed to be"
echo "running on the local machine, but the -H option can be set for remote queries. If"
echo "the dCache web interface is using a non-default port, the -P option is needed."
echo
echo "All s are specified as @ or "
echo
echo "The -d and -l options alter what output the script provides on stdout. If neither is"
echo "specified then no output is emitted."
echo
echo "Returns:"
echo " 0 if all cells are up,"
echo " 1 if at least one cell was not after waiting for seconds,"
echo " 5 if parameters to this script are wrong."
}
# Minimum timeout, in seconds
min_timeout=$poll
# Default values of host and port
host=localhost
port=2288
while [ $# -gt 1 ]; do
case $1 in
-p)
shift
poll=$1
shift
;;
-P)
shift
port=$1
shift
;;
-h | --help)
usage
exit 5
;;
-d | --dots)
dots=1
shift
;;
-l | --list-missing)
list_missing=1
shift
;;
-H)
shift
host=$1
shift
;;
-*)
echo "Unknown option $1"
echo
usage
exit 5
;;
*)
# Assume the remaining arguments are the required args.
break;
;;
esac
done
if [ $# -lt 2 ]
then
usage
exit 5
fi
timeout=$1
shift
cells="$@"
if [ "$timeout" -lt $min_timeout ]; then
echo Timeout $timeout is less that minimum $min_timeout
exit 5
fi
#
# See which cells are currently missing
#
list_missing_cells()
{
xsltproc --stringparam cells "$cells" $xslt_dir/wait-for-cells.xsl "http://$host:$port/info/domains"
}
#
# Loop, waiting for either timeout or cells to come up.
#
timeout=$(date -d "$timeout seconds" +%s)
while :; do
now=$(date +%s)
if [ $now -gt $timeout ]; then
# One or more cells were not up by timeout, exit with rc=1
rc=1
break;
fi
list_missing_cells | grep -q "Missing:"
if [ $? -eq 1 ]; then
# All cells are present, exit with rc=0
break;
fi
if [ "x$dots" = "x1" ]; then
echo -n "."
fi
sleep $poll
done
#
# Tidy up and exit.
#
if [ "x$dots" = "x1" ]; then
echo
fi
if [ $rc -ne 0 -a "$list_missing" = "1" ]; then
list_missing_cells
fi
exit $rc
07070100204c59000081a4000000650000000a000000014ad7323200000000000000b600010008ffffffffffffffff0000002100000000reloc/opt/d-cache/libexec/README 07070100204c4d000041ed000000650000000a000000024ad7323800000000000000b600010008ffffffffffffffff0000001700000000reloc/opt/d-cache/jobs 07070100204c53000081ed000000650000000a000000014ad73222000003fa000000b600010008ffffffffffffffff0000003300000000reloc/opt/d-cache/jobs/infoDynamicSE-plugin-dcache #!/bin/sh
#
# Install this plugin and provider in the LCG GIP version 1.0.21 or later with
#
# > ln -s /opt/d-cache/jobs/infoDynamicSE-plugin-dcache /opt/lcg/var/gip/plugin/
# > ln -s /opt/d-cache/jobs/infoDynamicSE-provider-dcache /opt/lcg/var/gip/provider/
#
# The plugin will only print the entries of ${infoProviderStaticFile} which should
# be changed. The provider will print access and control protocol entries according
# to the running services.
#
. /opt/d-cache/config/dCacheSetup
${java:-java} -jar /opt/d-cache/classes/infoDynamicSE.jar \
-mode=plugin \
-ldif=${infoProviderStaticFile:-/opt/lcg/var/gip/ldif/lcg-info-static-se.ldif} \
-type=dcache \
-host=${infoCollectorHost:-$(hostname)} \
-port=${infoCollectorPort:-22111}
07070100204c54000081ed000000650000000a000000014ad73222000003fa000000b600010008ffffffffffffffff0000003500000000reloc/opt/d-cache/jobs/infoDynamicSE-provider-dcache #!/bin/sh
#
# Install this plugin and provider in the LCG GIP version 1.0.21 or later with
#
# > ln -s /opt/d-cache/jobs/infoDynamicSE-plugin-dcache /opt/lcg/var/gip/plugin/
# > ln -s /opt/d-cache/jobs/infoDynamicSE-provider-dcache /opt/lcg/var/gip/provider/
#
# The plugin will only print the entries of ${infoProviderStaticFile} which should
# be changed. The provider will print access and control protocol entries according
# to the running services.
#
. /opt/d-cache/config/dCacheSetup
${java:-java} -jar /opt/d-cache/classes/infoDynamicSE.jar \
-mode=provider \
-ldif=${infoProviderStaticFile:-/opt/lcg/var/gip/ldif/lcg-info-static-se.ldif} \
-type=dcache \
-host=${infoCollectorHost:-$(hostname)} \
-port=${infoCollectorPort:-22111}
07070100204c4e000081ed000000650000000a000000014ad73221000011b8000000b600010008ffffffffffffffff0000001f00000000reloc/opt/d-cache/jobs/encp.sh #!/bin/sh
#
#set -x
usage() {
echo "Usage : put|get [-si=] [-key[=value] ...]" 1>&2
}
if [ $# -lt 3 ] ; then
usage
exit 4
fi
echo "$* `date`" >>/tmp/hsm.log
#
#########################################################
#
# split the arguments into the options -= and the
# positional arguments.
#
args=""
while [ $# -gt 0 ] ; do
if expr "$1" : "-.*" >/dev/null ; then
a=`expr "$1" : "-\(.*\)" 2>/dev/null`
key=`echo "$a" | awk -F= '{print $1}' 2>/dev/null`
value=`echo "$a" | awk -F= '{for(i=2;i/dev/null`
if [ -z "$value" ] ; then a="${key}=" ; fi
eval "${key}=\"${value}\""
a="export ${key}"
eval "$a"
else
args="${args} $1"
fi
shift 1
done
if [ ! -z "$args" ] ; then
set `echo "$args" | awk '{ for(i=1;i<=NF;i++)print $i }'`
fi
if [ $# -lt 3 ] ; then
usage
exit 4
fi
command=$1
pnfsid=$2
filename=$3
# end of init
#
# extract the options
# -si=
# -hsmBase=
# -waitTime=
# -pnfs=
#
if [ -z "${hsmBase}" ] ; then
echo "Need 'hsmBase' ... " 1>&2
exit 2
fi
if [ -z "${pnfs}" ] ; then
echo "Need 'pnfs' , the pnfsMountpoint " 1>&2
exit 5
fi
cat "${pnfs}/.(const)(`date`)" >/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
echo "Seems not to be a pnfsFilesystem : ${pnfs}" 1>&2
exit 6
fi
if [ \( -z "${si}" \) -a \( "${command}" = "put" \) ] ; then
echo "StorageInfo (-si=...) needed for 'put'" 1>&2
exit 1
fi
storageInfo=${si}
#
if [ -z ${waitTime} ] ; then waitTime=1 ; fi
#
BASE=${hsmBase}/data
if [ ! -d "$BASE" ] ; then
echo "Not a directory : ${BASE}" 1>&2
exit 5
fi
#
#
pnfsfile=$BASE/$pnfsid
if [ $command = "get" ] ; then
if [ ! -f $pnfsfile ] ; then
echo "pnfsid not found : $2" 1>&2
exit 4
fi
cp $BASE/$pnfsid $filename 1>/dev/null 2>/dev/null
sleep ${waitTime}
if [ $? -ne 0 ] ; then
echo "Failed : cp $BASE/$pnfsid $filename"
exit 5
fi
exit 0
elif [ $command = "put" ] ; then
if [ -f "${pnfsfile}" ] ; then
echo "pnfsid already exists : ${pnfsid}" 1>&2
exit 4
fi
touch ${BASE}/${pnfsid}
sleep ${waitTime}
cp $filename $BASE/$pnfsid 1>/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
echo "Failed : cp $filename $BASE/$pnfsid"
exit 5
fi
parentId=`cat "${pnfs}/.(parent)($pnfsid)"`
if [ \( -z "${hsmType}" \) -o \( "${hsmType}" = "osm" \) ] ; then
osmtId=`awk '{ if( $2 == "OSMTemplate" )print $1 }' "${pnfs}/.(ptags)($parentId)"`
store=`awk '{ if( $1 == "StoreName" )print $2 }' "${pnfs}/.(access)($osmtId)"`
osmgroupId=`awk '{ if( $2 == "sGroup" )print $1 }' "${pnfs}/.(ptags)($parentId)"`
group=`cat "${pnfs}/.(access)($osmgroupId)"`
echo "${store} ${group} bfid.${pnfsid}" >"${pnfs}/.(access)($pnfsid)(1)" 2>/dev/null ;
if [ $? -ne 0 ] ; then
echo "Couldn't write storageInfo back into pnfs" 1>&2
rm -rf $BASE/$pnfsid >/dev/null 2>/dev/null
exit 7
fi
else
groupId=`awk '{ if( $2 == "storage_group" )print $1 }' "${pnfs}/.(ptags)($parentId)"`
if [ ! -z "${groupId}" ] ; then
group=`cat "${pnfs}/.(access)($groupId)"`
else
group=""
fi
familyId=`awk '{ if( $2 == "file_family" )print $1 }' "${pnfs}/.(ptags)($parentId)"`
if [ ! -z "${familyId}" ] ; then
family=`cat "${pnfs}/.(access)($familyId)"`
else
echo "Can't determine 'file_family' from ${parentId}" 1>&2
exit 7
fi
echo "volumeX" >"${pnfs}/.(access)($pnfsid)(4)" 2>/dev/null ;
echo "locationX" >>"${pnfs}/.(access)($pnfsid)(4)" 2>/dev/null ;
echo "100" >>"${pnfs}/.(access)($pnfsid)(4)" 2>/dev/null ;
echo "${family}" >>"${pnfs}/.(access)($pnfsid)(4)" 2>/dev/null ;
echo "??" >>"${pnfs}/.(access)($pnfsid)(4)" 2>/dev/null ;
echo "??" >>"${pnfs}/.(access)($pnfsid)(4)" 2>/dev/null ;
echo "??" >>"${pnfs}/.(access)($pnfsid)(4)" 2>/dev/null ;
echo "??" >>"${pnfs}/.(access)($pnfsid)(4)" 2>/dev/null ;
echo "BFID-${pnfsid}" >>"${pnfs}/.(access)($pnfsid)(4)" 2>/dev/null ;
if [ $? -ne 0 ] ; then
echo "Couldn't write storageInfo back into pnfs" 1>&2
rm -rf $BASE/$pnfsid >/dev/null 2>/dev/null
exit 7
fi
fi
exit 0
elif [ $command = "next" ] ; then
echo 0
else
echo "Illegal command $command" 1>&2
exit 4
fi
exit 0
07070100204c52000081ed000000650000000a000000014ad7322100001da0000000b600010008ffffffffffffffff0000002200000000reloc/opt/d-cache/jobs/hsmcpV4.sh #!/bin/sh
#
# $Id: hsmcpV4.sh,v 1.1 2006-05-31 14:08:15 tigran Exp $
#
#set -x
#
#
# dCache configuration
#
# hsm set osm -command=
# hsm set osm -hsmBase=
# hsm set osm -pnfs=
#
# prerequisits
#
LOG=/tmp/hsmio.log
DEVTTY=$LOG
AWK=gawk
OSMCP=cp
#
# get the dcache base directory
# (assumes that we are called with full path)
#
dir=`dirname $0`
DCACHE_HOME=`dirname ${dir}`
#
# some help functions
#
usage() {
echo "Usage : put|get [-si=] [-key[=value] ...]" | tee -a $LOG >&2
}
problem() {
echo "($$) $2 ($1)" | tee -a $LOG >&2
exit $1
}
errorReport() {
echo "($$) $1" | tree -a ${LOG} >&2
return 0
}
#
# say hallo to people
#
echo "$* `date`" >>${LOG}
#
# have we been called correctly ?
#
if [ $# -lt 3 ] ; then
usage
exit 4
fi
#
# Something wrong, we didn't find our base directory
#
[ ! -d "${DCACHE_HOME}" ] && problem 1 "DCACHE root not found ${DCACHE_HOME}"
#
#
##################################################################################
#
# split the arguments into the options -= and the
# positional arguments.
#
args=""
while [ $# -gt 0 ] ; do
if expr "$1" : "-.*" >/dev/null ; then
a=`expr "$1" : "-\(.*\)" 2>/dev/null`
key=`echo "$a" | awk -F= '{print $1}' 2>/dev/null`
value=`echo "$a" | awk -F= '{for(i=2;i/dev/null`
if [ -z "$value" ] ; then a="${key}=" ; fi
eval "${key}=\"${value}\""
a="export ${key}"
eval "$a"
else
args="${args} $1"
fi
shift 1
done
if [ ! -z "$args" ] ; then
set `echo "$args" | awk '{ for(i=1;i<=NF;i++)print $i }'`
fi
##################################################################################
#
# assign the manditory arguments
#
command=$1
pnfsid=$2
filename=$3
#
#
########################################################
#
# check for some basic variables
#
[ -z "${hsmBase}" ] && problem 3 "Variable 'hsmBase' not defined"
#
[ ! -d "${hsmBase}" ] && problem 4 "hsmBase=${hsmBase} : not a directory"
#
# make the storage info variables available
#
[ -z "${si}" ] && problem 1 "StorageInfo (-si=...) not available"
#
#
getStorageInfoKey() {
echo $si |
$AWK -v key=$1 -F';' '{
for(i=1;i<=NF;i++){
split($i,a,"=") ;
if(a[1]==key)print a[2]
}
}'
}
#
# construct the actual file path from 'hsmBase, store ,group and bfid'
#
# createFilePath 'hsmBase' 'store' 'group' 'pnfsId'
#
createBfid() {
xstore=$1
xgroup=$2
xpnfsId=$3
xhelp=`echo ${xpnfsId} | awk '{ print substr( $1 , 23 ) }'`
echo ${xstore}/${xgroup}/${xhelp}/${xpnfsId}
return 0;
}
createFilePath() {
zhsmBase=$1
zbfid=$2
zfilebase=`dirname ${zhsmBase}/${zbfid}`
[ ! -d "${fzilebase}" ] && mkdir -p ${zfilebase} 2>/dev/null
errno=$?
if [ ${errno} -ne 0 ] ; then
errorReport "(mkdir) : Couldn't create ${zfilebase}"
return ${errno}
fi
echo ${zfilebase}
return 0;
}
# end of init
#
########################################################
#
# check for pnfs
#
needpnfs=false
#
#
# make sure we get pnfs for 'put'
#
[ ${command} = "put" ] && needpnfs=true
#
# if pnfs is required, we need to make some checks
# and we have to calculate the parent 'pnfsid' and the
# so called pnfsFile.
#
if [ "${needpnfs}" = "true" ] ; then
[ -z "${pnfs}" ] && problem 5 "Need 'pnfs' , the pnfsMountpoint "
cat "${pnfs}/.(const)(452kl345)" >/dev/null 2>/dev/null
[ $? -ne 0 ] && problem 6 "Seems not to be a pnfsFilesystem : ${pnfs}"
parentId=`cat "${pnfs}/.(parent)($pnfsid)"`
[ $? -ne 0 ] && problem 32 "PnfsFile disappeared $pnfsid"
#
# access pnfsfile through Pnfsid
#
pnfsfile="${pnfs}/.(access)(${pnfsid})"
fi
#
readTag() {
tagid=`awk -v key=$1 '{ if( $2 == key )print $1 }' "${pnfs}/.(ptags)($parentId)" 2>/dev/null`
[ -z "$tagid" ] && return 1
cat "${pnfs}/.(access)(tagid)"
return 0
}
#
#########################################################
#
# osm specific variables
#
store=`getStorageInfoKey store 2>/dev/null`
group=`getStorageInfoKey group 2>/dev/null`
bfid=`getStorageInfoKey bfid 2>/dev/null`
#
#########################################################
#
datasetPut() {
yhsmBase=${1}
ystore=${2}
ygroup=${3}
ybfid=${4}
ybfid=`createBfid ${ystore} ${ygroup} ${ybfid}`
ydestination=`createFilePath ${yhsmBase} ${ybfid}`
if [ $? -ne 0 ] ; then
errorReport "datasetPut : create Filepath failed"
return 4
fi
${OSMCP} ${filename} ${ydestination}
if [ $? -ne 0 ] ; then
errorReport "Problem in writing ${ydestination} ${filename}"
#
# this seems to be a serious problem, so we return 41
# which will disable to the pool.
#
return 41
fi
echo "${ybfid}"
return 0
}
setFilesize() {
localFilesizeFile="${pnfs}/.(pset)($pnfsid)(size)($1)"
touch ${localFilesizeFile} 2>>$LOG
if [ $? -ne 0 ] ; then
errorReport "Couldn't set filesize (${$1}) of ${pnfsid}"
return 35
fi
return 0
}
#
#
# storeStorageInfo group bfid [level]
#
storeStorageInfo() {
#
#
wstore=$1
wgroup=$2
wbfid=$3
echo "${wstore} ${wgroup} ${wbfid}" >"${pnfsfile}(1)" 2>/dev/null
if [ $? -ne 0 ] ; then
errorReport "Couldn't write storageInfo back into pnfs ${pnfsid} '${wstore} ${wgroup} ${wbfid}'"
return 34
fi
return 0
}
#
#
#
if [ -z "${waitTime}" ] ; then waitTime=1 ; fi
#
#
#
if [ $command = "get" ] ; then
#
[ \( "${needpnfs}" = "true" \) -a \( ! -f "${pnfsfile}" \) ] && \
problem 34 "pnfsid not found : $pnfsid"
#
# we don't need pnfs, all parameters are coming
# with '-si=...'
#
[ \( -z "${store}" \) -o \( -z "${group}" \) -o \( -z "${bfid}" \) ] && \
problem 22 "couldn't get sufficient info for 'copy' : store=>${store}< group=>${group}< bfid=>${bfid}<"
#
if [ "$group" = "${testFailedGroup}" ] ; then
errorReport "Test group triggered ${testFailedGroup}"
[ -z "${testFailedErrno}" ] && testFailedErrno=4
exit ${testFailedErrno}
fi
cp ${hsmBase}/${bfid} ${filename}
if [ $? -ne 0 ] ; then
errorReport "Copy back failed : ${hsmBase}/${bfid} ${filename}"
rm -rf ${filename} 2>/dev/null
fi
exit 0
elif [ $command = "put" ] ; then
#
# and the put
#
filesize=`ls -l ${filename} 2>/dev/null | awk '{ print $5 }'`
#
# check for existence of file
# NOTE : if the filesize is zero, we are expected to return 31, so that
# dcache can react accordingly.
#
[ -z "${filesize}" ] && problem 31 "File not found : ${filename}"
[ "${filesize}" = "0" ] && problem 31 "Filesize is zero (${filename})"
#
#
# now, finally copy the file to the HSM
# (we assume the bfid to be returned)
#
bfid=`datasetPut ${hsmBase} ${store} ${group} ${pnfsid}` || exit $?
#
# and now store 'store group' and bfid into level I
#
storeStorageInfo ${store} ${group} ${bfid}
errno=$?
#
if [ $? -ne 0 ] ; then
#
# get rid of the hsm file if we can't register the copy into pnfs
#
rm ${hsmBase}/${bfid} 2>/dev/null
exit ${errno}
fi
exit 0
elif [ $command = "next" ] ; then
echo "'next' operation not supported by this HSM" 1>&2
exit 10
else
echo "Illegal command $command" 1>&2
exit 4
fi
exit 0
07070100204c56000081ed000000650000000a000000014ad7322100001bfb000000b600010008ffffffffffffffff0000002800000000reloc/opt/d-cache/jobs/needFulThings.sh #=========================================================================
#
# needful things
#
#-------------------------------------------------------------------------
#
#
getFull() {
xdc=$1
expr "$xdc" : "\/" >/dev/null 2>&1 || xdc="`pwd`/$xdc"
echo $xdc
return 0
}
#=========================================================================
#
# needful things
#
autodetectPnfs() {
df -k | awk '{ if( NR > 1 )print $NF }' | while read mounted
do
if [ ! -f "$mounted/.(const)(magic)" ] ; then continue ; fi
echo "$mounted"
exit 44
done
if [ $? -eq 44 ] ; then exit 0 ; else exit 1 ; fi
}
#
findBinary() {
z="echo \${$1}"
x=`( eval $z )`
xkey=$1
if [ \( -z "${x}" \) -o \( "${x}" = "$1" \) ] ; then
# echo "$1 path not defined, trying to find it." 1>&2
RES=`which $1 2>/dev/null`
if [ $? -eq 1 ] ; then
# echo "$1 not found in PATH, trying ... " 1>&2
tmp=$PATH
shift
while [ $# -gt 0 ] ; do PATH=$PATH:$1 ; shift ; done
PATH=$PATH:${thisDir}/../bin
RES=`which $xkey 2>/dev/null`
if [ $? -eq 1 ] ; then
echo "Couldn't find $1 at all" 1>&2
return 4
fi
fi
else
if [ ! -x ${x} ] ; then
echo "The specified java path (${x}) couldn't be found" 2>&1
return 4
else
RES=${x}
fi
fi
echo $RES
return 0
}
findBinary2() {
xkey=$1
z="echo \${$2}"
x=`( eval $z )`
if [ \( -z "${x}" \) -o \( "${x}" = "$xkey" \) ] ; then
# echo "$1 path not defined, trying to find it." 1>&2
RES=`which $1 2>/dev/null`
if [ $? -eq 1 ] ; then
# echo "$1 not found in PATH, trying ... " 1>&2
tmp=$PATH
shift
while [ $# -gt 0 ] ; do PATH=$PATH:$1 ; shift ; done
PATH=$PATH:${thisDir}/../bin
RES=`which $xkey 2>/dev/null`
if [ $? -eq 1 ] ; then
echo "Couldn't find $1 at all" 1>&2
return 4
fi
fi
else
if [ ! -x ${x} ] ; then
echo "The specified java path (${x}) couldn't be found" 1>&2
return 4
else
RES=${x}
fi
fi
echo $RES
return 0
}
checkVar() {
while [ $# -ne 0 ] ; do
z="echo \${$1}"
x=`( eval $z )`
if [ -z "$x" ] ; then
echo "Fatal : Variable not defined in $setupFile : $1" >&2
return 1
fi
shift
done
}
#############################################################
#
# try to find ssh
#
checkForSsh() {
ssh=`findBinary ssh /usr/bin`
if [ $? -ne 0 ] ; then echo "Couldn't find ssh" 1>&2 ; return 4 ; fi
SSH=${ssh}
SSH_OPTIONS="-c blowfish"
export SSH_OPTIONS
#
# the ssh keys
#
if [ -z "${keyBase}" ] ; then
echo " ! The keyBase is not defined" 1>&2
echo " ! Please read ${outBaseName}Setup(.temp) for the neccessary infos !" 1>&2
return 3
fi
if [ \( ! -f "${keyBase}/server_key" \) -o \
\( ! -f "${keyBase}/host_key" \) ] ; then
echo " ! Trying to create new keys (may take awhile)"
sshkeygen=`findBinary2 ssh-keygen sshkeygen /usr/bin`
if [ $? -ne 0 ] ; then echo "Couldn't find ssh-keygen" 1>&2 ; return 4 ; fi
SSHKEYGEN=${sshkeygen}
echo " keyBase : $keyBase"
echo " ! Creating server key"
$SSHKEYGEN -b 768 -f ${keyBase}/server_key -N "" 1>/dev/null
if [ $? -ne 0 ] ; then
echo " * Keygen of server key failed" 1>&2
return 4
fi
echo " ! Creating host key"
$SSHKEYGEN -b 1024 -f ${keyBase}/host_key -N "" 1>/dev/null
if [ $? -ne 0 ] ; then
echo " * Keygen of host key failed" 1>&2
return 4
fi
fi
return 0
}
checkJava() {
java=`findBinary java /usr/lib/ibmjava/bin:/usr/lib/java/bin`
export JAVA_COMPILER
JAVA_COMPILER=NONE
JAVA=${java}
jv=`$JAVA -version 2>&1| head -n1 `
if [ $? -ne 0 ] ; then
echo "Fatal : can't find java runtime" 2>&1
return 7
fi
echo " Using java : $jv"
xx=`$JAVA -X 2>&1 | grep maxjitcode`
if [ ! -z "$xx" ] ; then JAVA_OPTIONS=-Xmaxjitcodesize0 ; fi
xx=`$JAVA 2>&1 | grep nojit`
if [ ! -z "$xx" ] ; then JAVA_OPTIONS=-nojit ; fi
export JAVA_OPTIONS
if [ -z "$JAVA_OPTIONS" ] ; then
echo " Can't find option to switch off jit"
else
echo " Using javaoptions : $JAVA_OPTIONS"
fi
export CLASSPATH
CLASSPATH=${dcacheClasses}:${jarDir}/dcache.jar:${jarDir}/dCache.jar:${jarDir}/cells.jar
#
# we have to check if we are able to find all classes
# we need. This is somehow nasty because Linux java
# returns a $?=0 even if it can't find all the classes.
#
err=`$JAVA diskCacheV111.util.Version 2>&1 1>/dev/null`
if [ "$err" = "Cells not found" ] ; then
echo " * Cell classes not found in $CLASSPATH" 1>&2
return 4
elif [ ! -z "$err" ] ; then
echo " * DiskCache classes not found in $CLASSPATH" 1>&2
return 5
fi
return 0 ;
}
getCellsLocation() {
echo $CLASSPATH | \
awk -F: '{ for( i = 1 ; i <= NF ; i++ )print $i }' |
while read p ; do
if [ \( -z "$p" \) -o \( ! -f "$p" \) ] ; then continue ; fi
n=`basename $p`
if [ "$n" = "cells.jar" ] ; then
echo $p
return 0
fi
done
return 1
}
javaClasspath() {
$JAVA -version 1>/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
echo " * Fatal : can't find java runtime" 2>&1
return 7
fi
checkVar cellClasses || exit 4
export CLASSPATH
x1=`getFull $cellClasses`
x2=`getFull $eurogateHome/../eurogate.jar`
x3=`getFull $eurogateHome/../..`
CLASSPATH=$x1:$x2:$x3
#
# we have to check if we are able to find all classes
# we need. This is somehow nasty because Linux java
# returns a $?=0 even if it can't find all the classes.
#
err=`$JAVA eurogate.misc.Version 2>&1 1>/dev/null`
if [ "$err" = "Cells not found" ] ; then
echo "Cell classes not found in $CLASSPATH" 1>&2
exit 4
elif [ ! -z "$err" ] ; then
echo "Eurogate classes not found in $CLASSPATH" 1>&2
exit 5
fi
echo $CLASSPATH
return 0 ;
}
#
findCellsInPath() {
echo ${CLASSPATH} | awk -F: '{ for(i=1;i<=NF;i++)print $i }' | \
while read pp ; do
n=`basename ${pp} 2>/dev/null`
if [ \( "${n}" = "cells.jar" \) -a \
\( -f "${pp}" \) ] ; then
echo "${pp}"
fi
done
return 0
}
checkSsh() {
# checkVar sshPort || exit 4
which $SSH >/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
echo "Please add 'ssh (versionI)' to your PATH"
return 4
fi
return 0
}
#
killproc() { # kill the named process(es)
pid=`/usr/bin/ps -e |
/usr/bin/grep $1 |
/usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
[ "$pid" != "" ] && kill $pid
}
getpids() { # kill the named process(es)
pid=`/usr/bin/ps -e |
/usr/bin/grep $1 |
/usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
echo "$pid"
return 0
}
07070100204c55000081ed000000650000000a000000014ad7322100001135000000b600010008ffffffffffffffff0000002600000000reloc/opt/d-cache/jobs/initPackage.sh #!/bin/sh
#
# $Id: initPackage.sh,v 1.7 2007-10-02 16:51:00 tigran Exp $
#
DCACHE_HOME=$1
if [ "x${DCACHE_HOME}" = "x" ];
then
# path is not defined are we in $DCACHE_HOME/jobs ?
pwd=`pwd`
DCACHE_HOME=`dirname $pwd`
fi
goUp() {
m=`pwd`
m=`basename $m`
cd ..
if [ -L $m ] ; then
m=`( ls -l $m | awk '{ print $11 }')`
m=`echo $m | awk -F/ '{ for(i=1;i" ){
print $(i+1)
break
}
}
}'
}
#
cd ${DCACHE_HOME}
if [ ! -d ./config ] ; then
echo "Can't find 'config' directory" >&2
exit 5
fi
cd ./config
#
if [ ! -f dCacheSetup ] ; then
echo "" >&2
echo " Panic : Master Setup File './config/dCacheSetup' not found" >&2
echo "" >&2
echo " You may use ./config/dCacheSetup.temp as template" >&2
echo "" >&2
exit 4
else
echo ""
echo " Checking MasterSetup ./config/dCacheSetup O.k."
fi
#
echo ""
echo " Sanning dCache batch files"
echo ""
for batchName in *.batch ; do
domainName=`echo $batchName | awk -F. '{print $1}'`
#
echo " Processing ${domainName}"
#
#
domainSetup=${domainName}Setup
if [ -L $domainSetup ] ; then
r=`targetOfLink $domainSetup`
if [ "$r" != "dCacheSetup" ] ; then
echo " $domainSetup is link to $r, but should point to dCacheSetup"
fi
elif [ -f $domainSetup ] ; then
if [ "$domainSetup" != "dCacheSetup" ] ; then
echo " !!! $domainSetup is a file, but should point to dCacheSetup"
fi
else
ln -s dCacheSetup ${domainSetup}
fi
#
goUp
cd jobs
#
if [ -L $domainName ] ; then
r=`targetOfLink $domainName`
if [ "$r" != "wrapper2.sh" ] ; then
echo " $domainName is link to $r, but should point to wrapper2.sh"
fi
elif [ -f $domainName ] ; then
echo " !!! $domainName is a file, but should point to wrapper2.sh"
else
ln -s wrapper2.sh $domainName
fi
#
#
domainLib=${domainName}.lib.sh
if [ -L $domainLib ] ; then
r=`targetOfLink ${domainLib}`
if [ "$r" != "generic.lib.sh" ] ; then
echo " $domainLib is link to $r, but should point to generic.lib.sh"
fi
elif [ -f $domainLib ] ; then
echo " !!! $domainLib is a file, but should point to generic.lib.sh"
else
ln -s generic.lib.sh ${domainLib}
fi
#
goUp
cd config
done
#
echo ""
echo ""
printf " Checking Users database .... "
if [ ! -d users ] ; then
mkdir users >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo " Failed : can't create ..../config/users"
else
mkdir users/acls users/meta users/relations >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo " Failed : can't create ..../config/users/acls|meta|relations"
else
echo " Created"
fi
fi
else
isok=0
for c in acls relations meta ; do
if [ ! -d $c ] ; then
mkdir $c >/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
echo " Failed : can't create .../config/users/$c"
isok=1
break
fi
fi
done
if [ $isok -eq 0 ] ; then echo "Ok" ; fi
fi
#
#
. ./dCacheSetup
#
printf " Checking Security .... "
if [ \( ! -f ./server_key \) -o \( ! -f ./host_key \) ] ; then
echo " server_key and/or host_key are missing "
echo ""
echo " Use following commands to generate them: "
echo " cd ../config"
echo " ssh-keygen -t rsa1 -b 768 -f ./server_key -N \"\" "
echo " ssh-keygen -t rsa1 -b 1024 -f ./host_key -N \"\" "
echo ""
else
echo "Ok"
fi
printf " Checking JVM ........ "
version=`$java -version 2>&1 | grep version | awk '{print $3}'`
x=`expr $version : "\"\(.*\)\"" | awk -F. '{ print $2 }'`
if [ "$x" -lt 3 ] ; then
echo "Failed : Insufficient Java Version : $version"
exit 4
fi
echo "Ok"
#
printf " Checking Cells ...... "
if [ ! -f "../classes/cells.jar" ] ; then
echo "Failed : cells.jar not found in ../classes"
exit 4
fi
echo "Ok"
printf " dCacheVersion ....... "
export CLASSPATH
CLASSPATH=../classes/cells.jar:../classes/dcache.jar
version=`$java diskCacheV111.util.Version 2>/dev/null`
if [ $? -ne 0 ] ; then
echo "Failed"
else
echo "Version $version"
fi
echo ""
exit 0
07070100204c51000081ed000000650000000a000000014ad7322100000daa000000b600010008ffffffffffffffff0000002000000000reloc/opt/d-cache/jobs/hsmcp.sh #!/bin/sh
#
#set -x
usage() {
echo "Usage : put|get [-si=] [-key[=value] ...]" 1>&2
}
if [ $# -lt 3 ] ; then
usage
exit 4
fi
echo "$* `date`" >>/tmp/hsm.log
#
#########################################################
#
# split the arguments into the options -= and the
# positional arguments.
#
args=""
while [ $# -gt 0 ] ; do
if expr "$1" : "-.*" >/dev/null ; then
a=`expr "$1" : "-\(.*\)" 2>/dev/null`
key=`echo "$a" | awk -F= '{print $1}' 2>/dev/null`
value=`echo "$a" | awk -F= '{for(i=2;i/dev/null`
if [ -z "$value" ] ; then a="${key}=" ; fi
eval "${key}=\"${value}\""
a="export ${key}"
eval "$a"
else
args="${args} $1"
fi
shift 1
done
if [ ! -z "$args" ] ; then
set `echo "$args" | awk '{ for(i=1;i<=NF;i++)print $i }'`
fi
if [ $# -lt 3 ] ; then
usage
exit 4
fi
command=$1
pnfsid=$2
filename=$3
#
if [ ! -z "$errorNumber" ] ; then
case "${errorNumber}" in
41) echo "No space left on device" 1>&2
exit 41 ;;
42) echo "OSM disk read IOError" 1>&2
exit 42 ;;
43) echo "OSM disk write IOError" 1>&2
exit 43 ;;
esac
echo "ErrorNumber-${errorNumber}" 1>&2
exit $errorNumber
fi
#
# end of init
#
# extract the options
# -si=
# -hsmBase=
# -waitTime=
# -pnfs=
#
if [ -z "${hsmBase}" ] ; then
echo "Need 'hsmBase' ... " 1>&2
exit 2
fi
if [ -z "${pnfs}" ] ; then
echo "Need 'pnfs' , the pnfsMountpoint " 1>&2
exit 5
fi
cat "${pnfs}/.(const)(xyzOtto9813724)" >/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
echo "Seems not to be a pnfsFilesystem : ${pnfs}" 1>&2
exit 6
fi
if [ \( -z "${si}" \) -a \( "${command}" = "put" \) ] ; then
echo "StorageInfo (-si=...) needed for 'put'" 1>&2
exit 1
fi
storageInfo=${si}
#
if [ -z ${waitTime} ] ; then waitTime=1 ; fi
#
BASE=${hsmBase}/data
if [ ! -d "$BASE" ] ; then
echo "Not a directory : ${BASE}" 1>&2
exit 5
fi
#
#
pnfsfile=$BASE/$pnfsid
if [ $command = "get" ] ; then
if [ ! -f $pnfsfile ] ; then
echo "pnfsid not found : $2" 1>&2
exit 4
fi
if [ ! -z "${hsmError}" ] ; then exit ${hsmError} ; fi
sleep ${waitTime}
cp $BASE/$pnfsid $filename 1>/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
echo "Failed : cp $BASE/$pnfsid $filename"
exit 5
fi
exit 0
elif [ $command = "put" ] ; then
if [ -f "${pnfsfile}" ] ; then
echo "pnfsid already exists : ${pnfsid}" 1>&2
exit 4
fi
touch ${BASE}/${pnfsid}
sleep ${waitTime}
cp $filename $BASE/$pnfsid 1>/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
echo "Failed : cp $filename $BASE/$pnfsid"
exit 5
fi
parentId=`cat "${pnfs}/.(parent)($pnfsid)"`
osmtId=`awk '{ if( $2 == "OSMTemplate" )print $1 }' "${pnfs}/.(ptags)($parentId)"`
store=`awk '{ if( $1 == "StoreName" )print $2 }' "${pnfs}/.(access)($osmtId)"`
osmgroupId=`awk '{ if( $2 == "sGroup" )print $1 }' "${pnfs}/.(ptags)($parentId)"`
group=`cat "${pnfs}/.(access)($osmgroupId)"`
echo "${store} ${group} bfid.${pnfsid}" >"${pnfs}/.(access)($pnfsid)(1)" 2>/dev/null ;
if [ $? -ne 0 ] ; then
echo "Couldn't write storageInfo back into pnfs" 1>&2
rm -rf $BASE/$pnfsid >/dev/null 2>/dev/null
exit 7
fi
exit 0
elif [ $command = "next" ] ; then
echo 0
else
echo "Illegal command $command" 1>&2
exit 4
fi
exit 0
07070100204c4f000081ed000000650000000a000000014ad7322100001544000000b600010008ffffffffffffffff0000002600000000reloc/opt/d-cache/jobs/generic.lib.sh #
# defined :
# ourBaseName
# setupFilePath
# thisDir
# ourHomeDir
# config
# pidDir
#
if [ ! -z "${pool}" ] ; then
poolFile=${config}/${pool}
if [ ! -f ${poolFile} ] ; then
if [ -f ${poolFile}.poollist ] ; then
poolFile=${poolFile}.poollist
else
echo "Pools file not found : ${poolFile}" 1>&2
exit 4
fi
fi
POOL="pool=${poolFile}"
x=`echo ${pool} | awk -F. '{print $1}'`
domainName=${x}Domain
elif [ -f ${config}/${ourBaseName}.poollist ] ; then
POOL="pool=${poolFile}"
domainName=${ourBaseName}Domain
else
domainName=${ourBaseName}Domain
fi
if [ ! -z "${domain}" ] ; then
domainName=${domain}
base=`expr "${domainName}" : "\(.*\)Domain"`
if [ -z "$base" ] ; then base=${domainName} ; fi
fi
if [ -z "${logfile}" ] ; then
if [ -z "${logArea}" ] ; then
logfile=/tmp/${domainName}.log
else
logfile=${logArea}/${domainName}.log
fi
fi
touch ${logfile} 2>/dev/null
if [ $? -ne 0 ] ; then
echo "Could not write to logfile ${logfile}; using /dev/null" 1>&2
logfile=/dev/null
fi
stopFile="/tmp/.dcache-stop.${domainName}"
pidFile="${pidDir}/dcache.${domainName}.pid"
#
#
procStop() {
if [ ! -f ${pidFile} ] ; then
echo "Cannot find appropriate pid file (${pidFile})" 1>&2
exit 0
fi
x=`cat ${pidFile}`
if [ -z "$x" ] ; then
echo "Pid file (${pidFile}) does not contain valid PID" 1>&2
exit 1
fi
touch "$stopFile" 2>/dev/null
kill -TERM $x 1>/dev/null 2>/dev/null
printf "Stopping ${domainName} (pid=`cat ${pidFile}`) "
for c in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
kill -0 $x 1>/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
rm -f $pidFile
echo "Done"
exit 0
fi
printf "$c "
sleep 1
if [ $c -eq 9 ] ; then
kill -9 $x
fi
done
echo "Giving up : ${domainName} might still be running" 1>&2
exit 4
}
procStart() {
if [ -f ${pidFile} ] ; then
x=`cat ${pidFile}`
kill -0 $x 1>/dev/null 2>/dev/null
if [ $? -eq 0 ] ; then
echo "${domainName} might still be running" 1>&2
exit 4
fi
fi
touch ${pidFile} 2>/dev/null
if [ $? -ne 0 ] ; then
echo "Could not use pid file ${pidFile}, cannot startup !!" 1>&2
exit 4
fi
if [ ! -z "${telnetPort}" ] ; then
TELNET_PORT="-telnet ${telnetPort}"
elif [ ! -z "${telnet}" ] ; then
TELNET_PORT="-telnet ${telnet}"
fi
if [ ! -z "${batch}" ] ; then
batchFile=${batch}
else
batchFile=${config}/${ourBaseName}.batch
fi
if [ -f "$batchFile" ] ; then
BATCH_FILE="-batch ${batchFile}"
else
echo "Batch file does not exist: ${batchFile}, cannot continue ..." 1>&2
exit 5
fi
if [ ! -z "${debug}" ] ; then DEBUG="-debug" ; fi
CLASSPATH="${classpath}:${thisDir}/../..:${thisDir}/../classes/cells.jar:${thisDir}/../classes/dcache.jar:${externalLibsClassPath}"
LD_LIBRARY_PATH="${librarypath}"
export LD_LIBRARY_PATH
# use local jre ( ${ourHomeDir}/jre if it exist. This will allows to
# us to package required jre with dCache.
if [ -x "${ourHomeDir}/jre/bin/java" ]
then
java="${ourHomeDir}/jre/bin/java"
fi
# we need to activate the globus gsi key pair caching for those installations that
# continue to use dCacheSetup where -Dorg.globus.jglobus.delegation.cache.lifetime is not
# specified
if echo "${java_options}" | grep "\-Dorg\.globus\.jglobus\.delegation\.cache\.lifetime=" 2>&1 >/dev/null ; [ $? -ne 0 ]; then
java_options="${java_options} \
-Dorg.globus.jglobus.delegation.cache.lifetime=30000"
fi
# Add a java option for an endorsed directory
java_options="${java_options} \
-cp ${CLASSPATH} \
-Djava.endorsed.dirs=${ourHomeDir}/classes/endorsed \
dmg.cells.services.Domain ${domainName} $TELNET_PORT \
-param setupFile=${setupFilePath} \
ourHomeDir=${ourHomeDir} \
ourName=${ourBaseName} \
${POOL} \
$BATCH_FILE $DEBUG"
#
# echo "(Using classpath : $CLASSPATH )"
# echo "(Using librarypath : $LD_LIBRARY_PATH )"
# echo "${java} ${java_options}"
[ "${logMode}" = "new" ] && mv -f "${logfile}" "${logfile}.old"
if [ -f "${config}/delay" ] ; then
delay=`cat "${config}/delay" 2>/dev/null`
else
delay=10
fi
rm -f "$stopFile"
/bin/sh ${ourHomeDir}/share/lib/daemon ${user:+-u} ${user:+"$user"} -r "${stopFile}" -d "${delay}" -f -p "${pidFile}" -o "${logfile}" "${java}" ${java_options}
printf "Starting ${domainName} "
for c in 6 5 4 3 2 1 0 ; do
latestPid=`cat ${pidFile} 2>/dev/null`
kill -0 ${latestPid} 1>/dev/null 2>/dev/null
if [ $? -eq 0 ] ; then
break
fi
sleep 1
printf "$c "
done
latestPid=`cat ${pidFile} 2>/dev/null`
kill -0 ${latestPid} 1>/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
echo " failed"
grep PANIC "${logfile}"
exit 4
else
echo "Done (pid=${latestPid})"
fi
exit 0
}
procHelp() {
echo "Usage : ${ourBaseName} start|stop"
exit 4
}
procSwitch() {
case "$1" in
*start) shift 1 ; procStart $* ;;
*stop) procStop ;;
*) procHelp $*
;;
esac
}
07070100204c57000081ed000000650000000a000000014ad7322100001730000000b600010008ffffffffffffffff0000002300000000reloc/opt/d-cache/jobs/wrapper2.sh #!/bin/sh
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#
# were are we ? who are we ?
#
#
if [ -z "$initDone" ] ; then
#echo "DEBUG : running "
initDone=true
irixFix=$0
#
#
makeRealPath() {
XXAWK=awk
tp=`uname -s`
if [ $tp = "SunOS" ] ; then XXAWK=nawk ; fi
echo $1 | $XXAWK '{
split($1,a,"/")
res=0
for(n=1; n in a ; n++){
if( ( a[n] == "." ) || ( a[n] == "" ) ){
}else if( a[n] == ".." ){
res--
}else{
st[res++]= "/" a[n]
}
}
for( n = 0 ; n < res ; n++ )
m=m st[n] ;
print m
}'
return 0
}
weAreSolaris() {
#----------------
PRG="`/usr/bin/which \"$0\"`" >/dev/null 2>&1
J_HOME="`/usr/bin/dirname \"$PRG\"`"
progname=`/usr/bin/basename "$0"`
while [ -h "$PRG" ]; do
ls=`/usr/bin/ls -ld "$PRG"`
link=`/usr/bin/expr "$ls" : '^.*-> \(.*\)$'`
if /usr/bin/expr "$link" : '^/' > /dev/null; then
prg="$link"
else
prg="`/usr/bin/dirname \"$PRG\"`/$link"
fi
PRG=`which "$prg"` >/dev/null 2>&1
J_HOME=`/usr/bin/dirname "$PRG"`
done
thisDir=$J_HOME
weAre=$progname
return 0
}
#--------------------------------------------------------------
#
weAreLinux() {
#--------------
#
# get our location
#
PRG=`which $0` >/dev/null 2>&1
while [ -L "$PRG" ]
do
newprg=`expr "\`/bin/ls -l "$PRG"\`" : ".*$PRG -> \(.*\)"`
expr "$newprg" : / >/dev/null || newprg="`dirname $PRG`/$newprg"
PRG="$newprg"
done
#
thisDir=`dirname $PRG`
weAre=`basename $0`
return 0
}
#
#--------------------------------------------------------------
weAreIrix() {
PRG=`whence $0 2>/dev/null`
while [ -L "$PRG" ]
do
newprg=`expr "\`/bin/ls -l "$PRG"\`" : ".*$PRG -> \(.*\)"`
expr "$newprg" : "\/" >/dev/null || newprg="`dirname $PRG`/$newprg"
PRG="$newprg"
done
#
thisDir=`dirname $PRG`
weAre=`basename $irixFix`
return 0
}
os=`uname -s 2>/dev/null` || \
( echo "Can\'t determine OS Type" 1>&2 ; exit 4 ) || exit $?
ECHO=echo
if [ "$os" = "SunOS" ] ; then
weAreSolaris
ECHO=/usr/ucb/echo
elif [ "$os" = "Linux" ] ; then
weAreLinux
elif [ "$os" = "IRIX64" ] ; then
weAreIrix
elif [ "$os" = "Darwin" ] ; then
weAreLinux
else
echo "Sorry, no support for $os" 1>&2
exit 3
fi
#
expr ${thisDir} : "/.*" >/dev/null || thisDir=`pwd`/${thisDir}
bins=${thisDir}/../bin
jobs=$thisDir
info=${thisDir}/../info
ourHomeDir=${thisDir}/..
config=${thisDir}/../config
pidDir=/var/run
#
# run some needful things
#
if [ -z "$needFulThings" ] ; then
needFulThings=loaded
export needFulThings
if [ ! -f "$jobs/needFulThings.sh" ] ; then
$ECHO "Panic, not found : $jobs/needFulThings.sh"
exit 4
fi
. $jobs/needFulThings.sh
fi
#
# load external claspath
#
if [ -r ${ourHomeDir}/classes/extern.classpath ]
then
. ${ourHomeDir}/classes/extern.classpath
fi
#
# try to find a setupfile
#
ourBaseName=`echo ${weAre} | awk -F. '{ printf "%s",$1 }' 2>/dev/null`
if [ -z "$setup" ] ; then
setupFileName=${ourBaseName}Setup
else
setupFileName=${setup}
fi
if [ -z "${setupFileName}" ] ; then
echo "Cannot determine setupFileName" 1>&2
exit 4
fi
if [ -f ${config}/${setupFileName} ] ; then
setupFilePath=${config}/${setupFileName}
elif [ -f ${config}/${setupFileName}-`uname -n` ] ; then
setupFilePath=${config}/${setupFileName}-`uname -n`
elif [ -f /etc/${setupFileName} ] ; then
setupFilePath=/etc/${setupFileName}
else
echo "Setupfile <${setupFileName}> not found in (/etc/.. ${config}/.. " 1>&2
exit 4
fi
setupFilePath=`getFull $setupFilePath`
setupFilePath=`makeRealPath $setupFilePath`
ourHomeDir=`makeRealPath ${thisDir}/..`
logArea="${ourHomeDir}/log"
# echo "Using setupfile : $setupFilePath"
# echo "ourHomeDir : ${ourHomeDir}"
. ${setupFilePath}
# Sanitycheck for serviceLocatorHost
if [ -z "${serviceLocatorHost}" ] || [ "${serviceLocatorHost}" = "SERVER" ]; then
echo "serviceLocatorHost in ${setupFilePath} has to be set."
exit 4
fi
#
#
# split the arguments into the options -= and the
# positional arguments.
#
args=""
opts=""
while [ $# -gt 0 ] ; do
if expr "$1" : "-.*" >/dev/null ; then
a=`expr "$1" : "-\(.*\)" 2>/dev/null`
key=`echo "$a" | awk -F= '{print $1}' 2>/dev/null`
value=`echo "$a" | awk -F= '{print $2 }' 2>/dev/null`
if [ -z "$value" ] ; then a="${key}=" ; fi
eval "$a"
a="export ${key}"
eval "$a"
opts="${opts} $1"
else
args="${args} $1"
fi
shift 1
done
#
if [ ! -z "$args" ] ; then
set `echo "$args" | awk '{ for(i=1;i<=NF;i++)print $i }'`
fi
#
# now, were we have the config variables and the command line arguments
# we check for local exceptions.
#
if [ -f ${jobs}/dcache.local.sh ] ; then
. ${jobs}/dcache.local.sh
fi
SITE_LOCAL=${jobs}/dcache.local.run.sh
if [ -f ${SITE_LOCAL} ] ; then
if [ ! -x ${SITE_LOCAL} ] ; then
echo "Site local script is not executable ${SITE_LOCAL}" >&2
exit 2
fi
${SITE_LOCAL} $*
rc=$?
if [ $rc -ne 0 ] ; then
echo "Site local script (${SITE_LOCAL}) failed : errno = $rc"
exit $rc
fi
fi
#
# end of init
#
fi
lib=${ourBaseName}.lib.sh
if [ ! -f ${jobs}/${lib} ] ; then
echo "Library not found : $lib"
exit 4
fi
. ${jobs}/${lib}
x="procSwitch $*"
eval $x
07070100204c50000081ed000000650000000a000000014ad7322100000c35000000b600010008ffffffffffffffff0000002000000000reloc/opt/d-cache/jobs/hsmcp.rb #!/usr/bin/env ruby
require 'fileutils'
require 'uri'
def usage
STDERR.puts "Usage : put -hsmBase= -hsmInstace= -si= [-key[=value] ...]"
STDERR.puts " get -hsmBase= -uri= [-key[=value] ...]"
STDERR.puts " remove -uri= -hsmBase= [-key[=value] ...]"
exit 4
end
#
# Parse options
#
options = Hash.new
args = Array.new
ARGV.each do |arg|
case arg
when /-(\w+)=(\S+)/
options[$1] = $2
else
args << arg
end
end
#
# Parse arguments
#
if args.length < 1
usage
end
command=args[0]
case command
when "get","put","next"
if args.length != 3
usage
end
pnfsid=args[1]
file=args[2]
end
#
# Check options
#
if options.has_key? "errorNumber"
error = options["errorNumber"]
case error
when 41
STDERR.puts "No space left on device"
when 42
STDERR.puts "OSM disk read IOError"
when 43
STDERR.puts "OSM disk write IOError"
else
STDERR.puts "ErrorNumber-#{error}"
end
exit error.to_i
end
if !options.has_key? "hsmBase"
STDERR.puts "Need 'hsmBase' ... "
exit 2
end
if options.has_key? "waitTime"
waitTime = Integer(options["waitTime"])
else
waitTime = 1
end
base=options["hsmBase"]
if !FileTest.directory? base
STDERR.puts "Not a directory : #{base}"
exit 5
end
#
# Interpret command
#
case command
when "get"
hsmFile="#{base}/#{pnfsid}"
if ! FileTest.file? hsmFile
STDERR.puts "pnfsid not found: #{pnfsid}"
exit 4
end
if options.has_key? "hsmError"
exit options["hsmError"]
end
sleep waitTime
FileUtils.cp(hsmFile, file)
when "put"
hsmFile="#{base}/#{pnfsid}"
if FileTest.file? hsmFile
STDERR.puts "pnfsid already exists, flushing anyway: #{pnfsid}"
end
if !options.has_key? "hsmInstance"
STDERR.puts "Need -hsmInstance for put"
exit 1
end
instance=options["hsmInstance"]
if !options.has_key? "si"
STDERR.puts "Need -si for put"
exit 1
end
si = Hash.new
options["si"].split(";").each do |s|
if s =~ /(\w+)=(.*)/
si[$1]=$2
end
end
sClass = si["sClass"]
if sClass =~ /(\w+):(\w+)/
store = $1
group = $2
else
STDERR.puts "Invalid storage class: #{sClass}"
exit 6
end
FileUtils.cp(file, hsmFile)
sleep waitTime
puts "hsm://#{instance}?store=#{store}&group=#{group}&bfid=#{pnfsid}"
when "remove"
if !options.has_key? "uri"
STDERR.puts "Need -uri for remove"
exit 2
end
uri = URI.parse(options["uri"])
query = Hash.new
uri.query.split("&").each do |s|
if s =~ /(\w+)=(.*)/
query[$1]=$2
end
end
if !query.has_key? "bfid"
STDERR.puts "bfid missing from URI: " + uri
exit 6
end
sleep waitTime
pnfsid = query["bfid"]
hsmFile="#{base}/#{pnfsid}"
# Notice that this is not an error condition
if !FileTest.file? hsmFile
STDERR.puts hsmFile + " not found"
exit 0
end
begin
FileUtils.rm(hsmFile)
rescue
STDERR.puts "Failed to delete " + hsmFile
exot 4
end
when "next"
else
STDERR.puts "Illegal command $command"
exit 4
end
07070100204c49000041ed000000650000000a000000024ad7323800000000000000b600010008ffffffffffffffff0000001a00000000reloc/opt/d-cache/install 07070100204c4b000081ed000000650000000a000000014ad73232000068e0000000b600010008ffffffffffffffff0000002500000000reloc/opt/d-cache/install/install.sh #!/bin/bash
# Set up the preset values before we get to the command line
# Note these values can be changed with the command line
# Default Log level
# Standard logging levels are
# ABORT ERROR WARNING INFO DEBUG
loglevel=14
# Default Log File
logfile=""
usage()
{
echo "dCache install script"
echo ""
echo "-h --help Show this help"
echo "-p PATH --prefix PATH Set install prefix (by default '/opt/dcache')"
echo "-l LEVEL --loglevel LEVEL Set loglevel (by default '15')"
echo " debug level ABORT=45"
echo " debug level ERROR=35"
echo " debug level WARNING=25"
echo " debug level INFO=15"
echo " debug level DEBUG=5"
}
logmessage()
{
local ThisLogLevel
local ThisPrefix
let ThisLogLevel=$1
if [ "$1" == "NONE" ] ; then
ThisLogLevel=55
fi
if [ "$1" == "ABORT" ] ; then
ThisLogLevel=45
fi
if [ "$1" == "ERROR" ] ; then
ThisLogLevel=35
fi
if [ "$1" == "WARNING" ] ; then
ThisLogLevel=25
fi
if [ "$1" == "INFO" ] ; then
ThisLogLevel=15
fi
if [ "$1" == "DEBUG" ] ; then
ThisLogLevel=5
fi
if [ $ThisLogLevel -lt 60 ] ; then
ThisPrefix="NONE:"
fi
if [ $ThisLogLevel -lt 50 ] ; then
ThisPrefix="ABORT:"
fi
if [ $ThisLogLevel -lt 40 ] ; then
ThisPrefix="ERROR:"
fi
if [ $ThisLogLevel -lt 30 ] ; then
ThisPrefix="WARNING:"
fi
if [ $ThisLogLevel -lt 20 ] ; then
ThisPrefix="INFO:"
fi
if [ $ThisLogLevel -lt 10 ] ; then
ThisPrefix="DEBUG:"
fi
if [ $# -ge 1 ]
then
shift 1
if [ ${ThisLogLevel} -gt ${loglevel} ]
then
if [ $# -eq 1 ]; then
echo ${ThisPrefix}$*
if [ "${logfile}" != "" ]
then
echo ${ThisPrefix}$* >> ${logfile}
fi
fi
if [ $# -eq 0 ]; then
while read logline
do
echo ${ThisPrefix}${logline}
if [ "${logfile}" != "" ]
then
echo ${ThisPrefix}${logline} >> ${logfile}
fi
done
fi
fi
fi
}
check_shell()
{
if [ "$BASH_VERSION" = "" ] ; then
logmessage ERROR "bash was not detected script exiting."
exit 1
fi
}
check_os()
{
local osname
RET="Unknown"
osname=`uname`
if [ "$osname" = "Linux" ] ; then
RET=Linux
fi
if [ "$osname" = "Darwin" ] ; then
RET=Darwin
fi
if [ "$osname" = "SunOS" ] ; then
RET=SunOS
fi
}
checkReadlinkf()
{
if [ ! "$hasReadlinkf" ] ; then
readlink -f . > /dev/null 2>&1
hasReadlinkf=$?
fi
return $hasReadlinkf
}
# Get the canonical path of $1. Only returns a truely canonical path
# if readlink is available. Otherwise an absolute path which does not
# end in a symlink is returned.
getCanonicalPath() # $1 = path
{
local link
link="$1"
if checkReadlinkf ; then
RET="$(readlink -f $link)"
else
RET="$(cd $(dirname $link); pwd)/$(basename $link)"
while [ -h "$RET" ]; do
link="$(ls -ld $RET | sed 's/.*-> //')"
if [ -z "${link##/*}" ]; then
RET="${link}"
else
link="$(dirname $RET)/${link}"
RET="$(cd $(dirname $link); pwd)/$(basename $link)"
fi
done
fi
}
check_install()
{
if [ ! -r ${DCACHE_HOME}/etc/node_config ]; then
logmessage ABORT "${DCACHE_HOME}/etc/node_config missing."
logmessage INFO "Copy ${DCACHE_HOME}/etc/node_config.template to ${DCACHE_HOME}/etc/node_config and customize it before running the install script. Exiting."
exit 4
fi
}
shortname_os() {
case `uname` in
Linux)
echo `hostname -s`
;;
SunOS)
echo `uname -n`
;;
Darwin)
echo `hostname -s`
;;
esac
}
domainname_os() {
case `uname` in
Linux)
echo `hostname -d`
;;
SunOS)
echo `/usr/lib/mail//sh/check-hostname |cut -d" " -f7 | awk -F. '{ for( i=2; i <= NF; i++){ printf("%s",$i); if( i ${pnfsMountPoint} which is used by the GridFTP door."
ln -s ${pnfsMountPoint} ${NODE_CONFIG_PNFS_ROOT}/ftpBase
else
local ftpBaseLinkedTo
ftpBaseLinkedTo=`find ${NODE_CONFIG_PNFS_ROOT}/ftpBase -type l | xargs readlink`
logmessage INFO "ftpBaseLinkedTo=$ftpBaseLinkedTo"
logmessage INFO "pnfsMountPoint=${pnfsMountPoint}"
if [ "${ftpBaseLinkedTo}" == "${pnfsMountPoint}" ] ; then
logmessage INFO "Link ${NODE_CONFIG_PNFS_ROOT}/ftpBase --> ${pnfsMountPoint} already there."
else
logmessage ABORT "Link ${NODE_CONFIG_PNFS_ROOT}/ftpBase --> ${pnfsMountPoint} cannot be created. Needed by the GridFTP door."
logmessage ERROR "Please move ${NODE_CONFIG_PNFS_ROOT}/ftpBase and run this script again. Exiting."
exit 1
fi
fi
if ! grep "^ftpBase=${NODE_CONFIG_PNFS_ROOT}/ftpBase" ${DCACHE_HOME}/config/dCacheSetup 2>/dev/null >/dev/null ; then
logmessage WARNING "The file ${DCACHE_HOME}/config/dCacheSetup does not contain:"
logmessage WARNING " ftpBase=${NODE_CONFIG_PNFS_ROOT}/ftpBase"
logmessage WARNING "Make shure it is set correctly before you start dCache."
fi
if mount | grep pnfs 2>/dev/null >/dev/null ; then
logmessage WARNING "A pnfs export is already mounted. The GridFTP door will only use the"
logmessage WARNING "mount at ${pnfsMountPoint} which will be mounted by the start-up script."
logmessage WARNING "You might want to remove any mounts not needed anymore."
fi
logmessage DEBUG "dcacheInstallPnfsMountPointClient.stop"
}
dcacheInstallPnfsMountPointServer()
{
logmessage DEBUG "dcacheInstallPnfsMountPointServer.start"
local pnfsMountPoint
local serverIdLinkedTo
local ftpBaseLinkedTo
dcacheInstallGetNameSpaceServer
pnfsServer=$RET
# Checking and creating mountpoint and link
#
if [ -z "${pnfsServer}" ] ; then
logmessage ERROR "Unable to determine name space server. Install has failed."
exit 1
fi
pnfsMountPoint=${NODE_CONFIG_PNFS_ROOT}/fs
# if not a directory
if [ ! -d "${pnfsMountPoint}" ]; then
# if exists directory
if [ -e "${pnfsMountPoint}" ] ; then
logmessage ERROR "The file ${pnfsMountPoint} is in the way. Please move it out of the way"
logmessage ERROR "and call me again. Exiting."
exit 1
else
logmessage INFO "Creating pnfs mount point (${pnfsMountPoint})"
mkdir -p ${pnfsMountPoint}
fi
fi
logmessage INFO "Will be mounted to ${pnfsServer}:/fs by dcache start-up script."
cd ${NODE_CONFIG_PNFS_ROOT}
# if file is not a symbolic link
if [ ! -L "${SERVER_ID}" ]; then
# if file exists
if [ -e "${SERVER_ID}" ] ; then
logmessage ERROR "The file/directory ${NODE_CONFIG_PNFS_ROOT}/${SERVER_ID} is in the way. Please move it out"
logmessage ERROR "of the way and call me again. Exiting."
else
logmessage INFO "Creating link ${NODE_CONFIG_PNFS_ROOT}/${SERVER_ID} --> ${pnfsMountPoint}/usr/"
ln -s fs/usr ${SERVER_ID}
echo MADE THE SYMBOLIC LINK
fi
fi
cd ${NODE_CONFIG_PNFS_ROOT}
if [ ! -L "${SERVER_ID}" -a ! -e "${SERVER_ID}" ] ; then
logmessage INFO "Creating link ${NODE_CONFIG_PNFS_ROOT}/${SERVER_ID} --> ${NODE_CONFIG_PNFS_ROOT}/fs/usr."
ln -s fs/usr ${SERVER_ID}
else
serverIdLinkedTo=`find ${NODE_CONFIG_PNFS_ROOT}/${SERVER_ID} -type l | xargs readlink `
if [ "${serverIdLinkedTo}" = "fs/usr" -o "${serverIdLinkedTo}" = "${NODE_CONFIG_PNFS_ROOT}/fs/usr" ] ; then
logmessage INFO "Link ${NODE_CONFIG_PNFS_ROOT}/${SERVER_ID} --> ${NODE_CONFIG_PNFS_ROOT}/fs/usr already there."
else
logmessage ERROR "[ERROR] Link ${NODE_CONFIG_PNFS_ROOT}/${SERVER_ID} --> ${NODE_CONFIG_PNFS_ROOT}/fs/usr cannot be created."
logmessage ERROR "Please move ${NODE_CONFIG_PNFS_ROOT}/${SERVER_ID} and run me again. Exiting."
exit 1
fi
fi
cd ${NODE_CONFIG_PNFS_ROOT}
if [ ! -L ${NODE_CONFIG_PNFS_ROOT}/ftpBase -a ! -e ${NODE_CONFIG_PNFS_ROOT}/ftpBase ] ; then
logmessage INFO "[INFO] Creating link ${NODE_CONFIG_PNFS_ROOT}/ftpBase --> ${pnfsMountPoint} which is used by the GridFTP door."
ln -s ${pnfsMountPoint} ${NODE_CONFIG_PNFS_ROOT}/ftpBase
else
ftpBaseLinkedTo=`ls -l ${NODE_CONFIG_PNFS_ROOT}/ftpBase | awk '{print $NF}'`
if [ "${ftpBaseLinkedTo}" = "${pnfsMountPoint}" ] ; then
logmessage INFO "Link ${NODE_CONFIG_PNFS_ROOT}/ftpBase --> ${pnfsMountPoint} already there."
else
logmessage ERROR "Link ${NODE_CONFIG_PNFS_ROOT}/ftpBase --> ${pnfsMountPoint} cannot be created. and is needed by the GridFTP door."
logmessage ERROR "Please move ${NODE_CONFIG_PNFS_ROOT}/ftpBase and run me again. Exiting."
exit 1
fi
fi
# Checking for existance of rpcinfo
#
which rpcinfo 2>&1 > /dev/null
RC=$?
if [ ${RC} -ne 0 ] ; then
logmessage ERROR "rpcinfo is not on the path"
exit 1
fi
# Checking and maybe starting pnfs server
#
RETVAL=0
rpcinfo -u localhost 100003 >/dev/null 2>&1
RETVAL=$?
if [ ${RETVAL} -eq 1 ]; then
if [ ! -x ${NODE_CONFIG_PNFS_INSTALL_DIR}/tools/pnfs.server ]; then
logmessage ERROR "PNFS not installed but needed for dCache admin node installation. Exiting."
exit 1
fi
logmessage INFO "PNFS is not running. It is needed to prepare dCache. ... "
yesno="${NODE_CONFIG_PNFS_START}"
if [ \( "${yesno}" = "n" \) -o \( "${yesno}" = "no" \) ] ; then
logmessage ERROR "Not allowed to start it. Set PNFS_START in etc/node_config to 'yes' or start by hand. Exiting."
exit 1
elif [ \( "${yesno}" = "y" \) -o \( "${yesno}" = "yes" \) ] ; then
logmessage INFO "Trying to start it now:"
${NODE_CONFIG_PNFS_INSTALL_DIR}/tools/pnfs.server start
fi
fi
# Checking pnfs mount and possibly mounting
#
cp=`df ${pnfsMountPoint} 2>/dev/null | grep "${pnfsMountPoint}" | awk '{print $2}'`
if [ -z ${cp} ]; then
logmessage INFO "${pnfsMountPoint} mount point exists, but is not mounted - going to mount it now ..."
mount -o intr,rw,noac,hard,nfsvers=2 ${pnfsServer}:/fs ${pnfsMountPoint}
fi
cp=`df ${pnfsMountPoint} 2>/dev/null | grep "${pnfsMountPoint}" | awk '{print $2}'`
if [ -z $cp ]; then
logmessage ERROR "Was not able to mount ${pnfsServer}:/fs to ${pnfsMountPoint}. Exiting."
exit 1
fi
dcacheNameServerIs
dcacheNameServerIsRc=$?
if [ "${dcacheNameServerIsRc}" == "1" ]
then
dcacheInstallPnfsConfigCheck
else
logmessage DEBUG "This node is not a name space server."
fi
logmessage DEBUG "dcacheInstallPnfsMountPointServer.stop"
}
dcacheInstallPnfsMountPoints()
{
logmessage DEBUG "dcacheInstallPnfsMountPoints.start"
# Creating /pnfs/fs and Symbolic Link /pnfs/fs/usr to /pnfs/
# (e.g. /pnfs/fnal.gov) for GridFTP
if contains pnfsDomain $DOMAINS; then
dcacheInstallPnfsMountPointServer
elif isNameSpaceMountNeeded $DOMAINS; then
dcacheInstallPnfsMountPointClient
fi
logmessage DEBUG "dcacheInstallPnfsMountPoints.stop"
}
dcacheInstallChimeraMountPointServer()
{
local pnfsServer
local localhostName
local tryToMount
local cmdline
local counter
local mountrc
if [ ! -d "${NODE_CONFIG_PNFS_ROOT}" ] ; then
mkdir "${NODE_CONFIG_PNFS_ROOT}"
fi
dcacheInstallGetNameSpaceServer
pnfsServer=$RET
localhostName=`fqdn_os`
tryToMount=1
if [ -z "${pnfsServer}" ] ; then
logmessage ERROR "Unable to determine Name Server node exiting as an error."
exit 1
fi
if [ "$pnfsServer" == "$localhostName" ] ; then
pnfsServer="localhost"
fi
if [ -n "$(mount | grep "${pnfsServer}" )" ] ; then
tryToMount=0
fi
if [ -n "$(mount | grep "/pnfs" )" ] ; then
tryToMount=0
fi
if [ "${tryToMount}" == "0" ] ; then
logmessage INFO "Already Mounted ${pnfsServer}"
else
cmdline="mount -o intr,rw,hard ${pnfsServer}:/pnfs /pnfs"
counter=1
logmessage INFO "Need to mount ${pnfsServer}"
while [ "${tryToMount}" == "1" ] ; do
$cmdline
mountrc=$?
if [ "${mountrc}" == "0" ] ; then
logmessage INFO "Successflly mounted Chimera running $cmdline"
tryToMount=0
else
let counter="$counter + 1"
if [ "$counter" == "12" ] ; then
logmessage ERROR "Failed running $cmdline and giving up"
tryToMount=0
else
logmessage INFO "Trying to mount Chimera failed, will retry."
logmessage DEBUG "Using command: $cmdline"
fi
fi
sleep 1
done
fi
}
dcacheInstallChimeraMountPoints()
{
logmessage DEBUG "dcacheInstallChimeraMountPoints.start"
# Creating /pnfs/fs and Symbolic Link /pnfs/fs/usr to /pnfs/
# (e.g. /pnfs/fnal.gov) for GridFTP
if contains chimeraDomain $DOMAINS; then
/etc/init.d/portmap restart
dcacheInstallChimeraMountPointServer
elif isNameSpaceMountNeeded $DOMAINS; then
dcacheInstallChimeraMountPointServer
fi
logmessage DEBUG "dcacheInstallChimeraMountPoints.stop"
}
dcacheInstallMountPoints()
{
logmessage DEBUG "dcacheInstallMountPoints.start"
dcacheInstallGetNameSpaceType
nameServerFormat=${RET}
if [ "${nameServerFormat}" == "pnfs" ]
then
dcacheInstallPnfsMountPoints
fi
if [ "${nameServerFormat}" == "chimera" ]
then
dcacheInstallChimeraMountPoints
fi
logmessage DEBUG "dcacheInstallMountPoints.stop"
}
dcacheInstallPnfsConfigCheck()
{
logmessage DEBUG "dcacheInstallPnfsConfigCheck.start"
# Checking if pnfs config exists
#
local fqHostname
local WRITING_PNFS
local dCapPort
local yesno
local serverRoot
fqHostname=`fqdn_os`
getServiceConfigurationValue dcap dCapPort
dCapPort=$RET
logmessage INFO "Checking on a possibly existing dCache/PNFS configuration ..."
if [ -f ${NODE_CONFIG_PNFS_ROOT}/fs/admin/etc/config/serverRoot ]; then
WRITING_PNFS=no
else
WRITING_PNFS=yes
fi
logmessage DEBUG "WRITING_PNFS=$WRITING_PNFS"
yesno="${NODE_CONFIG_PNFS_OVERWRITE}"
if [ \( "${yesno}" = "n" -o "${yesno}" = "no" \) -a "${WRITING_PNFS}" = "no" ] ; then
logmessage INFO "Found an existing dCache/PNFS configuration!"
logmessage INFO "Not allowed to overwrite existing PNFS configuration."
elif [ \( "${yesno}" = "y" -o "${yesno}" = "yes" \) -a "${WRITING_PNFS}" = "no" ] ; then
logmessage INFO "Found an existing dCache/PNFS configuration!"
logmessage WARNING "Overwriting existing dCache/PNFS configuration..."
WRITING_PNFS=yes
sleep 5
fi
# Writing new pnfs configuration
#
if [ "${WRITING_PNFS}" = "yes" ] ; then
cd ${NODE_CONFIG_PNFS_ROOT}/fs
serverRoot=`cat ".(id)(usr)"`
logmessage DEBUG serverRoot=$serverRoot
# Writing Wormhole information
#
logmessage DEBUG "Changing directory to ${NODE_CONFIG_PNFS_ROOT}/fs/admin/etc/config"
cd ${NODE_CONFIG_PNFS_ROOT}/fs/admin/etc/config
echo "${fqHostname}" > ./serverName
echo "${SERVER_ID}" >./serverId
echo "$serverRoot ." > ./serverRoot
touch ".(fset)(serverName)(io)(on)"
touch ".(fset)(serverId)(io)(on)"
touch ".(fset)(serverRoot)(io)(on)"
echo "${fqHostname}" > ./serverName
echo "${SERVER_ID}" >./serverId
echo "$serverRoot ." > ./serverRoot
mkdir -p dCache
cd dCache
echo "${fqHostname}:${dCapPort}" > ./dcache.conf
touch ".(fset)(dcache.conf)(io)(on)"
echo "${fqHostname}:${dCapPort}" > ./dcache.conf
# Configure directory tags
#
cd ${NODE_CONFIG_PNFS_ROOT}/fs/usr/data
echo "StoreName myStore" > ".(tag)(OSMTemplate)"
echo "STRING" > ".(tag)(sGroup)"
fi
dcacheInstallPnfsMount
logmessage DEBUG "dcacheInstallPnfsConfigCheck.stop"
}
dcacheInstallPnfsMount()
{
logmessage DEBUG "dcacheInstallPnfsMount.start"
# ---- Mount point for doors
# This is done, even if PNFS_OVERWRITE=no in order to
# cleanly upgrade
#
cd ${NODE_CONFIG_PNFS_ROOT}/fs/admin/etc/exports
if ! grep '^/pnfsdoors' * >/dev/null 2>/dev/null ; then
logmessage INFO "Configuring pnfs export '/pnfsdoors' (needed from version 1.6.6 on)"
logmessage INFO "mountable by world."
echo '/pnfsdoors /0/root/fs/usr/ 30 nooptions' >> '0.0.0.0..0.0.0.0'
else
logmessage INFO "There already are pnfs exports '/pnfsdoors' in"
logmessage INFO " /pnfs/fs/admin/etc/exports. The GridFTP doors need access to it."
if grep '^/pnfsdoors' * | grep -v ':/pnfsdoors[^[:graph:]]\+/0/root/fs/usr/[^[:graph:]]\+' >/dev/null 2>/dev/null ; then
logmessage WARNING " Make shure they all point to '/0/root/fs/usr/'! The GridFTP doors which"
logmessage WARNING " are not on the admin node will mount these from version 1.6.6 on."
fi
fi
logmessage INFO "You may restrict access to this export to the GridFTP doors which"
logmessage INFO "are not on the admin node. See the documentation."
logmessage DEBUG "dcacheInstallPnfsMount.stop"
}
dcacheInstallPnfs()
{
dcacheInstallPnfsMountPoints
}
dcacheGetSshHostKey(){
if [ $(uname) = "Darwin" ] ; then
SSH_HOST_KEY="/etc/ssh_host_key"
else
SSH_HOST_KEY="/etc/ssh/ssh_host_key"
fi
}
dcacheInstallSshKeys()
{
# Install ssh keys for secure communication
#
logmessage DEBUG "dcacheInstallSshKeys.start"
if contains admin $SERVICES ; then
cd ${DCACHE_HOME}/config
if [ -f ./server_key ]; then
logmessage INFO "Skipping ssh key generation"
else
logmessage INFO "Generating ssh keys:"
ssh-keygen -b 768 -t rsa1 -f ./server_key -N "" 2>&1 | logmessage INFO
dcacheGetSshHostKey
ln -s $SSH_HOST_KEY ./host_key
fi
else
logmessage INFO "Not an admin door inteface node"
fi
logmessage DEBUG "dcacheInstallSshKeys.stop"
}
# Pool configuration
#
dcacheInstallCheckPool()
{
logmessage DEBUG "dcacheInstallCheckPool.start"
local rt
local size
local shortHostname
rt=`echo ${rrt} | awk '{print $1}'`
size=`echo ${rrt} | awk '{print $2}'`
if [ ! -e "${rt}/pool" ]; then
logmessage INFO "Creating Pool" ${pn}
shortHostname=`shortname_os`
createPool "${size}g" "${rt}/pool"
addPool "${pn}" "${rt}/pool" "${shortHostName}Domain" 0 "precious"
fi
logmessage DEBUG "dcacheInstallCheckPool.stop"
}
dcacheInstallPool()
{
logmessage DEBUG "dcacheInstallPool.start"
local shortHostname
local x
local fileToProcess
local linecount
shortHostname=`shortname_os`
if [ ! -r "${DCACHE_HOME}/config/${shortHostname}.poollist" ]; then
rm -f "${DCACHE_HOME}/config/${shortHostname}.poollist"
touch "${DCACHE_HOME}/config/${shortHostname}.poollist"
fi
if [ -r ${DCACHE_HOME}/etc/pool_path ]; then
logmessage WARNING "Defining pools in ${DCACHE_HOME}/etc/pool_path is deprecated."
logmessage WARNING "Please use ${DCACHE_HOME}/bin/dcache pool create and"
logmessage WARNING "${DCACHE_HOME}/bin/dcache pool add instead."
# For all the static areas under rt make a pool
fileToProcess=${DCACHE_HOME}/etc/pool_path
let x=1
linecount=`wc -l ${fileToProcess} | cut -d" " -f1`
let linecount=${linecount}+1
while [ $x -lt $linecount ]
do
rrt=`sed "${x}q;d" ${fileToProcess}`
pn=${shortHostname}"_"${x}
dcacheInstallCheckPool
let x=${x}+1
done
fi
logmessage DEBUG "dcacheInstallPool.stop"
}
dcacheInstallSrm()
{
logmessage DEBUG "dcacheInstallSrm.start"
local java
getServiceConfigurationValue srm java; java=$RET
#
# check java:
# jdk >= 1.6 , ( javac needed by tomcat/SRM )
#
if [ -z "${java}" ]; then
logmessage ABORT "java variable in ${DCACHE_HOME}/config/dCacheSetup not defined"
exit 6
fi
#
# resove java path eg. /usr/bin/java = /usr/j2se_1.4.2/bin/java
#
getCanonicalPath "${java}"; java="${RET}"
if [ -z "${java}" ]; then
logmessage ABORT "java variable in ${DCACHE_HOME}/config/dCacheSetup do not point to existing binary"
exit 7
fi
${java} -version 2>&1 | grep version | egrep "1\.[6]\." >/dev/null 2>&1
if [ $? -ne 0 ]; then
logmessage ABORT "java variable in ${DCACHE_HOME}/config/dCacheSetup do not point to java version 1.6.x"
exit 6
fi
# standard javac location $JAVA_HOME/bin/java
# check for javac
JAVA_HOME=${java%/bin/*}
if [ ! -x ${JAVA_HOME}/bin/javac ]; then
# on some system (e.g. Debian), $JAVA_HOME/bin/java points
# to $JAVA_HOME/jre/bin/java. Try to go up another level.
JAVA_HOME=${java%/jre/bin/*}
fi
# install SRM
#
# put correct JAVA_HOME into srm_setup.env
(
grep -v JAVA_HOME ${DCACHE_HOME}/etc/srm_setup.env
echo "JAVA_HOME=${JAVA_HOME}"
) > ${DCACHE_HOME}/etc/srm_setup.env.$$
mv ${DCACHE_HOME}/etc/srm_setup.env.$$ ${DCACHE_HOME}/etc/srm_setup.env
if contains srm $SERVICES; then
export loglevel logfile
logmessage DEBUG "Running ${DCACHE_HOME}/install/deploy_srmv2.sh ${DCACHE_HOME}/etc/srm_setup.env"
${DCACHE_HOME}/install/deploy_srmv2.sh ${DCACHE_HOME}/etc/srm_setup.env
fi
logmessage DEBUG "dcacheInstallSrm.stop"
}
dcacheInstallCreateWrappers()
{
logmessage DEBUG "dcacheInstallCreateWrappers.start"
#
# init package ( create wrappers in jobs directory )
#
logmessage DEBUG "Running ${DCACHE_HOME}/jobs/initPackage.sh ${DCACHE_HOME} "
${DCACHE_HOME}/jobs/initPackage.sh ${DCACHE_HOME} 2>&1
if [ $? != 0 ]; then
logmessage ABORT "Failed to initalize dCache installation, exiting."
exit 2
fi
logmessage DEBUG "dcacheInstallCreateWrappers.stop"
}
# Do the inistialtion checks
# Now start processing
check_shell
# Now check OS
check_os
if [ "$RET" == "Unknown" ] ; then
echo "ERROR: OS is not found."
exit 1
fi
# now process the command line
while [ $# -ne 0 ]
do
# Default to shifting to next parameter
shift_size=1
if [ $1 == "--prefix" -o $1 == "-p" ]
then
# set dCache install location
DCACHE_HOME=$2
shift_size=2
fi
if [ $1 == "--help" -o $1 == "-h" ]
then
# set dCache install location
usage
exit 0
fi
if [ $1 == "--loglevel" -o $1 == "-l" ]
then
# set dCache install location
let loglevel=$2
shift_size=2
fi
if [ $1 == "--logfile" ]
then
# set dCache install location
logfile=$2
shift_size=2
fi
shift $shift_size
done
# Set home path
if [ -z "$DCACHE_HOME" ]; then
getCanonicalPath "$0"
DCACHE_HOME=${RET%/install/install.sh}
fi
if [ ! -d "$DCACHE_HOME" ]; then
echo "$DCACHE_HOME is not a directory"
exit 2
fi
# Load libraries
. ${DCACHE_HOME}/share/lib/paths.sh
. ${DCACHE_LIB}/utils.sh
. ${DCACHE_LIB}/config.sh
. ${DCACHE_LIB}/services.sh
. ${DCACHE_LIB}/namespace.sh
. ${DCACHE_LIB}/pool.sh
# Now check for missing files
check_install
# Read node config into variables prefixed by NODE_CONFIG_
readconf ${DCACHE_HOME}/etc/node_config NODE_CONFIG_ ||
readconf ${DCACHE_HOME}/etc/door_config NODE_CONFIG_
DOMAINS="$(printAllDomains)"
SERVICES="$(printServices $DOMAINS)"
getServerId; SERVER_ID="$RET"
if isNameSpaceMountNeeded $DOMAINS; then
logmessage INFO "This node will need to mount the name server."
fi
dcacheInstallSshKeys
dcacheInstallCreateWrappers
dcacheInstallMountPoints
dcacheInstallSrm
dcacheInstallPool
exit 0
07070100204c4c000081ed000000650000000a000000014ad7320e0000017b000000b600010008ffffffffffffffff0000003a00000000reloc/opt/d-cache/install/upgrade_space_manager_schema.sh #!/bin/sh
#
# script that updates SRM space manager schema
#
ourHomeDir=/opt/d-cache
if [ -r ${ourHomeDir}/etc/srm_setup.env ] ; then
. ${ourHomeDir}/etc/srm_setup.env
fi
export JAVA_HOME
for jar in `find ${ourHomeDir}/classes/ -name '*jar'`; do CLASSPATH=${CLASSPATH}:${jar}; done
export CLASSPATH
$JAVA_HOME/bin/java diskCacheV111.services.space.Manager $*
rc=$?
exit $rc
07070100204c4a000081ed000000650000000a000000014ad7320e00004f40000000b600010008ffffffffffffffff0000002a00000000reloc/opt/d-cache/install/deploy_srmv2.sh #!/bin/sh
#
# $Id: deploy_srmv2.sh,v 1.27 2006-11-21 21:34:02 timur Exp $
#
# Default Log level
# Standard logging levels are
# ABORT ERROR WARNING INFO DEBUG
if [ -z "$loglevel" ]
then
loglevel=14
fi
# Default Log File
if [ -z "$logfile" ]
then
logfile=""
fi
logmessage()
{
local ThisLogLevel
local ThisPrefix
local ThisLogLevel
ThisLogLevel=$1
if [ "$1" = "NONE" ] ; then
ThisLogLevel=55
fi
if [ "$1" = "ABORT" ] ; then
ThisLogLevel=45
fi
if [ "$1" = "ERROR" ] ; then
ThisLogLevel=35
fi
if [ "$1" = "WARNING" ] ; then
ThisLogLevel=25
fi
if [ "$1" = "INFO" ] ; then
ThisLogLevel=15
fi
if [ "$1" = "DEBUG" ] ; then
ThisLogLevel=5
fi
if [ $ThisLogLevel -lt 60 ] ; then
ThisPrefix="NONE:"
fi
if [ $ThisLogLevel -lt 50 ] ; then
ThisPrefix="ABORT:"
fi
if [ $ThisLogLevel -lt 40 ] ; then
ThisPrefix="ERROR:"
fi
if [ $ThisLogLevel -lt 30 ] ; then
ThisPrefix="WARNING:"
fi
if [ $ThisLogLevel -lt 20 ] ; then
ThisPrefix="INFO:"
fi
if [ $ThisLogLevel -lt 10 ] ; then
ThisPrefix="DEBUG:"
fi
if [ $# -ge 1 ]
then
shift 1
if [ ${ThisLogLevel} -gt ${loglevel} ]
then
if [ $# -eq 1 ]; then
echo ${ThisPrefix}$*
if [ "${logfile}" != "" ]
then
echo ${ThisPrefix}$* >> ${logfile}
fi
else
while read logline
do
echo ${ThisPrefix}${logline}
if [ "${logfile}" != "" ]
then
echo ${ThisPrefix}${logline} >> ${logfile}
fi
done
fi
fi
fi
}
#execute will execute command and exit if its command fails
execute() {
command="$*"
logmessage DEBUG "executing [ ${command} ]"
${command}
rc=$?
if [ $rc != 0 ]
then
logmessage ERROR "execution of command [ ${command} ] failed with return code $rc"
exit $rc
fi
}
#comment_multiline will comment multiline elements in xml documents
comment_multiline ()
{
pattern="s/(";
first=true
for i in $1;
do
#first remove elements that perl might not be happy with
element=`echo $i | sed -e 's/"/./g' -e 's#/#\\\/#g'`
if [ "$first" = "true" ] ; then
pattern=${pattern}${element}
else
pattern=${pattern}'\s*.\s*'${element}
fi
first=false
done;
pattern=${pattern}')//s';
perl -00pe "${pattern}" $2 >${tmp}
cat ${tmp} >$2
}
if [ $# -gt 1 ]; then
echo "Usage: $0 [setup file]";
exit 1;
fi
SETUP_FILE=$1
if [ "x${SETUP_FILE}" = "x" ]; then
SETUP_FILE="./srm_setup.env"
fi
if [ ! -r ${SETUP_FILE} ] ; then
echo "can't find ${SETUP_FILE}" 2>&1
exit 1
fi
. ${SETUP_FILE}
#
# tomcat started in other process, so export JAVA_HOME
#
export JAVA_HOME
#
# add hostname into srmDomain
#
shortHostname=`hostname | awk -F. '{print $1}'`
DEBUG=false
validateVariables()
{
#
# check that everything is set and built
#
if [ "${JAVA_HOME}" = "" ] ; then
logmessage ABORT "JAVA_HOME enviroment variable is not defined "
exit 1
fi
JAVA=${JAVA_HOME}/bin/java
if [ ! -f ${SRM_JARS_DIR}/srm.jar ] ; then
logmessage ABORT "SRM_JARS_DIR=${SRM_JARS_DIR} not found or srm is not built"
exit 1
fi
if [ ! -f ${CELLS_JARS_DIR}/cells-protocols.jar ] ; then
logmessage ABORT "CELLS_JARS_DIR=${CELLS_JARS_DIR} not found or cells' cells-protocols.jar is not built"
exit 1
fi
if [ ! -f ${DCACHE_JARS_DIR}/dcache.jar ] ; then
logmessage ABORT "DCACHE_JARS_DIR=${DCACHE_JARS_DIR} not found or dcache is not built "
exit 1
fi
if [ ! -d ${AXIS_BASE_PATH} ] ; then
logmessage ABORT "echo AXIS_BASE_PATH=${AXIS_BASE_PATH} not found"
exit 1
fi
if [ ! -d ${TOMCAT_BASE_PATH} ] ; then
logmessage ABORT "TOMCAT_BASE_PATH=${TOMCAT_BASE_PATH} not found"
exit 1
fi
if [ ! -f ${AXIS_ARCHIVE} ] ; then
logmessage ABORT "AXIS_ARCHIVE=${AXIS_ARCHIVE} not found "
exit 1
fi
if [ ! -f ${TOMCAT_ARCHIVE} ] ; then
logmessage ABORT "TOMCAT_ARCHIVE=${TOMCAT_ARCHIVE} not found"
exit 1
fi
if [ ! -d ${GLOBUS_JARS_DIR} ] ; then
logmessage ABORT "GLOBUS_JARS_DIR=${GLOBUS_JARS_DIR} not found"
exit 1
fi
if [ ! -f ${SRM_BATCH} ] ; then
logmessage ABORT "SRM_BATCH=${SRM_BATCH} not found"
exit 1
fi
if [ ! -f ${SRM_SETUP} ] ; then
logmessage ABORT "SRM_SETUP=${SRM_SETUP} not found"
exit 1
fi
if [ ! -d ${DCACHE_HOME} ] ; then
logmessage ABORT "DCACHE_HOME=${DCACHE_HOME} not found"
exit 1
fi
if [ ! -f ${SRMV1_WSDD} ] ; then
logmessage ABORT "SRMV1_WSDD=${SRMV1_WSDD} not found"
exit 1
fi
if [ ! -f ${SRMV2_WSDD} ] ; then
logmessage ABORT "SRMV2_WSDD=${SRMV2_WSDD} not found"
exit 1
fi
if [ ! -f ${SRM_LOG_CONFIG} ] ; then
logmessage ABORT "SRM_LOG_CONFIG=${SRM_LOG_CONFIG} not found"
exit 1
fi
}
WebServicesContainerSetup()
{
# compute name of axis dir
AXIS_PATH=${AXIS_BASE_PATH}/`basename ${AXIS_ARCHIVE} | sed "s/\.tar\.gz$//"`
# compute name of tomcat dir
TOMCAT_PATH=${TOMCAT_BASE_PATH}/`basename ${TOMCAT_ARCHIVE} | sed "s/\.tar\.gz$//"`
# if old axis exists, move it
if [ -e ${AXIS_PATH} ] ; then
if [ "$DELETE_OLD_AXIS_TOMCAT" = "true" ] ; then
logmessage WARNING "deleting previous version of Axis at ${AXIS_PATH}"
rm -rf ${AXIS_PATH}
else
OLD_AXIS=${AXIS_PATH}.${RANDOM}
logmessage WARNING "moving previous version at ${AXIS_PATH} to ${OLD_AXIS}"
mv ${AXIS_PATH} ${OLD_AXIS}
fi
fi
# if old tomcat exists, stop it and move it
if [ -e ${TOMCAT_PATH} ] ; then
OLD_TOMCAT=${TOMCAT_PATH}.${RANDOM}
${TOMCAT_PATH}/bin/shutdown.sh
if [ "$DELETE_OLD_AXIS_TOMCAT" = "true" ] ; then
logmessage WARNING "deleting previous version of Tomcat at ${TOMCAT_PATH}"
rm -rf ${TOMCAT_PATH}
else
logmessage WARNING "moving previous version of tomcat at {TOMCAT_PATH} to ${OLD_TOMCAT}"
mv ${TOMCAT_PATH} ${OLD_TOMCAT}
fi
fi
logmessage INFO "installing tomcat and axis ..."
cmd="tar --directory=${AXIS_BASE_PATH} -xzf ${AXIS_ARCHIVE}"
execute "$cmd"
cmd="tar --directory=${TOMCAT_BASE_PATH} -xzf ${TOMCAT_ARCHIVE}"
execute "$cmd"
if [ ! -d ${AXIS_PATH} ] ; then
logmessage ABORT "AXIS_PATH=${AXIS_PATH} not found"
exit 1
fi
if [ ! -d ${TOMCAT_PATH} ] ; then
logmessage ABORT "TOMCAT_PATH=${TOMCAT_PATH} not found"
exit 1
fi
AXIS_WEBAPP_DIR="${AXIS_PATH}/webapps/axis"
logmessage DEBUG "AXIS_PATH=$AXIS_PATH"
logmessage DEBUG "TOMCAT_PATH=$TOMCAT_PATH"
RET=$TOMCAT_PATH
}
validateVariables
WebServicesContainerSetup
export CATALINA_HOME=${RET}
# some temp file
tmp=/tmp/substitute`date +%h%d%H%M%s%m`
tmp1=/tmp/tmp1`date +%h%d%H%M%s%m`
tmp2=/tmp/tmp2`date +%h%d%H%M%s%m`
tmp3=/tmp/tmp3`date +%h%d%H%M%s%m`
# no matter what the reason for exiting, delete the temp files
trap 'rm -f $tmp $tmp1 $tmp2 $tmp3 >/dev/null 2>&1' 0
trap "exit 1" 1 2 3 15
#
# globus jars go to common directory so that the credentials are created by the top level tomcat class loader
#
for i in ${GLOBUS_JARS_DIR}/*jar ${DCACHE_JARS_DIR}/security/*.jar
do
cmd="cp ${i} ${TOMCAT_PATH}/common/lib"
execute "$cmd"
done
#cmd="mv ${TOMCAT_PATH}/common/lib/cog-axis.jar ${AXIS_WEBAPP_DIR}/WEB-INF/lib"
#execute "$cmd"
#cmd="mv ${TOMCAT_PATH}/common/lib/cog-url.jar ${AXIS_WEBAPP_DIR}/WEB-INF/lib"
#execute "$cmd"
mv ${TOMCAT_PATH}/common/lib/cog-tomcat*.jar ${TOMCAT_PATH}/server/lib/
mv ${TOMCAT_PATH}/common/lib/cog-url*.jar ${TOMCAT_PATH}/server/lib/
cmd="cp ${CELLS_JARS_DIR}/cells-protocols.jar ${TOMCAT_PATH}/server/lib/"
execute "$cmd"
#cmd="cp ${SRM_JARS_DIR}/srm-tomcat.jar ${TOMCAT_PATH}/server/lib/"
#execute "$cmd"
#
# To get the correct parsers for opensaml-1.0.1, dom3 jars must go to common/endorsed directory in place of those there
#
#mv ${AXIS_WEBAPP_DIR}/WEB-INF/lib/dom3*.jar ${TOMCAT_PATH}/common/endorsed/.
#mkdir ${TOMCAT_PATH}/common/endorsed/notused
#mv ${TOMCAT_PATH}/common/endorsed/xercesImpl.jar ${TOMCAT_PATH}/common/endorsed/notused/.
#mv ${TOMCAT_PATH}/common/endorsed/xmlParserAPIs.jar ${TOMCAT_PATH}/common/endorsed/notused/.
logmessage INFO "Done installing tomcat and axis"
CATALINA_SH=${TOMCAT_PATH}/bin/catalina.sh
SETCLASS_SH=${TOMCAT_PATH}/bin/setclasspath.sh
add_java_opt()
{
java_opt=$1
java_opt_line="JAVA_OPTS=\"\${JAVA_OPTS} $java_opt\""
grep -m 1 -e ".*$java_opt.*" ${CATALINA_SH} > /dev/null
if [ $? -eq 1 ] ; then
sed -e "s/\(.*bootstrap.jar.*\)/\1\n\n$java_opt_line/" ${CATALINA_SH} > $tmp
mv $tmp ${CATALINA_SH}
chmod 755 ${CATALINA_SH}
fi
}
logmessage INFO "modifying java options in ${CATALINA_SH} ..."
add_java_opt "-Djava.protocol.handler.pkgs=sun.net.www.protocol||org.globus.net.protocol"
add_classpath()
{
ADDED_PATH=$1
CATALINA_CP_ADD1=CLASSPATH=\\\"\\\$CLASSPATH\\\":\\\"\\\$CATALINA_HOME\\\"/$ADDED_PATH
echo $CATALINA_CP_ADD1 | sed "s/\//\\\\\//g" > $tmp
CATALINA_CP_ADD=`cat $tmp`
grep -m 1 -e $ADDED_PATH ${SETCLASS_SH} > /dev/null
if [ $? -eq 1 ] ; then
cp -p ${SETCLASS_SH} $tmp
echo >> $tmp
echo ${CATALINA_CP_ADD} | sed "s/\\\//g" >> $tmp
mv $tmp ${SETCLASS_SH}
fi
}
logmessage INFO "modifying system CLASSPATH in ${SETCLASS_SH} ..."
add_classpath "server/lib/cells-protocols.jar"
cog_url_jar=`basename $(ls ${TOMCAT_PATH}/server/lib/cog-url*.jar)`
add_classpath "server/lib/${cog_url_jar}"
if [ -d ${SRM_WEBAPP_DIR} ] ; then
logmessage WARNING "Removing previous srm webapp directory"
rm -rf ${SRM_WEBAPP_DIR}
fi
logmessage INFO "Creating srm webapp directory"
mkdir ${SRM_WEBAPP_DIR}
mkdir ${SRM_WEBAPP_DIR}/WEB-INF
mkdir ${SRM_WEBAPP_DIR}/WEB-INF/lib
#
# copy jar files to srm webapp dir
#
for i in ${AXIS_WEBAPP_DIR}/WEB-INF/lib/*jar ${SRM_JARS_DIR}/glue/*jar ${SRM_JARS_DIR}/srm.jar ${SRM_JARS_DIR}/jdbc-drivers/*.jar ${SRM_JARS_DIR}/jdom/jdom.jar ${DCACHE_JARS_DIR}/dcache.jar ${DCACHE_JARS_DIR}/dcache-common.jar ${SRM_JARS_DIR}/glite/*.jar ${SRM_JARS_DIR}/gplazma/*.jar ${DCACHE_JARS_DIR}/cells.jar ${DCACHE_JARS_DIR}/jpox/*.jar ${DCACHE_JARS_DIR}/smc/*.jar ${DCACHE_JARS_DIR}/terapaths/*.jar ${DCACHE_JARS_DIR}/toplink/*.jar ${DCACHE_JARS_DIR}/spring/*.jar ${DCACHE_JARS_DIR}/activemq/*.jar ${DCACHE_JARS_DIR}/opensaml/*.jar ${DCACHE_JARS_DIR}/endorsed/xercesImpl*.jar ${DCACHE_JARS_DIR}/rrd4j/*.jar ${DCACHE_JARS_DIR}/log4j/*.jar ${DCACHE_JARS_DIR}/slf4j/*.jar
do
cmd="cp ${i} ${SRM_WEBAPP_DIR}/WEB-INF/lib"
# echo $cmd
execute "$cmd"
done
cmd="mv ${TOMCAT_PATH}/common/lib/cog-axis*.jar ${SRM_WEBAPP_DIR}/WEB-INF/lib"
# echo $cmd
execute "$cmd"
#
# copy web.xml to srm webapp dir
#
cmd="cp ${AXIS_WEBAPP_DIR}/WEB-INF/web.xml ${SRM_WEBAPP_DIR}/WEB-INF/."
execute "$cmd"
# Deploy SRM web service
logmessage INFO "Creating srm webapp deployment file"
cat >>${TOMCAT_PATH}/conf/Catalina/localhost/srm.xml <
EOF
logmessage INFO "Done creating srm webapp deployment file"
TOMCAT_CONFIG="${TOMCAT_PATH}/conf/server.xml"
if [ -z "${TOMCAT_PORT}" ] ; then
TOMCAT_PORT=8080
fi
if [ -n "${TOMCAT_PORT}" -a ${TOMCAT_PORT} -gt 0 -a ${TOMCAT_PORT} -ne 8080 ] ; then
logmessage WARNING "modifying default tomcat port to ${TOMCAT_PORT} ..."
cp -p ${TOMCAT_CONFIG} $tmp
sed -e "s/8080/${TOMCAT_PORT}/g" ${TOMCAT_CONFIG} >$tmp
mv $tmp ${TOMCAT_CONFIG}
logmessage INFO "Done modifying default tomcat port to ${TOMCAT_PORT}"
fi
logmessage INFO "Starting up tomcat ..."
#
# startup tomcat
#
cmd="${TOMCAT_PATH}/bin/startup.sh"
execute ${cmd}
if [ "${DEBUG}" = "true" ]
then
logmessage WARNING "sleeping for 5 seconds to let tomcat complete its strartup"
fi
sleep ${TOMCAT_STARTUP_DELAY}
logmessage INFO "Done starting up tomcat"
#
# setup axis classpath for runnning the axis deploy tool
#
logmessage INFO "deploying srm v2 application using axis AdminClient ..."
unset AXIS_CLASSPATH
export AXIS_CLASSPATH
for i in ${AXIS_PATH}/lib/*jar ; do AXIS_CLASSPATH=${AXIS_CLASSPATH}${AXIS_CLASSPATH+:}${i}; done
cmd="${JAVA} -cp ${AXIS_CLASSPATH}:${SRM_JARS_DIR}/srm.jar org.apache.axis.client.AdminClient -lhttp://localhost:${TOMCAT_PORT}/srm/servlet/AxisServlet ${SRMV1_WSDD}"
execute ${cmd}
cmd="${JAVA} -cp ${AXIS_CLASSPATH}:${SRM_JARS_DIR}/srm.jar org.apache.axis.client.AdminClient -lhttp://localhost:${TOMCAT_PORT}/srm/servlet/AxisServlet ${SRMV2_WSDD}"
execute ${cmd}
logmessage INFO "Done deploying srm v2 application using axis AdminClient"
AXIS_WEB_XML="${AXIS_WEBAPP_DIR}/WEB-INF/web.xml"
SRM_WEB_XML="${SRM_WEBAPP_DIR}/WEB-INF/web.xml"
logmessage INFO "creating config files and adding configuration info into ${SRM_WEB_XML} ..."
DCACHE_PARAMS_CONFIG="${SRM_WEBAPP_DIR}/WEB-INF/dCacheParams.xml"
echo "">${DCACHE_PARAMS_CONFIG}
echo " srm-${shortHostname}Domain">>${DCACHE_PARAMS_CONFIG}
echo " -param">>${DCACHE_PARAMS_CONFIG}
echo " setupFile=${SRM_SETUP}">>${DCACHE_PARAMS_CONFIG}
echo " ourHomeDir=${DCACHE_HOME}">>${DCACHE_PARAMS_CONFIG}
echo " ourName=srm">>${DCACHE_PARAMS_CONFIG}
echo " -batch">>${DCACHE_PARAMS_CONFIG}
echo " ${SRM_BATCH}">>${DCACHE_PARAMS_CONFIG}
echo "">>${DCACHE_PARAMS_CONFIG}
DEST_SRM_LOG_CONFIG="${SRM_WEBAPP_DIR}/WEB-INF/logConfig.xml"
cmd="cp ${SRM_LOG_CONFIG} ${DEST_SRM_LOG_CONFIG}"
execute ${cmd}
SRM_CONFIG="${SRM_WEBAPP_DIR}/WEB-INF/srmConfigFile.xml"
echo "">${SRM_CONFIG}
echo " ${DCACHE_PARAMS_CONFIG} ">>${SRM_CONFIG}
echo " ${DEST_SRM_LOG_CONFIG} ">>${SRM_CONFIG}
echo " ${SRM_STORAGE_CLASS} ">>${SRM_CONFIG}
echo "">>${SRM_CONFIG}
#find the line number containing " - this is the beginning of the service section
n=`grep -n -m 1 "^\W*" ${AXIS_WEB_XML} | sed "s/:.*$//"`
n=$((${n}-1))
#break file in two parts
sed -n "1,${n}p" ${AXIS_WEB_XML} >${tmp1}
n=$((${n}+1))
sed -n "${n},\$p" ${AXIS_WEB_XML} >${tmp3}
cat >${tmp2} <AxisServlet/*
EOF
#now put it all together
cat ${tmp1} ${tmp2} ${tmp3} > ${SRM_WEB_XML}
WEB_XML_TMP="${SRM_WEBAPP_DIR}/WEB-INF/web.xml.tmp"
grep -v "" ${SRM_WEB_XML} > ${WEB_XML_TMP}
echo " " >> ${WEB_XML_TMP}
echo " srmConfigFile" >> ${WEB_XML_TMP}
echo " ${SRM_WEBAPP_DIR}/WEB-INF/srmConfigFile.xml" >> ${WEB_XML_TMP}
echo " java.lang.String" >> ${WEB_XML_TMP}
echo " " >> ${WEB_XML_TMP}
echo " " >> ${WEB_XML_TMP}
mv ${WEB_XML_TMP} ${SRM_WEB_XML}
# comment out web.xml parts related to SOAPMonitorService
comment_multiline " SOAPMonitorService/SOAPMonitor" ${SRM_WEB_XML}
comment_multiline "SOAPMonitorServiceSOAPMonitorService
org.apache.axis.monitor.SOAPMonitorService
SOAPMonitorPort5001100" ${SRM_WEB_XML}
rm -rf ${AXIS_PATH}
logmessage INFO "done creating config files and adding configuration info into ${SRM_WEB_XML}"
logmessage INFO "enabling GSI HTTP in tomcat by modifying ${TOMCAT_CONFIG} ..."
#find the line number containing "${tmp1}
n=$((${n}+1))
sed -n "${n},\$p" ${TOMCAT_CONFIG} >${tmp3}
#now fill the middle
cat >${tmp2} <> ${tmp2}
if [ "${TOMCAT_MAX_THREADS}" = "" ] ; then
maxThreads=500
else
maxThreads=${TOMCAT_MAX_THREADS}
fi
if [ "${TOMCAT_MIN_SPARE_THREADS}" = "" ] ; then
minSpareThreads=25
else
minSpareThreads=${TOMCAT_MIN_SPARE_THREADS}
fi
if [ "${TOMCAT_MAX_SPARE_THREADS}" = "" ] ; then
maxSpareThreads=200
else
maxSpareThreads=${TOMCAT_MAX_SPARE_THREADS}
fi
if [ "${TOMCAT_ACCEPT_COUNT}" = "" ] ; then
acceptCount=1024
else
acceptCount=${TOMCAT_ACCEPT_COUNT}
fi
echo " maxThreads=\"${maxThreads}\" minSpareThreads=\"${minSpareThreads}\" maxSpareThreads=\"${maxSpareThreads}\" ">> ${tmp2}
echo " maxProcessors=\"${maxThreads}\" minProcessors=\"${minSpareThreads}\" maxSpareProcessors=\"${maxSpareThreads}\" ">> ${tmp2}
echo " enableLookups=\"false\" disableUploadTimeout=\"true\"" >> ${tmp2}
echo " acceptCount=\"${acceptCount}\"" >> ${tmp2}
echo " debug=\"1\" scheme=\"https\" autoFlush=\"true\"" >> ${tmp2}
echo " protocolHandlerClassName=\"org.apache.coyote.http11.Http11Protocol\"" >> ${tmp2}
echo " socketFactory=\"org.globus.tomcat.catalina.net.BaseHTTPSServerSocketFactory\"" >> ${tmp2}
echo " cert=\"${X509_CERT}\"" >> ${tmp2}
echo " key=\"${X509_KEY}\"" >> ${tmp2}
echo " cacertdir=\"${X509_CA_CERT_DIR}\"" >> ${tmp2}
echo " mode=\"gsi\"/>" >> ${tmp2}
logmessage DEBUG "tmp2:${tmp2}"
#now put it all together
cat ${tmp1} ${tmp2} ${tmp3} > ${TOMCAT_CONFIG}
#now insert Certificate Valve
#find the line number containing " /" ${TOMCAT_CONFIG} >${tmp1}
#now put it all together again
cat ${tmp1} > ${TOMCAT_CONFIG}
if [ "$TOMCAT_HTTP_ENABLED" != "true" ] ; then
logmessage INFO "commenting out HTTP Connector on port ${TOMCAT_PORT} in ${TOMCAT_CONFIG} ..."
text_to_comment0=''
text_to_comment=`echo ${text_to_comment0} | sed -e "s/8080/${TOMCAT_PORT}/"`
# echo "text_to_comment=${text_to_comment}"
comment_multiline "${text_to_comment}" ${TOMCAT_CONFIG}
logmessage INFO "Done commenting out HTTP Connector on port ${TOMCAT_PORT} in ${TOMCAT_CONFIG}"
fi
logmessage INFO "commenting out AJP CoyoteConnector on port 8009..."
comment_multiline '' ${TOMCAT_CONFIG}
logmessage INFO "Done commenting out AJP CoyoteConnector on port 8009"
#modify server-config.wsdd so that the sendMultiRefs option is turned off for compatibility with gSoap
SRM_WS_CONFIG=${SRM_WEBAPP_DIR}/WEB-INF/server-config.wsdd
logmessage INFO "turning off sending of Multi Refs in ${SRM_WS_CONFIG}"
sed "s/\(.*sendMultiRefs.*value=\"\)true\(.*\)/\1false\2/" ${SRM_WS_CONFIG} >${tmp1}
mv ${SRM_WS_CONFIG} ${SRM_WS_CONFIG}.original
cat ${tmp1} > ${SRM_WS_CONFIG}
logmessage INFO "Done turning off sending of Multi Refs in ${SRM_WS_CONFIG}"
logmessage INFO "shutdown Tomcat"
cmd="${TOMCAT_PATH}/bin/shutdown.sh"
execute ${cmd}
logmessage INFO "installing config for startup/shutdown script"
cmd="cp ${SETUP_FILE} /usr/etc/setupSrmTomcat"
execute ${cmd}
logmessage INFO "Installation complete"
logmessage INFO "please use ${DCACHE_HOME}/bin/dcache start|stop|restart srm to startup, shutdown or restart srm server"
07070100204c74000041ed000000650000000a000000074ad7323800000000000000b600010008ffffffffffffffff0000001800000000reloc/opt/d-cache/share 07070100204c9c000041ed000000650000000a000000024ad7323800000000000000b600010008ffffffffffffffff0000001c00000000reloc/opt/d-cache/share/lib 07070100204ca0000081a4000000650000000a000000014ad7323200000b1a000000b600010008ffffffffffffffff0000002900000000reloc/opt/d-cache/share/lib/namespace.sh # Useful functions for querying the dCache configuration files.
#
# Relies on the functions in utils.sh, config.sh and services.sh,
# which must be loaded prior to calling any of the following
# functions.
# Returns 0 if any of the domains require a PNFS mount, returns 1
# otherwise.
isNameSpaceMountNeeded() # $* = domains
{
for domain in $*; do
getService $domain
case "$RET" in
srm|pnfs)
return 0
;;
*)
;;
esac
done
return 1;
}
# Mount name server export $2 on local directory $1
mountNameSpace() # $1 = mount point, $2 = server export, $3 = nfs protocol version
{
local mountpoint
local export
local server
local version
local nfsversion
mountpoint="$1"
export="$2"
nfsversion=$3
# Check if already mounted
if [ -f "${mountpoint}/.(tags)()" ]; then
return;
fi
# Check that mount point exists
if [ ! -d "${mountpoint}" ]; then
fail 1 "Mount point $mountpoint does not exist.
Please rerun install.sh."
fi
# Determine the name space server; defaults to localhost
getNameSpaceServer; server=${RET:-localhost}
# Solaris specific fix
case $(uname) in
SunOS)
version="vers"
;;
*)
version="nfsvers"
;;
esac
# Mount name space
printp "Mounting ${mountpoint}"
if ! mount -o intr,rw,noac,hard,${version}=${nfsversion} ${server}:${export} ${mountpoint}; then
fail 1 "Failed to mount name space. The following command failed:" \
"mount -o intr,rw,noac,hard,${version}=${nfsversion} ${server}:${export}
${mountpoint}"
fi
if [ ! -f "${mountpoint}/.(tags)()" ]; then
fail 1 "Failed to mount name space."
fi
}
# Mount name space if not already mounted. Where and how the name
# space is mounted depends on the configured service and the name
# space.
autoMountNameSpace()
{
local root
local namespace
local serverId
# Where should we mount it and what kind of name space do we use?
root="${NODE_CONFIG_PNFS_ROOT:-$DCACHE_PNFS_ROOT}"
namespace="${NODE_CONFIG_NAMESPACE:-pnfs}"
case "$namespace" in
chimera)
mountNameSpace "${root}" "/pnfs" 3
;;
pnfs)
if contains pnfsDomain $(printAllDomains); then
loadServiceConfigurationFile pnfs
if [ -z "$pnfs_pnfs" ]; then
mountNameSpace "${root}/fs" "/fs" 2
else
mountNameSpace "${pnfs_pnfs}" "/fs" 2
fi
else
getServerId; serverId="$RET"
mountNameSpace "${root}/${serverId}" "/pnfsdoors" 2
fi
;;
esac
}
07070100204ca2000081a4000000650000000a000000014ad73232000023ea000000b600010008ffffffffffffffff0000002400000000reloc/opt/d-cache/share/lib/pool.sh # Useful functions for working with pools
#
# Relies on the functions in utils.sh, config.sh and
# services.sh. These must be loaded prior to calling any of the
# following functions.
# Prints the list of pools in the given pool domains.
printAllPools() # $* = list of domains
{
for domain in $*; do
printPoolsInDomain $domain | while read pool path param; do
printf "%s " $pool
done
done
}
# Writes the poollist file of the given pool domain to stdout. The
# format is 'name directory parameters'. Aborts if the file does not
# exist.
printPoolsInDomain() # $1 = Pool domain
{
local poolFile
getPoolListFile $1; poolFile="$RET"
if [ ! -f ${poolFile} ]; then
printp "Pool file not found: ${poolFile}" 1>&2
exit 4
fi
cat $poolFile
}
# If pool exists in one of the given domains, then the domain
# containing the pool is stored in RET and the return code is 0. If
# the pool is not found, the return code is 1.
getDomainOfPool() # $1 = pool, $2+ = list of domains
{
local pool
pool=$1
shift
for domain in "$@"; do
if contains "$pool" $(printPoolsInDomain "$domain"); then
RET="$domain"
return 0
fi
done
return 1
}
getPoolPath() # $1 = pool, $2 = domain
{
local pool
local domain
local poolFile
pool="$1"
domain="$2"
getPoolListFile "$domain"; poolFile="$RET"
RET=$(sed -n -e "s/^${pool} *\([^ ]*\)*.*$/\1/p" < ${poolFile})
[ -n "${RET}" ]
}
getPoolSetting() # #1 = pool path, #2+ = setting
{
local path
local key
path=$1
shift
key=$*
if [ ! -f ${path}/setup ]; then
printp "Setup file not found in $1" 1>&2
exit 4
fi
# Comments Trailing space Print value
# vvvvvvvv vvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvv
RET=$(sed -n -e 's/#.*$//' -e 's/[ ]*$//' -e "s/^[ ]*${key}[ ]*\(.*\)/\1/p" ${path}/setup)
}
# Extracts the size of a pool in GiB.
getSizeOfPool() # $1 = pool path
{
getPoolSetting ${path} "set max diskspace"
stringToGiB "$RET"
}
createPool() # $1 = size, $2 = path
{
local size
local path
local ds
local movers
local set_size
local set_movers
local parent
stringToGiB "$1"; size="$RET"
path="$2"
# Path must not exist
if [ -e "${path}" ]; then
fail 1 "${path} already exists. Operation aborted."
fi
# Make sure the parent path exists
parent=$(dirname ${path})
if [ ! -d "${parent}" ]; then
mkdir -p "${parent}" || fail 1 "Failed to create $parent"
fi
# We need to have enough free space
getFreeSpace "${parent}"; ds="$RET"
if [ "${ds}" -lt "${size}" ]; then
fail 1 "Pool size exceeds available space. ${path} only
has ${ds} GiB of free space. Operation aborted."
fi
# Why does node_config contain default values for new pools? That
# will for sure confuse our users, since they are made to believe
# they can adjust the number of movers by changing node_config;
# which is not the case!
movers="$NODE_CONFIG_NUMBER_OF_MOVERS"
mkdir -p "${path}" "${path}/data" "${path}/control" ||
fail 1 "Failed to create directory tree"
set_size="s:set max diskspace 100g:set max diskspace ${size}g:g"
set_movers="s:mover set max active 10:mover set max active ${movers}:g"
sed -e "$set_size" -e "$set_movers" ${pool_config}/setup.temp > ${path}/setup || exit 1
printp "Created a $size GiB pool in $path. The pool cannot be used
until it has been added to a domain. Use 'pool add' to do so."\
"Please note that this script does not set the owner of the
pool directory. You may need to adjust it."
}
addPool() # $1 = pool, $2 = path, $3 = domain, $4 = use fqdn, $5 = lfs
{
local pool
local path
local domain
local use_fqdn
local lfs
local file
local param
pool=$1
path=$2
domain=$3
use_fqdn=$4
lfs=$5
sanitisePath $path; path="$RET"
# Check that LFS mode is valid
if ! contains $lfs none precious hsm volatile transient; then
fail 2 "Invalid LFS mode."
fi
# Check that path is absolute
if [ "${path#/}" = "${path}" ]; then
fail 2 "$path does not appear to be an absolute path. In order
to add the pool, the absolute path is needed."
fi
# Check that pool exists
if [ ! -f ${path}/setup ]; then
fail 1 "No pool found in ${path}. Operation aborted."
fi
# Check that pool is not already a member of a domain
for d in $(printAllPoolDomains); do
printPoolsInDomain $d | while read _pool _path _param; do
if [ "$path" = "$(sanitisePath $_path)" ]; then
fail 1 "Pool ${path} already present in ${d}.
Operation aborted."
fi
if [ "$pool" = "$_pool" ]; then
fail 1 "Pool name already used in ${d}. Operation
aborted."
fi
done
if [ $? -eq 1 ]; then
exit 1
fi
done
# A pool domain must have an ending of 'Domain'
if [ "${domain%Domain}Domain" != "${domain}" ]; then
fail 2 "${domain} is not a valid pool domain name, because
it does not end with 'Domain'. You may try to use
${domain}Domain."
fi
# It must not be used for any other service
if ! contains $domain $(printAllPoolDomains) ; then
if contains $domain $(printAllDomains); then
fail 1 "${domain} is not a valid pool domain name, because
the domain is already used for other purposes."
fi
fi
# Create the domain if it doesn't already exist
file=${pool_config}/${hostname}.domains
if [ ! -f $file ]; then
echo "${domain%Domain}" >> $file || exit 1
elif ! grep "${domain%Domain}" $file > /dev/null; then
echo "${domain%Domain}" >> $file || exit 1
fi
# Determine pool parameters
param="sticky=allowed recover-space recover-control recover-anyway"
if [ "$lfs" != "none" ]; then
param="$param lfs=$lfs"
fi
if [ "$use_fqdn" -eq 1 ]; then
param="$param tag.hostname=$fqdn"
else
param="$param tag.hostname=$hostname"
fi
# Add pool to domain
getPoolListFile $domain
echo "$pool $path $param" >> "$RET" || exit 1
# Tell the user what we did
printp "Added pool ${pool} in ${path} to ${domain}."\
"The pool will not be operational until the domain has
been started. Use 'start ${domain}' to start
the pool domain."
}
removePool() # $1 = pool name
{
local pool
local pl
local dl
pool=$1
# Find the domain containing pool and remove the pool from it
for domain in $(printAllPoolDomains); do
printPoolsInDomain $domain | while read _pool _path _param; do
if [ "$pool" = "$_pool" ]; then
# Check if domain is still running
if getPidOfDomain ${domain}; then
fail 1 "A pool named $pool was found in the domain
$domain. $domain is still running. Shut it
down before removing the pool from the
configuration. Operation aborted."
fi
# Remove pool from pool list file
getPoolListFile "$domain"; pl="$RET"
sed -e "/^${pool}.*/ d" ${pl} > ${pl}.$$ || exit
mv -f ${pl}.$$ ${pl} || exit
# Disable domain if empty
if isFileEmpty $pl; then
rm $pl || exit
dl="${pool_config}/${hostname}.domains"
sed -e "/^${domain%Domain}\$/ d" ${dl} > ${dl}.$$ || exit
mv -f ${dl}.$$ ${dl} || exit
printp "Removed pool ${pool} from ${domain}. ${domain}
is now empty and has been removed."
else
printp "Removed pool ${pool} from ${domain}."
fi
# Since this runs in a subshell, we return with a a
# non-zero return code to signal that removePool
# should return too.
exit 1
fi
done
[ $? -eq 0 ] || return
done
fail 1 "No pool named ${pool} could be found. Operation aborted."
}
# Reconstruct the meta data Berkeley DB of a pool
reconstructMeta() # $1 = src meta dir, $2 = dst meta dir
{
local src
local dst
local dump
local load
local databases
src="$1"
dst="$2"
dump="${java} -cp ${DCACHE_JE} com.sleepycat.je.util.DbDump"
load="${java} -cp ${DCACHE_JE} com.sleepycat.je.util.DbLoad"
databases="java_class_catalog state_store storage_info_store"
for db in ${databases}; do
${dump} -h "$src" -r -d "$dst" -v -s $db || return
done
for db in ${databases}; do
${load} -f "${dst}/${db}.dump" -h "$dst" -s $db || return
rm "${dst}/${db}.dump"
done
} 07070100204ca4000081a4000000650000000a000000014ad7323200000f9b000000b600010008ffffffffffffffff0000002500000000reloc/opt/d-cache/share/lib/utils.sh # Useful utility functions for shell programming
# Returns true if $1 is contained as a word in $2.
contains() # $1 = word, $2+ = list
{
local word
word=$1
shift
for i in "$@"; do
if [ "$word" = "$i" ]; then
return 0
fi
done
return 1
}
# Reverses a list of words
reverse() # $1 = space delimited list of words
{
RET=''
for s in $*; do
RET="${s} ${RET}"
done
}
# Normalises a path such that it does not contain double or trailing
# slashes.
sanitisePath() # $1 = path
{
RET=$(echo $1 | sed -e 's_//*_/_g' -e 's_/$__')
}
# Returns the maximum width of any word in a given list.
maxWidth() # $* = list of words
{
local max
local width
max=0
for i in $*; do
width=${#i}
if [ $max -lt $width ]; then
max=$width
fi
done
RET=$max
}
# Utility function for printing to stdout with a line width
# maximum of 75 characters. Longer lines are broken into several
# lines. Each argument is interpreted as a separate paragraph.
printp() # $* = list of paragraphs
{
local line
local line2
while [ $# -gt 0 ]; do
# If line is non empty, then we need to print a
# paragraph separator.
if [ -n "$line" ]; then
echo
fi
line=
for word in $1; do
line2="$line $word"
if [ ${#line2} -gt 75 ]; then
echo $line
line=$word
else
line=$line2
fi
done
echo $line
shift
done
}
# Prints an error message to stderr and exist with status $1
fail() # $1 = exit status, $2- = list of paragraphs, see printp
{
local n
n=$1
shift
printp "$@"
exit $n
} 1>&2
# Returns 0 if the given file is empty, 1 otherwise. The file must
# exist.
isFileEmpty() # $1 = file
{
if [ $(wc -l < $1) -eq 0 ]; then
return 0;
else
return 1;
fi
}
# Returns whether a process with a given PID is running
isRunning()# $1 = pid
{
ps -p "$1" 1>/dev/null 2>/dev/null
}
# Searches for executables and exists with an error message if any of
# them are not found on the PATH.
require() # $1 = executable
{
local tool
for tool in $*; do
if ! type ${tool} > /dev/null 2>&1; then
fail 1 "Could not find ${tool}. ${tool} is a required tool."
fi
done
}
# Sets the fqdn, hostname, and domainname variables
determineHostName()
{
case $(uname) in
SunOS)
fqdn=$(/usr/lib/mail/sh/check-hostname |cut -d" " -f7)
;;
Darwin)
fqdn=$(hostname)
;;
*)
fqdn=$(hostname --fqdn)
;;
esac
hostname=${fqdn%%.*}
if [ "$hostname" = "$fqdn" ]; then
domainname=
else
domainname=${fqdn#*.}
fi
}
# Converts a string describing some amount of disk space (using an
# optional suffix of k, K, m, M, g, G, t, T, for powers of 1024) to an
# integer number of GiB.
stringToGiB() # $1 = size
{
case $1 in
*k)
RET=$((${1%?}/(1024*1024)))
;;
*K)
RET=$((${1%?}/(1024*1024)))
;;
*m)
RET=$((${1%?}/1024))
;;
*M)
RET=$((${1%?}/1024))
;;
*g)
RET=$((${1%?}))
;;
*G)
RET=$((${1%?}))
;;
*t)
RET=$((${1%?}*1024))
;;
*T)
RET=$((${1%?}*1024))
;;
*)
RET=$(($1/(1024*1024*1024)))
;;
esac
}
# Extracts the amount of free space in GiB.
getFreeSpace() # $1 = path
{
[ -d "$1" ] || return 1
RET=$(df -k "${1}" | awk 'NR == 2 { if (NF < 4) { getline; x = $3 } else { x = $4 }; printf "%d", x / (1024 * 1024)}')
}
# Reads configuration file into shell variables. The shell variable
# names can optionally be prefixed. Returns 1 if file does not exist.
readconf() # $1 = file $2 = prefix
{
[ -f "$1" ] &&
eval $(sed -f "${DCACHE_LIB}/config.sed" "$1" |
sed -e "s/\([^=]*\)=\(.*\)/$2\1=\2/")
}
07070100204ca3000081a4000000650000000a000000014ad7323200002ce1000000b600010008ffffffffffffffff0000002800000000reloc/opt/d-cache/share/lib/services.sh # Useful functions for working with services and domains.
# The concept of a service is an abstraction used in dCache scripts. A
# service is the type of a domain. A service can have zero or more
# domains. A service corresponds to a job file in the jobs directory.
#
# This script defines functions for mapping services to domains,
# domains to services, starting and stopping domains, etc.
#
# Prints all domains for the given service. Services like 'pool' and
# 'dcap' may have more than one domain. Notice that this function is
# not limitted to configured domains.
printDomains() # $1 = service
{
local i
local door
case "$1" in
dcap)
for i in ${DCACHE_CONFIG}/door*Setup; do
door=$(echo $i | sed -e "s#.*door\(.*\)Setup#\1#")
printf "%s" "dcap${door}-${hostname}Domain "
done
;;
gPlazma)
printf "%s" "gPlazma-${hostname}Domain "
;;
xrootd)
printf "%s" "xrootd-${hostname}Domain "
;;
gridftp)
printf "%s" "gridftp-${hostname}Domain "
;;
gsidcap)
printf "%s" "gsidcap-${hostname}Domain "
;;
srm)
printf "%s" "srm-${hostname}Domain "
;;
pool)
for i in $(printAllPoolDomains); do
getPoolListFile $i
if ! isFileEmpty "$RET"; then
printf "%s" "$i "
fi
done
;;
admin)
printf "adminDoorDomain "
;;
dir)
printf "dirDomain "
;;
*Domain)
printf "%s" "$1 "
;;
*)
printf "%s" "${1}Domain "
;;
esac
}
# Prints domains used by all node types as defined by legacy
# node_config variables.
printLegacyDomains()
{
if isNodeConfigEnabled replicaManager; then
printDomains replica
fi
if isNodeConfigEnabled DCAP; then
printDomains dcap
fi
if isNodeConfigEnabled XROOTD; then
printDomains xrootd
fi
if isNodeConfigEnabled GRIDFTP; then
printDomains gridftp
fi
if isNodeConfigEnabled GSIDCAP; then
printDomains gsidcap
fi
if isNodeConfigEnabled SRM; then
printDomains srm
fi
}
# Prints domains used by admin and custom nodes as defined by legacy
# node_config variables.
printLegacyAdminDomains()
{
if isNodeConfigEnabled infoProvider; then
printDomains infoProvider
fi
if isNodeConfigEnabled info; then
printDomains info
fi
if isNodeConfigEnabled statistics; then
printDomains statistics
fi
}
# Prints domains used by custom nodes as defined by legacy node_config
# variables.
printLegacyCustomDomains()
{
if isNodeConfigEnabled lmDomain; then
printDomains lm
fi
if isNodeConfigEnabled poolManager; then
printDomains dCache
fi
if isNodeConfigEnabled dirDomain; then
printDomains dir
fi
if isNodeConfigEnabled adminDoor; then
printDomains admin
fi
if isNodeConfigEnabled httpDomain; then
printDomains httpd
fi
if isNodeConfigEnabled utilityDomain; then
printDomains utility
fi
if isNodeConfigEnabled gPlazmaService; then
printDomains gPlazma
fi
if isNodeConfigEnabled pnfsManager; then
printNameSpaceDomains
fi
}
# Prints domain hosting PnfsManager
printNameSpaceDomains()
{
case "$NODE_CONFIG_NAMESPACE" in
chimera)
printDomains chimera
;;
*)
printDomains pnfs
;;
esac
}
# Prints all configured domains
printAllDomains()
{
case "$NODE_CONFIG_NODE_TYPE" in
admin)
printDomains lm
printDomains dCache
printDomains dir
printDomains admin
printDomains httpd
printDomains utility
printDomains gPlazma
printNameSpaceDomains
printDomains pool
printLegacyAdminDomains
printLegacyDomains
;;
custom)
printLegacyCustomDomains
printDomains pool
printLegacyAdminDomains
printLegacyDomains
;;
pool)
printDomains pool
printLegacyDomains
;;
door)
printLegacyDomains
;;
esac
for service in $NODE_CONFIG_SERVICES; do
printDomains $service
done
}
# Prints the list of all configured pool domains, including empty
# domains.
printAllPoolDomains()
{
if [ -f ${pool_config}/${hostname}.domains ]; then
while read domain; do
if [ ! -f ${pool_config}/${domain}.poollist ]; then
printp "Requested pool list file not found (skipped):
${domain}.poollist" 1>&2
else
printf "%s" "${domain}Domain "
fi
done < ${pool_config}/${hostname}.domains
elif [ -f ${pool_config}/${hostname}.poollist ]; then
printf "%s" "${hostname}Domain "
fi
}
# Given a mixed list of domains and services, prints all domains for
# those services and domains. I.e. the domains are printed literally,
# and the services are expanded to the list of domains for those
# services. If no arguments are specified, a list of all configured
# domains is printed.
printExpandedServiceAndDomainList() # $* = list of services and domains
{
if [ $# -eq 0 ]; then
printAllDomains
else
for s in $*; do
printDomains $s
done
fi
}
# Provides the service name of a domain in RET. The service name
# corresponds to the name of the batch file of that service, without
# the file suffix.
getService() # $1 = domain name
{
if contains $1 $(printAllPoolDomains); then
RET="pool"
else
case "$1" in
dcap*-*Domain)
RET="dcap"
;;
gPlazma-*Domain)
RET="gPlazma"
;;
xrootd-*Domain)
RET="xrootd"
;;
gridftp-*Domain)
RET="gridftp"
;;
gsidcap-*Domain)
RET="gsidcap"
;;
srm-*Domain)
RET="srm"
;;
adminDoorDomain)
RET="admin"
;;
*Domain)
RET="${1%Domain}"
;;
*)
return 1
;;
esac
fi
return 0
}
# Given a list of domains, prints a list of corresponding service
# names.
printServices() # $* = list of domains
{
for domain in $*; do
getService $domain
printf "${RET} "
done
}
# If domain runs, RET is set to its PID. Returns 0 if domain is
# running, 1 otherwise.
getPidOfDomain() # $1 = Domain name
{
local domain
local pidFile
local pid
domain="$1"
getService "$domain" || return
getServiceConfigurationValue "$RET" pidDir || return
pidFile="${RET:-$DCACHE_PID}/dcache.$domain.pid"
[ -f ${pidFile} ] || return 1
pid=$(cat ${pidFile})
isRunning ${pid} || return 1
RET=${pid}
return 0
}
# Provides the name of the log file used by a domain in RET.
getLogOfDomain() # $1 = Domain name
{
local domain
local service
domain=$1
getService ${domain} || return; service="$RET"
case "$service" in
srm)
# Getting the location of the SRM stuff is unfortunately
# somewhat messy...
if [ -r ${DCACHE_ETC}/srm_setup.env ] && [ -r ${DCACHE_HOME}/bin/dcache-srm ]; then
. ${DCACHE_ETC}/srm_setup.env
eval $(grep "export CATALINA_HOME" ${DCACHE_BIN}/dcache-srm)
RET="${CATALINA_HOME}/logs/catalina.out"
fi
;;
*)
getServiceConfigurationValue $service logArea
RET="${RET:-$DCACHE_LOG}/${domain}.log"
;;
esac
return 0
}
# Stores the name of the pool list file for the given pool domain in
# RET.
getPoolListFile() # $1 = domain name
{
RET="${pool_config}/${1%Domain}.poollist"
}
# Returns the setup file path for a service.
getServiceConfigurationFile() # $1 = service
{
local filename
local service
service="$1"
case "${service}" in
srm)
filename="srmSetup"
;;
dcap)
filename="doorSetup"
;;
xrootd)
filename="xrootdDoorSetup"
;;
gridftp)
filename="gridftpdoorSetup"
;;
gsidcap)
filename="gsidcapdoorSetup"
;;
admin)
filename="adminDoorSetup"
;;
*)
filename="${service}Setup"
;;
esac
if [ -f "${DCACHE_CONFIG}/${filename}" ] ; then
RET="${DCACHE_CONFIG}/${filename}"
elif [ -f "${DCACHE_CONFIG}/${filename}-$(uname -n)" ] ; then
RET="${DCACHE_CONFIG}/${filename}-$(uname -n)"
elif [ -f "/etc/${filename}" ] ; then
RET="/etc/${filename}"
else
return 1
fi
}
# Loads a service setup into environment variables prefixed with the
# service name. Only loads the setup file the first time the function
# is called.
loadServiceConfigurationFile() # $1 = service
{
if eval "[ -z \"\$SETUP_$1\" ]"; then
getServiceConfigurationFile "$1" || return
ourHomeDir="${DCACHE_HOME}" readconf "$RET" "$1_" || return
eval "SETUP_$1=1"
fi
}
# Returns configuration value for a service
getServiceConfigurationValue() # $1 = service, $2 = key
{
loadServiceConfigurationFile $1 && eval RET="\${$1_$2}"
}
# Returns the program path used when starting and stopping a service.
getJob() # $1 = service
{
case "${service}" in
srm)
RET="${DCACHE_BIN}/dcache-srm"
;;
dcap)
# $domain has the format 'dcap${door}-${host}Domain'
door=${domain#dcap}
door=${door%-${hostname}Domain}
RET="${DCACHE_JOBS}/door${door}"
;;
xrootd)
RET="${DCACHE_JOBS}/xrootdDoor"
;;
gridftp)
RET="${DCACHE_JOBS}/gridftpdoor"
;;
gsidcap)
RET="${DCACHE_JOBS}/gsidcapdoor"
;;
admin)
RET="${DCACHE_JOBS}/adminDoor"
;;
*)
RET="${DCACHE_JOBS}/${service}"
;;
esac
}
# Starts or stops a given domain.
runDomain() # $1 = domain, $2 = action
{
local domain
local action
local service
local program
local door
domain=$1
action=$2
getService "$1" || return
service="$RET"
getJob "$service"
program="$RET"
if [ ! -x $program ]; then
fail 1 "$program not found. The dCache domain $domain is
probably not configured on this host. If you recently
configured it, then you may need to rerun the
install.sh script to enable it."
fi
case "${service}" in
pool)
${program} -pool=${domain%Domain} ${action}
;;
srm)
${program} ${action}
;;
*)
${program} -domain=${domain} ${action}
;;
esac
}
07070100204c9e000081a4000000650000000a000000014ad73232000005bb000000b600010008ffffffffffffffff0000002600000000reloc/opt/d-cache/share/lib/config.sh # Useful functions for querying the dCache configuration files.
#
# Relies on the utility functions in utils.sh, which must be loaded
# prior to calling any of the following functions.
# Sets RET to the name space server. Blank if name space server is
# not configured.
getNameSpaceServer()
{
RET="$NODE_CONFIG_NAMESPACE_NODE"
if [ -z "${RET}" ] ; then
RET="$NODE_CONFIG_ADMIN_NODE"
if [ ! -z "${RET}" ] ; then
printp "[WARNING] ADMIN_NODE is deprecated. Please use
NAMESPACE_NODE instead." 1>&2
fi
fi
}
# Stores the server ID in RET. The server ID is taken from
# node_config. If not defined, the server ID is the domain name taken
# from /etc/resolv.conf.
getServerId()
{
RET="$NODE_CONFIG_SERVER_ID"
if [ -z "${RET}" ]; then
RET=$domainname
if [ -z "${RET}" ]; then
RET=$(sed -e 's/#.*$//' /etc/resolv.conf | awk '/^[ \t]*search/ { print $2 }')
if [ -z "${RET}" ]; then
RET=$(sed -e 's/#.*$//' /etc/resolv.conf | awk '/^[ \t]*domain/ { print $2 }')
fi
fi
fi
}
# Returns 0 if option is set to 'yes' or 'y' in node_config or
# door_config, 1 otherwise.
isNodeConfigEnabled() # $1 = option name
{
local value
eval value="\$NODE_CONFIG_$1"
case "$(echo $value | tr '[A-Z]' '[a-z]')" in
yes|y)
return 0;
;;
*)
return 1;
;;
esac
}
07070100204c9f000081a4000000650000000a000000014ad73232000009a8000000b600010008ffffffffffffffff0000002300000000reloc/opt/d-cache/share/lib/daemon #!/bin/sh
usage()
{
echo "Usage: $(basename $0) [OPTION]... COMMAND"
echo
echo "Valid options are:"
echo " -d delay between automatic restart"
echo " -p store PID of daemon in "
echo " -r restart daemon on termination unless exists"
echo " -u change effective UID to "
echo " -o redirect output to "
echo " -f fork"
echo
echo "If the output is redirected with -o then this will happen as the"
echo "user invoking daemon, not as the user specified with -u. The"
echo "PID file specified with -p on the other hand is updated by the"
echo "unprivileged user, so the script ensures that the file is writable"
echo "before dropping privileges."
echo
echo "Almost all error messages are redirected when -o is specified,"
echo "including failure to execute the command. The daemon does not fully"
echo "detach from the shell unless -o is specified. Use -o /dev/null if"
echo "the output is not relevant."
exit 2
} 1>&2
run()
{
"$@" &
if [ "$pid" ]; then
echo $! > "$pid"
fi
}
loop()
{
while run "$@"; wait $!; ! [ -f "$restart" ]; do
if [ "$delay" ] ; then
sleep "$delay"
fi
done
}
while getopts d:p:r:u:o:f opt "$@"; do
case $opt in
d) delay="$OPTARG";;
p) pid="$OPTARG";;
r) restart="$OPTARG";;
u) user="$OPTARG";;
o) output="$OPTARG";;
f) fork=1;;
esac
done
shift `expr $OPTIND - 1`
[ $# -lt 1 ] && usage
# Redirect if -o is given
exec > "$output" 2>&1
fi
# Switch user if -u is given
if [ "$user" ]; then
# Make sure the user is able to write to the PID file
if [ "$pid" ]; then
touch "$pid"
chown "$user" "$pid"
fi
# To preserve white space, we need to quote each argument. Notice
# that ${x:+-x "$x"} doesn't work on Solaris due to the space in
# the expression.
param="${fork:+-f} ${pid:+-p} ${pid:+\"$pid\"} ${restart:+-r} ${restart:+\"$restart\"} ${delay:+-d} ${delay:+\"$delay\"}"
for i in "$@"; do
param="$param \"$i\""
done
exec su "$user" -c "/bin/sh \"$0\" $param"
fi
# Run the program
if [ "$restart" ]; then
if [ "$fork" ]; then
loop "$@" &
else
loop "$@"
fi
else
run "$@"
[ "$fork" ] || wait $!
fi
07070100204ca1000081a4000000650000000a000000014ad7323200000291000000b600010008ffffffffffffffff0000002500000000reloc/opt/d-cache/share/lib/paths.sh # Default paths
[ -n "$DCACHE_LIB" ] || DCACHE_LIB="${DCACHE_HOME}/share/lib"
[ -n "$DCACHE_CONFIG" ] || DCACHE_CONFIG="${DCACHE_HOME}/config"
[ -n "$DCACHE_ETC" ] || DCACHE_ETC="${DCACHE_HOME}/etc"
[ -n "$DCACHE_BIN" ] || DCACHE_BIN="${DCACHE_HOME}/bin"
[ -n "$DCACHE_JOBS" ] || DCACHE_JOBS="${DCACHE_HOME}/jobs"
[ -n "$DCACHE_LOCK" ] || DCACHE_LOCK="/var/lock/subsys/dcache"
[ -n "$DCACHE_PID" ] || DCACHE_PID="/var/run"
[ -n "$DCACHE_LOG" ] || DCACHE_LOG="/var/log"
[ -n "$DCACHE_PNFS_ROOT" ] || DCACHE_PNFS_ROOT="/pnfs"
[ -n "$DCACHE_JE" ] || DCACHE_JE="${DCACHE_HOME}/classes/berkeleyDB/je-3.2.76.jar" 07070100204c9d000081a4000000650000000a000000014ad7323200000509000000b600010008ffffffffffffffff0000002700000000reloc/opt/d-cache/share/lib/config.sed # Sed script to put configuration files into a normal form. Handles
# comments, line continuation, white space around equal sign, quoted
# values and spaces in values. Escapes the backslash, quote, backtick
# and dollar symbols. Dollar symbols are not escaped if they are used
# for variable substitution (i.e. they are followed by a alphabetic
# character or an opening curlybrace).
#
# Empty lines and non-assignment lines are stripped.
#
# Does not handle multi-line quoted strings or multible quoted values.
#
# Delete pure comment lines
/^#/ d
# Delete empty lines
/^$/ d
:repeat
# Strip trailing comments
s/\([^\#]*[ ]\)\#.*/\1/
# Repeat on line continuation
/\\$/ {
N
s/\\\n//
b repeat
}
# Strip leading white space
s/^[ ]*//
# Strip trailing white space
s/[ ]*$//
# Strip space around assignment
s/\([^=]*\)[ ]*=[ ]*\(.*\)/\1=\2/
/[^=]*='.*'/ {
# Unquote value
s/\([^=]*\)='\(.*\)'/\1=\2/
# Skip second quoting style
b quoted
}
# Unquote value
s/\([^=]*\)="\(.*\)"/\1=\2/
:quoted
# Escape backslash
s/\\/\\\\/g
# Escape quotes
s/'/\\'/g
# Escape backtick
s/`/\\`/g
# Escape most $
s/\$\([^a-zA-Z_{]\)/\\$\1/g
# Escape trailing $
s/\$$/\\\$/g
# Quote value
s/\([^=]*\)=\(.*\)/\1="\2"/
# Delete if not an assignment
/[a-zA-Z0-9_]*=".*"/ !d
07070100204c75000041ed000000650000000a000000044ad7323800000000000000b600010008ffffffffffffffff0000002800000000reloc/opt/d-cache/share/dCacheConfigure 07070100204c76000041ed000000650000000a000000024ad7323800000000000000b600010008ffffffffffffffff0000003000000000reloc/opt/d-cache/share/dCacheConfigure/modules 07070100204c7d000081a4000000650000000a000000014ad732320000fa53000000b600010008ffffffffffffffff0000004000000000reloc/opt/d-cache/share/dCacheConfigure/modules/config_sedcache # New Yaim Configuration and setup for D-Cache 1.6.6-X 1.7.0, 1.7.1, and 1.8.0
# Maintained by Owen Synge on behalf of Dcache
# Based upon work by
# M Litmaath, M de Riese, J Mencak, J Novak,L Poncent, O Keeble, L Field and M Aart
# which based thier work upon d-cache configuration adapted
# from package d-cache-lcg
# GridPP's testing has been very useful
# This script is based upon earlier work by LHC
# Used variables
# Obligatory: DCACHE_ADMIN=admin_host
# DCACHE_POOLS="pool_node1:[size:]/pool_path1 pool_node2:[size:]/pool_path2"
# ::= [0-9]*
# Optional: DCACHE_PNFS_SERVER=pnfs_host
# Optional: DCACHE_PORT_RANGE="20000,25000"
# Optional: DCACHE_DOOR_SRM="pool_node1[:port]"
# Defaults to Admin nodes
# Optional: DCACHE_DOOR_GSIFTP="pool_node1[:port] pool_node2[:port]"
# Defaults to Door nodes
# Optional: DCACHE_DOOR_GSIDCAP="pool_node1[:port] pool_node2[:port]"
# Defaults to Door nodes
# Optional: DCACHE_DOOR_DCAP="pool_node1[:port] pool_node2[:port]"
# Defaults to Door nodes
# Set this to wipe the postgres databases
# Optional:RESET_DCACHE_RDBMS=yes
#
# Set this to reset the PNFS server
# Optional:RESET_DCACHE_PNFS=yes
#
# Set this to reset the D-cache configuration
# Optional:RESET_DCACHE_CONFIGURATION=yes
# Structure of this script
# functions starting yaim_query_conf
# This script was always designed as a way to make modification easy
# To this end set up questions are placed at the top of the file. This
# is intended to make porting Yaim to debconf or any other cluster wide
# management system easy. These functions are queries that could in
# practice be queries to an interactive installer or a cluster
# management system
#
# functions starting yaim_state
# These functions are to establish the state of the install and direct
# what components are to be installed. They do not change the state
# of uninstalled/installed components
# functions starting yaim_config
## Start of yaim query functions
yaim_query_conf_node_dcache_admin()
{
# Returns 0 when node is not admin node
# Returns 1 when node is admin node
yaimlog DEBUG "function yaim_query_conf_node_dcache_admin start"
local result
local thishost
#Set default result
result=0
if [ -n "${DCACHE_ADMIN}" ] ; then
#Get Host name
thishost=`hostname -f`
if [ "x${DCACHE_ADMIN#$thishost}" == "x" ]; then
result=1
fi
fi
yaimlog DEBUG "function yaim_query_conf_node_dcache_admin stop"
return ${result}
}
yaim_query_conf_node_dcache_name_server()
{
# Returns 0 when node is not a nameserver node
# Returns 1 when node is a nameserver node
local result
local thishost
# badnessCount is used to count duplicate variables
local badnessCount
local nameserverhostname
local usingChimera
local usingPNFS
local usingNamesSpace
result=0
badnessCount=0
if [ -z "${DCACHE_NAME_SERVER}${DCACHE_CHIMERA_SERVER}${DCACHE_PNFS_SERVER}" ] ; then
# No we know that the name server is not defined
yaim_query_conf_node_dcache_admin
result=$?
else
if [ -n "${DCACHE_NAME_SERVER}" ] ; then
nameserverhostname=${DCACHE_NAME_SERVER}
usingNamesSpace=1
fi
if [ -n "${DCACHE_CHIMERA_SERVER}" ] ; then
nameserverhostname=${DCACHE_CHIMERA_SERVER}
usingChimera=1
fi
if [ -n "${DCACHE_PNFS_SERVER}" ] ; then
nameserverhostname=${DCACHE_PNFS_SERVER}
usingPNFS=1
fi
if [ "11" == "${usingPNFS}${usingChimera}" ] ; then
yaimlog ERROR "Both variables DCACHE_PNFS_SERVER and DCACHE_CHIMERA_SERVER are specified."
exit 1
fi
if [ -n "${DCACHE_PNFS_SERVER}${DCACHE_CHIMERA_SERVER}" ] ; then
if [ "${nameserverhostname}" != "${DCACHE_PNFS_SERVER}${DCACHE_CHIMERA_SERVER}" ] ; then
yaimlog ERROR "DCACHE_NAME_SERVER is set and does not match the variables DCACHE_PNFS_SERVER or DCACHE_CHIMERA_SERVER."
echo nameserverhostname=${nameserverhostname}
exit 1
fi
fi
thishost=`hostname -f`
hostspec=$(echo "$nameserverhostname" | grep -o "$thishost[^ ]*")
if [ "x$hostspec" != "x" ]; then
result=1
fi
fi
return ${result}
}
# Returns List of chimera servers. Failing that PNFS servers
# Failing that a list containing just the admin node
# This should only ever be one host, but is a "list" to be consistent
yaim_query_conf_node_dcache_name_server_list()
{
local result
local thishost
RET=""
if [ -z "$DCACHE_CHIMERA_SERVER" ] ; then
if [ -z "$DCACHE_PNFS_SERVER" ] ; then
RET=$DCACHE_ADMIN
else
RET="$DCACHE_PNFS_SERVER"
fi
else
RET="$DCACHE_CHIMERA_SERVER"
fi
}
yaim_query_conf_node_dcache_name_type()
{
local result
yaim_query_conf_node_dcache_pnfsserver_list
if [ -n "${RET}" ] ; then
result="pnfs"
fi
yaim_query_conf_node_dcache_chimeraserver_list
if [ -n "${RET}" ] ; then
result="chimera"
fi
RET=${result}
}
yaim_query_conf_node_dcache_pool()
{
# Returns 0 when node is not pool node
# Returns 1 when node is pool node
local result
local thishost
#Set default result
result=0
#Get Host name
thishost=`hostname -f`
poolspec=`echo "$DCACHE_POOLS" | grep -o "$thishost:[^ ]*"`
if [ "x$poolspec" != "x" ]; then
result=1
fi
return ${result}
}
yaim_query_conf_dcache_pool_node_list()
{
RET=""
for thishost in ${DCACHE_POOLS}
do
RET="$(echo $thishost | cut -d: -f1 ) $RET"
done
}
yaim_query_conf_node_dcache_nameserver_user()
{
# Returns 0 when node is not srm_door node
# Returns 1 when node is srm_door node
local resultset
local result
resultset=""
result=0
yaim_query_conf_node_dcache_admin
resultset=${resultset}$?
yaim_query_conf_node_dcache_name_server
resultset=${resultset}$?
yaim_query_conf_node_dcache_door
resultset=${resultset}$?
if [ -n "$(echo $resultset | grep 1)" ] ; then
result=1
fi
return ${result}
}
# Takes parameters of hostname optionaly
# if not specified uses local host
yaim_query_conf_dcache_pool_node_size_path()
{
tempval=""
RET=""
HOST=$1
if [ -z "$HOST" ] ; then
HOST=`hostname -f`
fi
for thishost in ${DCACHE_POOLS}
do
if [ ! -z "$(echo $thishost | grep $HOST )" ] ; then
if [ ! -z "$(echo $thishost | grep : )" ] ; then
RET="$RET $(echo ${thishost#*:} )"
fi
fi
done
}
yaim_query_conf_dcache_portrange()
{
yaimlog DEBUG "function yaim_query_conf_dcache_portrange start"
local lower
local upper
# Default port_range
RET=50000,52000
if [ "x$DCACHE_PORT_RANGE" != "x" ]; then
lower=`echo "$DCACHE_PORT_RANGE" | sed -e 's/^\([0-9]*\),.*$/\1/' -e 's/.*,.*//'`
upper=`echo "$DCACHE_PORT_RANGE" | sed -e 's/^.*,\([0-9]*\)$/\1/' -e 's/.*,.*//'`
case $lower,$upper in
????*,????*)
RET="$lower,$upper"
;;
*)
echo "[ERROR]: \$DCACHE_PORT_RANGE has illegal format:"
echo "[ERROR]: $DCACHE_PORT_RANGE"
return 2
esac
fi
yaimlog DEBUG "function yaim_query_conf_dcache_portrange stop"
return 0
}
yaim_query_conf_dcache_portrange_gsiftp_server()
{
yaimlog DEBUG "function yaim_query_conf_dcache_portrange_gsiftp_server start"
local lower
local upper
# Default port_range
RET=50000,52000
if [ "x$DCACHE_PORT_RANGE_PROTOCOLS_SERVER_GSIFTP" != "x" ]; then
lower=`echo "$DCACHE_PORT_RANGE_PROTOCOLS_SERVER_GSIFTP" | sed -e 's/^\([0-9]*\),.*$/\1/' -e 's/.*,.*//'`
upper=`echo "$DCACHE_PORT_RANGE_PROTOCOLS_SERVER_GSIFTP" | sed -e 's/^.*,\([0-9]*\)$/\1/' -e 's/.*,.*//'`
case $lower,$upper in
????*,????*)
RET="$lower,$upper"
;;
*)
echo "[ERROR]: \$DCACHE_PORT_RANGE_PROTOCOLS_SERVER_GSIFTP has illegal format:"
echo "[ERROR]: $DCACHE_PORT_RANGE_PROTOCOLS_SERVER_GSIFTP"
return 2
esac
fi
yaimlog DEBUG "function yaim_query_conf_dcache_portrange_gsiftp_server stop"
return 0
}
yaim_query_conf_dcache_portrange_gsiftp_client()
{
yaimlog DEBUG "function yaim_query_conf_dcache_portrange_gsiftp_client start"
local lower
local upper
# Default port_range
RET=60000,62000
if [ "x$DCACHE_PORT_RANGE_PROTOCOLS_CLIENT_GSIFTP" != "x" ]; then
lower=`echo "$DCACHE_PORT_RANGE_PROTOCOLS_CLIENT_GSIFTP" | sed -e 's/^\([0-9]*\),.*$/\1/' -e 's/.*,.*//'`
upper=`echo "$DCACHE_PORT_RANGE_PROTOCOLS_CLIENT_GSIFTP" | sed -e 's/^.*,\([0-9]*\)$/\1/' -e 's/.*,.*//'`
case $lower,$upper in
????*,????*)
RET="$lower,$upper"
;;
*)
echo "[ERROR]: \$DCACHE_PORT_RANGE_PROTOCOLS_CLIENT_GSIFTP has illegal format:"
echo "[ERROR]: $DCACHE_PORT_RANGE_PROTOCOLS_CLIENT_GSIFTP"
return 2
esac
fi
yaimlog DEBUG "function yaim_query_conf_dcache_portrange_gsiftp_client stop"
return 0
}
yaim_query_conf_dcache_portrange_protocols_native()
{
yaimlog DEBUG "function yaim_query_conf_dcache_portrange_protocols_native start"
local lower
local upper
# Default port_range
RET=33115,33215
if [ "x$DCACHE_PORT_RANGE_PROTOCOLS_SERVER_MISC" != "x" ]; then
lower=`echo "$DCACHE_PORT_RANGE_PROTOCOLS_SERVER_MISC" | sed -e 's/^\([0-9]*\),.*$/\1/' -e 's/.*,.*//'`
upper=`echo "$DCACHE_PORT_RANGE_PROTOCOLS_SERVER_MISC" | sed -e 's/^.*,\([0-9]*\)$/\1/' -e 's/.*,.*//'`
case $lower,$upper in
????*,????*)
RET="$lower,$upper"
;;
*)
echo "[ERROR]: \$DCACHE_PORT_RANGE_PROTOCOLS_SERVER_MISC has illegal format:"
echo "[ERROR]: $DCACHE_PORT_RANGE_PROTOCOLS_SERVER_MISC"
return 2
esac
fi
yaimlog DEBUG "function yaim_query_conf_dcache_portrange_protocols_native stop"
return 0
}
yaim_query_conf_node_srm_door()
{
# Returns 0 when node is not srm_door node
# Returns 1 when node is srm_door node
local result
local thishost
local hostspec
result=0
if [ -z "$DCACHE_DOOR_SRM" ] ; then
yaim_query_conf_node_dcache_admin
result=$?
else
thishost=`hostname -f`
hostspec=$(echo "$DCACHE_DOOR_SRM" | grep -o "$thishost[^ ]*")
if [ "x$hostspec" != "x" ]; then
result=1
fi
fi
return ${result}
}
#Returns a string of all host:port pairs that the configuration
#will give cluster wide
yaim_query_conf_dcache_srm_door_node_port_list()
{
local hostlist
local thishost
local thisport
local thishostport
thishost=`hostname -f`
if [ -z "${DCACHE_DOOR_SRM}" ] ; then
RET=${DCACHE_ADMIN}:8443
else
hostlist=$DCACHE_DOOR_SRM
RET=""
for thishostport in ${hostlist}
do
thishost=$(echo ${thishostport} | cut -d: -f1 )
thisport=$(echo ${thishostport} | cut -s -d: -f2 )
if [ -z "${thisport}" ] ; then
thisport=8443
fi
RET="$thishost:$thisport $RET"
done
fi
}
yaim_query_conf_node_srm_door_port()
{
# Returns 0 when node is not a gsidcap node
# Returns 1 when node is a gsidcap node
local thishost
local NodePortList
thishost=`hostname -f`
yaim_query_conf_dcache_srm_door_node_port_list
NodePortList=$RET
RET=""
for ahost in ${NodePortList}
do
if [ "${thishost}" == "${ahost:0:${#thishost}}" ] ; then
RET="${ahost:${#thishost} + 1}"
break
fi
done
if [ -z "$RET" ] ; then
RET=8443
fi
}
yaim_query_conf_node_gsiftp_door()
{
# Returns 0 when node is not a gsiftp door node
# Returns 1 when node is a gsiftp door node
local result
local thishost
local hostspec
thishost=`hostname -f`
result=0
if [ -z "$DCACHE_DOOR_GSIFTP" ] ; then
yaim_query_conf_node_dcache_pool
result=$?
else
thishost=`hostname -f`
hostspec=$(echo "$DCACHE_DOOR_GSIFTP" | grep -o "$thishost[^ ]*")
if [ "x$hostspec" != "x" ]; then
result=1
fi
fi
return ${result}
}
#Returns a string of all host:port pairs that the configuration
#will give cluster wide
yaim_query_conf_dcache_gsiftp_door_node_port_list()
{
local hostlist
local thishost
local thisport
local thishostport
local allreadyadded
thishost=`hostname -f`
if [ -z "$DCACHE_DOOR_GSIFTP" ] ; then
yaim_query_conf_dcache_pool_node_list
thishost=$RET
RET=""
for thishost in ${thishost}
do
allreadyadded=$(echo ${RET} | grep ${thishost})
if [ -z "${allreadyadded}" ] ; then
RET="$thishost:2811 $RET"
fi
done
else
hostlist=$DCACHE_DOOR_GSIFTP
RET=""
for thishostport in ${hostlist}
do
thishost=$(echo ${thishostport} | cut -d: -f1 )
thisport=$(echo ${thishostport} | cut -s -d: -f2 )
if [ -z "${thisport}" ] ; then
thisport=2811
fi
RET="$thishost:$thisport $RET"
done
fi
}
# Gives the local port to run gsiftp upon
yaim_query_conf_node_gsiftp_door_port()
{
# Returns 0 when node is not a gsidcap node
# Returns 1 when node is a gsidcap node
local thishost
local NodePortList
thishost=`hostname -f`
yaim_query_conf_dcache_gsiftp_door_node_port_list
NodePortList=$RET
RET=""
for ahost in ${NodePortList}
do
if [ "${thishost}" == "${ahost:0:${#thishost}}" ] ; then
RET="${ahost:${#thishost} + 1}"
break
fi
done
if [ -z "$RET" ] ; then
RET=2811
fi
}
yaim_query_conf_node_dcap_door()
{
# Returns 0 when node is not a dcap door node
# Returns 1 when node is a dcap door node
local result
local thishost
local hostspec
result=0
thishost=`hostname -f`
if [ -z "$DCACHE_DOOR_DCAP" ] ; then
yaim_query_conf_node_dcache_pool
result=$?
else
thishost=`hostname -f`
hostspec=$(echo "$DCACHE_DOOR_DCAP" | grep -o "$thishost[^ ]*")
if [ "x$hostspec" != "x" ]; then
result=1
fi
fi
return ${result}
}
yaim_query_conf_dcache_dcap_door_node_port_list()
{
local hostlist
local thishost
local thishost
local thishostport
local thisport
local allreadyadded
thishost=`hostname -f`
if [ -z "$DCACHE_DOOR_DCAP" ] ; then
yaim_query_conf_dcache_pool_node_list
hostlist=$RET
RET=""
for thishost in ${hostlist}
do
allreadyadded=$(echo ${RET} | grep ${thishost})
if [ -z "${allreadyadded}" ] ; then
RET="$thishost:22125 $RET"
fi
done
else
hostlist=$DCACHE_DOOR_DCAP
RET=""
for thishostport in ${hostlist}
do
thishost=$(echo ${thishostport} | cut -d: -f1 )
thisport=$(echo ${thishostport} | cut -s -d: -f2 )
if [ -z "${thisport}" ] ; then
thisport=22125
fi
RET="$thishost:$thisport $RET"
done
fi
}
yaim_query_conf_node_dcap_door_port()
{
# Returns 0 when node is not a gsidcap node
# Returns 1 when node is a gsidcap node
local thishost
local NodePortList
thishost=`hostname -f`
yaim_query_conf_dcache_dcap_door_node_port_list
NodePortList=$RET
RET=""
for ahost in ${NodePortList}
do
if [ "${thishost}" == "${ahost:0:${#thishost}}" ] ; then
RET="${ahost:${#thishost} + 1}"
break
fi
done
if [ -z "$RET" ] ; then
RET=22125
fi
}
yaim_query_conf_node_gsidcap_door()
{
# Returns 0 when node is not a gsidcap node
# Returns 1 when node is a gsidcap node
local result
local thishost
local hostspec
result=0
if [ -z "$DCACHE_DOOR_GSIDCAP" ] ; then
yaim_query_conf_node_dcache_pool
result=$?
else
thishost=`hostname -f`
hostspec=$(echo "$DCACHE_DOOR_GSIDCAP" | grep -o "$thishost[^ ]*")
if [ "x$hostspec" != "x" ]; then
result=1
fi
fi
return ${result}
}
yaim_query_conf_dcache_gsidcap_door_node_port_list()
{
local hostlist
local thishost
local thishostport
local thisport
local allreadyadded
if [ -z "$DCACHE_DOOR_GSIDCAP" ] ; then
yaim_query_conf_dcache_pool_node_list
hostlist=$RET
RET=""
for thishost in ${hostlist}
do
allreadyadded=$(echo ${RET} | grep ${thishost})
if [ -z "${allreadyadded}" ] ; then
RET="$thishost:22128 $RET"
fi
done
else
hostlist=$DCACHE_DOOR_GSIDCAP
RET=""
for thishostport in ${hostlist}
do
thishost=$(echo ${thishostport} | cut -d: -f1 )
thisport=$(echo ${thishostport} | cut -s -d: -f2 )
if [ -z "${thisport}" ] ; then
thisport=22128
fi
RET="$thishost:$thisport $RET"
done
fi
}
yaim_query_conf_node_gsidcap_door_port()
{
# Returns 0 when node is not a gsidcap node
# Returns 1 when node is a gsidcap node
local thishost
local NodePortList
thishost=`hostname -f`
yaim_query_conf_dcache_gsidcap_door_node_port_list
NodePortList=$RET
RET=""
for ahost in ${NodePortList}
do
if [ "${thishost}" == "${ahost:0:${#thishost}}" ] ; then
RET="${ahost:${#thishost} + 1}"
break
fi
done
if [ -z "$RET" ] ; then
RET=22128
fi
}
yaim_query_conf_node_xrootd_door()
{
# Returns 0 when node is not a xrootd node
# Returns 1 when node is a xrootd node
local result
local thishost
local hostspec
result=0
if [ -n "$DCACHE_DOOR_XROOTD" ] ; then
thishost=`hostname -f`
hostspec=$(echo "$DCACHE_DOOR_XROOTD" | grep -o "$thishost[^ ]*")
if [ "x$hostspec" != "x" ]; then
result=1
fi
fi
return ${result}
}
yaim_query_conf_dcache_xrootd_door_node_port_list()
{
local hostlist
local thishost
local thishostport
local thisport
local allreadyadded
if [ -z "$DCACHE_DOOR_XROOTD" ] ; then
yaim_query_conf_dcache_pool_node_list
hostlist=$RET
RET=""
for thishost in ${hostlist}
do
allreadyadded=$(echo ${RET} | grep ${thishost})
if [ -z "${allreadyadded}" ] ; then
RET="$thishost:22128 $RET"
fi
done
else
hostlist=$DCACHE_DOOR_XROOTD
RET=""
for thishostport in ${hostlist}
do
thishost=$(echo ${thishostport} | cut -d: -f1 )
thisport=$(echo ${thishostport} | cut -s -d: -f2 )
if [ -z "${thisport}" ] ; then
thisport=1094
fi
RET="$thishost:$thisport $RET"
done
fi
}
yaim_query_conf_node_xrootd_door_port()
{
# Returns 0 when node is not a xrootd node
# Returns 1 when node is a xrootd node
local thishost
local NodePortList
thishost=`hostname -f`
yaim_query_conf_dcache_xrootd_door_node_port_list
NodePortList=$RET
RET=""
for ahost in ${NodePortList}
do
if [ "${thishost}" == "${ahost:0:${#thishost}}" ] ; then
RET="${ahost:${#thishost} + 1}"
break
fi
done
if [ -z "$RET" ] ; then
RET=1094
fi
}
yaim_query_conf_node_dcache_door()
{
# Returns 0 when node is not a door node
# Returns 1 when node is a door node
local resultset
local result
yaimlog DEBUG "function yaim_query_conf_node_dcache_door start"
resultset=""
result=0
yaim_query_conf_node_srm_door
resultset=${resultset}$?
yaim_query_conf_node_gsiftp_door
resultset=${resultset}$?
yaim_query_conf_node_dcap_door
resultset=${resultset}$?
yaim_query_conf_node_gsidcap_door
resultset=${resultset}$?
yaim_query_conf_node_xrootd_door
resultset=${resultset}$?
yaim_query_conf_infoprovider_system
resultset=${resultset}$?
yaim_query_conf_info_system
resultset=${resultset}$?
if [ -n "$(echo $resultset | grep 1)" ] ; then
result=1
fi
yaimlog DEBUG "function yaim_query_conf_node_dcache_door stop"
return ${result}
}
yaim_query_conf_node_dcache_dbserver()
{
# Returns 0 when node is not srm_door node
# Returns 1 when node is srm_door node
local resultset
local result
resultset=""
result=0
yaim_query_conf_node_srm_door
resultset=${resultset}$?
yaim_query_conf_node_dcache_name_server
resultset=${resultset}$?
if [ -n "$(echo $resultset | grep 1)" ] ; then
result=1
fi
return ${result}
}
yaim_query_conf_voms()
{
yaimlog DEBUG "function yaim_query_conf_voms start"
result=0
# Returns 0 if VOMS generation is not available
# Returns 1 if VOMS generation available
if [ -x /opt/d-cache/sbin/dcacheVoms2Gplasma.py ] ; then
result=1
fi
yaimlog DEBUG "function yaim_query_conf_voms stop"
return ${result}
}
yaim_query_conf_kpwd()
{
local result
local filetocheck
result=0
filetocheck=$1
# Returns 0 if VOMS generation is not available
# Returns 1 if VOMS generation available
if [ -x /opt/edg/sbin/edg-mkgridmap ] ; then
if [ -x /opt/d-cache/bin/grid-mapfile2dcache-kpwd ] ; then
result=1
fi
fi
return ${result}
}
yaim_query_conf_modifed_today()
{
# Returns 0 if not modified today
# Returns 1 if modified today
local result
local filetocheck
local currentdate
local seldate
result=0
filetocheck=$1
if [ -f ${filetocheck} ] ; then
currentdate=$(date +%Y-%m-%d)
seldate=$(stat ${filetocheck} | grep Modify | cut -d: -f2- | grep "${currentdate}" )
if [ -z "${seldate}" ] ; then
result=1
else
result=0
fi
fi
}
## End of yaim query functions
## Start of yaim state functions
# Takes parameters of which components need restarting
# Recongnised parameters are "core" "pool" "pnfs" "rdbms" "chimera"
yaim_state_service_restart_needed()
{
local param
local matcher
while [ $# -ne 0 ]
do
param=$1
matcher=$(echo ${YAIM_STATE_DCACHE_RESTART} | grep ${param})
if [ -z "${matcher}" ] ; then
YAIM_STATE_DCACHE_RESTART="${param} ${YAIM_STATE_DCACHE_RESTART}"
fi
shift 1
done
RET=$YAIM_STATE_DCACHE_RESTART
}
yaim_state_nameserver_unmount()
{
local mountedDev
mountedDev=$(mount | grep pnfs | sed -e "s/ .*$//" )
if [ -n "${mountedDev}" ] ; then
umount ${mountedDev}
fi
}
yaim_state_nameserver_stop()
{
yaim_query_conf_node_dcache_name_type
nameserverType=$RET
if [ "${nameserverType}" = "pnfs" ] ; then
config_pnfs_stop
fi
if [ "${nameserverType}" = "chimera" ] ; then
chimera_create_nfs_stop
fi
}
yaim_state_service_restart_needed_do()
{
local has_pnfsserver
local has_rdbms
local has_pnfs
local has_door
local has_admin
local has_pool
local shouldruncore
local rdbms_restart
local pnfs_restart
local chimera_restart
local core_restart
local pool_restart
local ysdrn
rdbms_restart=0
pnfs_restart=0
chimera_restart=0
core_restart=0
pool_restart=0
# Added postgresql in order to solve problems with
# postmaster not listening after initial install
yaim_query_conf_node_dcache_pnfsserver
has_pnfsserver=$?
yaim_query_conf_node_dcache_dbserver
has_rdbms=$?
yaim_query_conf_node_dcache_nameserver_user
has_pnfs=$?
yaim_query_conf_node_dcache_chimera
has_chimera=$?
yaim_query_conf_node_dcache_door
has_door=$?
yaim_query_conf_node_dcache_admin
has_admin=$?
yaim_query_conf_node_dcache_pool
has_pool=$?
for service in $YAIM_STATE_DCACHE_RESTART
do
case "${service}" in
"rdbms" )
rdbms_restart=1
pnfs_restart=1
core_restart=1
pool_restart=1
;;
"pnfs" )
pnfs_restart=1
core_restart=1
pool_restart=1
;;
"chimera" )
chimera_restart=1
core_restart=1
pool_restart=1
;;
"core" )
core_restart=1
pool_restart=1
;;
"pool" )
pool_restart=1
core_restart=1
;;
* )
ysdrn="${service} ${ysdrn}"
;;
esac
done
shouldruncore=${has_door}${has_admin}${has_pnfsserver}${has_chimera}
if [ -n "$(echo "${shouldruncore}${has_pool}" | grep 1)" -a "${core_restart}" == "1" ] ; then
/sbin/service dcache stop
fi
if [ "$has_pnfs" == "1" -a "${pnfs_restart}" == "1" ] ; then
config_pnfs_stop
fi
if [ "$has_chimera" == "1" -a "${chimera_restart}" == "1" ] ; then
chimera_create_nfs_stop
fi
if [ "$has_rdbms" == "1" -a "${rdbms_restart}" == "1" ] ; then
/sbin/service postgresql stop
/sbin/service postgresql start
fi
if [ "$has_pnfs" == "1" -a "${pnfs_restart}" == "1" ] ; then
config_pnfs_start
fi
if [ "$has_chimera" == "1" -a "${chimera_restart}" == "1" ] ; then
chimera_create_nfs_start
fi
if [ -n "$(echo "${shouldruncore}${has_pool}" | grep 1)" -a "${core_restart}" == "1" ] ; then
/sbin/service dcache start
fi
YAIM_STATE_DCACHE_RESTART=${ysdrn}
}
yaim_state_java_path()
{
local javaconf
local javaloc
RET=""
if [ -n "$JAVA_LOCATION" ] ; then
yaimlog INFO "Setting \$JAVA_LOCATION in site-info.def is depricated."
yaimlog INFO "The Java path is now configured through /etc/java/java.conf"
javaloc=${JAVA_LOCATION}/bin/java
if [ -x "${javaloc}" ] ; then
RET=$javaloc
else
yaimlog ERROR "Could not find Java at $javaloc"
exit 1
fi
fi
if [ -z "$RET" ] ; then
javaconf=/etc/java/java.conf
test -f $javaconf && . $javaconf
RET=$JAVA_HOME/bin/java
test -x "$RET" || RET=
[ -z "$RET" ] && RET=`ls /usr/java/j2re*/bin/java 2> /dev/null | tail -n 1`
[ -z "$RET" ] && RET=`ls /usr/java/j2sdk*/bin/java 2> /dev/null | tail -n 1`
[ -z "$RET" ] && RET=`ls /usr/java/jdk*/bin/java 2> /dev/null | tail -n 1`
[ -z "$RET" ] && return 1
fi
return 0
}
yaim_state_reset_dcache_config()
{
# Returns 0 when config is fine
# Returns 1 when config should be reset
local result
result=0
if test "X$RESET_DCACHE_CONFIGURATION" != Xyes
then
if [ ! -f /opt/d-cache/etc/node_config ] ; then
RESET_DCACHE_CONFIGURATION=yes
fi
fi
if [ "X$RESET_DCACHE_CONFIGURATION" == Xyes ]
then
result=1
fi
return $result
}
## End of yaim state functions
## Start of yaim config functions
check_portmap()
{
local PPORT
PPORT=111
if test `netstat -tapn | grep portmap | grep :${PPORT} | wc -l` -eq 0 ; then
return 1
fi
return 0
}
config_sedcache_check_sanity ()
{
yaimlog DEBUG "function config_sedcache_check_sanity start"
# Start portmapper
check_portmap || {
echo "Portmapper is not running, trying to start portmap service." >&2
/sbin/service portmap start
}
check_portmap || {
echo "Portmapper is not running, please start it before running this script." >&2
return $?
}
yaimlog DEBUG "function config_sedcache_check_sanity stop"
}
config_sedcache_start()
{
local rcpnfsserver
local rcrdbms
local rcpnfs
local rcdoor
local rcadmin
local rcpool
local shouldruncore
# Added postgresql in order to solve problems with
# postmaster not listening after initial install
yaim_query_conf_node_dcache_pnfsserver
rcpnfsserver=$?
yaim_query_conf_node_dcache_dbserver
rcrdbms=$?
yaim_query_conf_node_dcache_nameserver_user
rcpnfs=$?
yaim_query_conf_node_dcache_door
rcdoor=$?
yaim_query_conf_node_dcache_admin
rcadmin=$?
yaim_query_conf_node_dcache_pool
rcpool=$?
if [ "$rcpool" == "1" ]
then
/sbin/service dcache stop
fi
shouldruncore=${rcdoor}${rcadmin}${rcpnfsserver}
if [ -n "$(echo $shouldruncore | grep 1)" ] ; then
/sbin/service dcache stop
fi
if [ "$rcpnfs" == "1" ] ; then
config_pnfs_stop
chimera_create_nfs_stop
fi
if [ "$rcrdbms" == "1" ] ; then
/sbin/service postgresql stop
/sbin/service postgresql start
fi
if [ "$rcpnfs" == "1" ] ; then
config_pnfs_start
chimera_create_nfs_start
fi
if [ -n "$(echo $shouldruncore | grep 1)" ] ; then
/sbin/service dcache start
fi
if [ "$rcpool" == "1" ]
then
/sbin/service dcache start
fi
}
config_dcache_config_file_generate_dCacheSetup()
{
yaimlog DEBUG "function config_dcache_config_file_generate_dCacheSetup start"
local SOURCE
local DESTINATION
SOURCE=$1
DESTINATION=$2
yaim_config_file_update_prepare $DESTINATION
file2update=$RET
cp $SOURCE $file2update
yaim_config_file_update_done $DESTINATION
if [ $? == 1 ] ; then
yaimlog WARNING "Changed the file ${DESTINATION}"
yaim_state_service_restart_needed core
fi
yaimlog DEBUG "function config_dcache_config_file_generate_dCacheSetup stop"
}
config_dcache_config_file_generate_node_config()
{
local SOURCE
local DESTINATION
local tmptrue
local file2update
SOURCE=$1
DESTINATION=$2
yaim_config_file_update_prepare $DESTINATION
file2update=$RET
cp $SOURCE $file2update
yaim_config_file_update_done $DESTINATION
if [ $? == 1 ] ; then
yaimlog WARNING "Changed the file ${DESTINATION}"
yaim_state_service_restart_needed core
fi
}
config_dcache_config_pools()
{
yaimlog DEBUG "function config_dcache_config_pools start"
#local file2update
#yaim_config_file_update_prepare ${DESTINATION}
#file2update=$RET
#rm -f ${file2update}
#touch ${file2update}
yaim_query_conf_dcache_pool_node_size_path
localpools=$RET
#echo YYYYYYYYYYYYYYYYYYYY $localpools
let alreadyexistingpools=`/opt/d-cache/bin/dcache pool ls | wc -l`
let alreadyexistingpools="$alreadyexistingpools-3"
for poolspec in `echo $localpools`
do
yaimlog DEBUG "processing pool=$poolspec"
pool=${poolspec##*:}
size=${poolspec%%:*}
#echo pool=$pool
#echo size=$size
if [ "${pool:0:1}" != "/" ]; then
echo "[ERROR]: pool path must be absolute:"
echo "[ERROR]: $poolspec"
exit 1
fi
if [ "$pool" == "$size" ] ; then
size=0
fi
if [ ! -d "${pool}" ] ; then
mkdir -p $pool
if test "x$size" = x || test $size -eq 0 ; then
size=`df -k $pool | awk 'NR == 2 { print int($4 / 1024 / 1024) }'`
fi
rmdir $pool
if [ $size -lt 4 ] ; then
yaimlog WARNING "pool size must be larger than 4Gb"
else
poolExists=$( /opt/d-cache/bin/dcache pool ls | grep ${pool} )
if [ -z "$poolExists" ] ; then
/opt/d-cache/bin/dcache pool create ${size}G ${pool}
poolcreaterc=$?
if [ "$poolcreaterc" == "0" ] ; then
notnamed="0"
while [ ${notnamed} == "0" ]
do
poolname=`hostname`_${alreadyexistingpools}
poolExists=$( /opt/d-cache/bin/dcache pool ls | grep ${poolname} )
if [ -z "$poolExists" ] ; then
/opt/d-cache/bin/dcache pool add ${poolname} ${pool}
namedPoolrc=$?
if [ "${namedPoolrc}" == "0" ] ; then
yaim_state_service_restart_needed pool
notnamed="1"
fi
else
yaimlog INFO "Pool name ${poolname} already exists creating new pool name."
fi
# Now we add 1 to the number of the next pool cell name
let alreadyexistingpools="$alreadyexistingpools+1"
done
fi
else
yaimlog ERROR "${poolExists}"
fi
fi
fi
done
yaimlog DEBUG "function config_dcache_config_pools stop"
}
config_dcache_config_file()
{
yaimlog DEBUG "function config_dcache_config_file start"
local FILETOPROCESS
local DIRECTORY
local DESTFILE
local pairentdir
local uniqueId
local GENERATE
FILETOPROCESS=$1
DIRECTORY=$(dirname $FILETOPROCESS)
#echo DIRECTORY=$DIRECTORY
#Note "uniqueId" is made up of file name and pairent dir as files are not unique enough
#uniqueId
DESTFILE=$(basename $FILETOPROCESS | sed -e "s/\.temp.*$//")
pairentdir=$(basename ${DIRECTORY} )
uniqueId="${pairentdir}/${DESTFILE}"
if [ ! -f ${FILETOPROCESS} ]
then
GENERATE=yes
fi
if test "X$RESET_DCACHE_CONFIGURATION" = Xyes
then
GENERATE=yes
fi
if [ "X${GENERATE}" == Xyes ]
then
yaimlog DEBUG "Generating ${DIRECTORY}/${DESTFILE}"
case "${uniqueId}" in
"config/dCacheSetup")
config_dcache_config_file_generate_dCacheSetup "${FILETOPROCESS}" "${DIRECTORY}/${DESTFILE}"
;;
"etc/dCacheSetup")
# See function config_dcache_config_template_files
# for details!
yaimlog DEBUG "To avoid confusion skipping '${FILETOPROCESS}'"
;;
"config/defaultPools.poollist.temp")
yaimlog DEBUG "Skipping config/defaultPools.poollist"
;;
"etc/node_config")
config_dcache_config_file_generate_node_config "${FILETOPROCESS}" "${DIRECTORY}/${DESTFILE}"
;;
"etc/dcache.kpwd")
yaimlog DEBUG "Generated by cron so skipping '${FILETOPROCESS}'"
;;
* )
#cp ${FILETOPROCESS} ${DIRECTORY}/${DESTFILE}
yaimlog DEBUG "Skipping ${FILETOPROCESS}"
;;
esac
fi
yaimlog DEBUG "function config_dcache_config_file stop"
}
config_dcache_config_template_files()
{
#This is a nasty hack to fix a document bug in D-Cache 1.6.6-*
# to quote form the D-Cache book.
# The central configuration file of a dCache instance is
# /opt/d-cache/config/dCacheSetup. For most installation
# it is only necessary to set the variable java to the
# binary of the java VM and the variable serviceLocatorHost
# to the hostname of the admin node. Note that the file has
# to go into the subdirectory config/ even though the
# template is found in etc/.
local etctmpfile
local configtmpfile
local etctmpfilecs
local configtmpfilecs
etctmpfile=${INSTALL_ROOT}/d-cache/etc/dCacheSetup.template
configtmpfile=${INSTALL_ROOT}/d-cache/config/dCacheSetup.template
if [ ! -f configtmpfile ] ; then
cp ${etctmpfile} ${configtmpfile}
fi
etctmpfilecs=$(md5sum $etctmpfile)
configtmpfilecs=$(md5sum $configtmpfile)
if [ "$etctmpfilecs" != "$configtmpfilecs" ] ; then
cp ${etctmpfile} ${configtmpfile}
fi
}
config_dcache_config_files()
{
yaimlog DEBUG "function config_dcache_config_files start"
local tmptrue
local dir
yaim_state_reset_dcache_config
tmptrue=$?
if [ "x${tmptrue}" == "x1" ] ;then
dir=${INSTALL_ROOT}/d-cache
config_dcache_config_template_files
FILES_TO_PROCESS=`ls ${INSTALL_ROOT}/d-cache/etc/*.template ${INSTALL_ROOT}/d-cache/config/*template`
for FILE in $FILES_TO_PROCESS
do
config_dcache_config_file $FILE
done
else
echo Skipping D-Cache configuration file reset
fi
yaimlog DEBUG "function config_dcache_config_files stop"
}
config_dcache_config_system_files_init()
{
yaimlog DEBUG "function config_dcache_config_system_files_init start"
local dir
local pnfs
local rcpnfs
local rcdoor
local rcadmin
local rcpool
local runcore
local install
local rcchimera
dir=${INSTALL_ROOT}/d-cache
yaim_query_conf_node_dcache_pnfs_root
pnfs=${RET}
yaim_query_conf_node_dcache_chimera
rcchimera=$?
yaim_query_conf_node_dcache_pnfsserver
rcpnfs=$?
yaim_query_conf_node_dcache_door
rcdoor=$?
yaim_query_conf_node_dcache_admin
rcadmin=$?
yaim_query_conf_node_dcache_pool
rcpool=$?
if [ "$rcpnfs" == "1" ]
then
config_sepnfs_installed
ln -fs $pnfs/bin/pnfs /etc/init.d
chkconfig pnfs on
fi
if [ "$rcchimera" == "1" ]
then
chimera_create_link
fi
runcore=${rcdoor}${rcadmin}${rcpnfs}${rcchimera}
if [ -n "$(echo "$runcore$rcpool" | grep 1)" ] ; then
ln -fs $dir/bin/dcache /etc/init.d
chkconfig dcache on
fi
yaimlog DEBUG "function config_dcache_config_system_files_init stop"
}
config_dcache_config_system_files()
{
yaimlog DEBUG "function config_dcache_config_system_files start"
#config_dcache_config_system_files_fstab
yaimlog DEBUG "function config_dcache_config_system_files stop"
}
config_dcache_config_dcache_scripts()
{
yaimlog DEBUG "function config_dcache_config_dcache_scripts start"
local dir
local retcode
dir=${INSTALL_ROOT}/d-cache
$dir/install/install.sh
retcode=$?
if [ "$retcode" != "0" ] ; then
echo "ERROR executing $dir/install/install.sh failed (exit code $retcode) -- abort"
exit 1
fi
yaimlog DEBUG "function config_dcache_config_dcache_scripts stop"
}
config_sedcache_cron_add_voms()
{
local minute
local h1
local h2
local h3
local h4
local jobtime
local job
let minute="$RANDOM%60"
let h1="$RANDOM%6"
let h2="$h1+6"
let h3="$h1+12"
let h4="$h1+18"
query=$1
jobtime="$minute $h1,$h2,$h3,$h4 * * * "
job="${INSTALL_ROOT}/d-cache/sbin/dcacheVoms2Gplasma.py \
-r -a -c ${INSTALL_ROOT}/d-cache/etc/dcacheVoms2Gplasma.conf"
if [ "${query}" == "query" ] ; then
job="${job} -q"
fi
# Now remove cron job
rm -f ${CRON_DIR:-/etc/cron.d}/dcacheVoms2Gplasma
# Now replace cron job
${job}
cron_job dcacheVoms2Gplasma root "${jobtime}${job}"
}
config_sedcache_cron_add_kpwd()
{
local minute
local h1
local h2
local h3
local h4
local jobtime
local job
let minute="$RANDOM%60"
let h1="$RANDOM%6"
let h2="$h1+6"
let h3="$h1+12"
let h4="$h1+18"
jobtime="$minute $h1,$h2,$h3,$h4 * * * "
job="${INSTALL_ROOT}/edg/sbin/edg-mkgridmap \
--output=/etc/grid-security/grid-mapfile --safe ; \
${INSTALL_ROOT}/d-cache/bin/grid-mapfile2dcache-kpwd"
# Now remove cron job
rm -f ${CRON_DIR:-/etc/cron.d}/edg-mkgridmap
${job}
# Now replace cron job
cron_job edg-mkgridmap root "${jobtime}${job}"
}
config_sedcache_cron()
{
yaimlog DEBUG "function config_sedcache_cron start"
local minute
local h1
local h2
local h3
local h4
local job
local outfile
local configfile
local rgma_user
local rcNameServer
local file2update
local todaysDate
local thisVo
local pnfsbasedir
let minute="$RANDOM%60"
let h1="$RANDOM%6"
let h2="$h1+6"
let h3="$h1+12"
let h4="$h1+18"
yaim_query_conf_voms
usevoms=$?
yaim_query_conf_kpwd
usekpwd=$?
if [ "${usekpwd}${usevoms}" == "11" ] ; then
config_sedcache_cron_add_kpwd
config_sedcache_cron_add_voms
fi
if [ "${usekpwd}${usevoms}" == "10" ] ; then
config_sedcache_cron_add_kpwd
fi
if [ "${usekpwd}${usevoms}" == "01" ] ; then
config_sedcache_cron_add_voms query
fi
if [ "${usekpwd}${usevoms}" == "00" ] ; then
yaimlog WARNING "both kpwd and voms are not set up by YAIM"
fi
## Information Provider
# Creating script for dynamic info generation
outfile=$INSTALL_ROOT/lcg/var/gip/plugin/lcg-info-dynamic-se
configfile=$INSTALL_ROOT/lcg/var/gip/ldif/static-file-SE.ldif
if [ -f $configfile ]; then
yaimlog ABORT "$configfile does not exist"
cat <$outfile
#!/bin/sh
#
# Script dynamically generated by YAIM function ${FUNCNAME[0]}
#
${INSTALL_ROOT}/lcg/libexec/lcg-info-dynamic-dcache $configfile
EOF
chmod +x $outfile
fi
# Crontab entry to have up-to-date proxy for dynamic info query
if [ -x ${INSTALL_ROOT}/globus/bin/grid-proxy-init ] ; then
job="7 * * * * ${INSTALL_ROOT}/globus/bin/grid-proxy-init -q \
-cert /etc/grid-security/hostcert.pem \
-key /etc/grid-security/hostkey.pem -out ${INSTALL_ROOT}/lcg/hostproxy.\$$ && \
chown edginfo ${INSTALL_ROOT}/lcg/hostproxy.\$$ && \
mv -f ${INSTALL_ROOT}/lcg/hostproxy.\$$ ${INSTALL_ROOT}/lcg/hostproxy"
cron_job edginfo-proxy root "$job"
echo "$job" | sed 's|[^/]*||' | sh
rgma_user=rgma
job="8 * * * * ${INSTALL_ROOT}/globus/bin/grid-proxy-init -q \
-cert /etc/grid-security/hostcert.pem \
-key /etc/grid-security/hostkey.pem -out ${INSTALL_ROOT}/lcg/hostproxy.\$$ && \
chown $rgma_user ${INSTALL_ROOT}/lcg/hostproxy.\$$ && \
mv -f ${INSTALL_ROOT}/lcg/hostproxy.\$$ ${INSTALL_ROOT}/lcg/hostproxy.$rgma_user"
cron_job rgma-proxy root "$job"
fi
echo "$job" | sed 's|[^/]*||' | sh
config_sepnfs_cron
yaimlog DEBUG "function config_sedcache_cron stop"
}
config_dcache_kpwd_update()
{
yaimlog DEBUG "function config_dcache_kpwd_update start"
local rcdoor
local currentdate
local seldate
local fileneeds_update
local gridmapfileloc
local gridmapfile2dcache
gridmapfile2dcache=/opt/d-cache/bin/grid-mapfile2dcache-kpwd
gridmapfileloc=/etc/grid-security/grid-mapfile
if [ -f ${gridmapfileloc} ] ; then
fileneeds_update=0
currentdate=$(date +%Y-%m-%d)
seldate=$(stat ${gridmapfileloc} | grep Modify | cut -d: -f2- | grep "${currentdate}" )
if [ -z "${seldate}" ] ; then
fileneeds_update=1
fi
else
fileneeds_update=1
fi
if [ "$fileneeds_update" == "1" ] ; then
if [ -x /opt/edg/sbin/edg-mkgridmap ] ; then
/opt/edg/sbin/edg-mkgridmap --output=${gridmapfileloc} --safe
fi
fi
if [ -f ${gridmapfile2dcache} ] ; then
${gridmapfile2dcache}
fi
yaimlog DEBUG "function config_dcache_kpwd_update stop"
}
config_dcache_gen_voms2gplasmaconf_header()
{
file2update=$1
if [ "X${file2update}" == "X" ] ; then
yaimlog ERROR "config_dcache_gen_voms2gplasmaconf_header called with no parameter"
exit 1
fi
echo "# grid-vorolemap path" >> ${file2update}
echo "vorolemap /etc/grid-security/grid-vorolemap" >> ${file2update}
echo >> ${file2update}
echo "# authzdb path" >> ${file2update}
echo "authzdb /etc/grid-security/storage-authzdb" >> ${file2update}
echo >> ${file2update}
}
config_dcache_gen_voms2gplasmaconf()
{
yaimlog DEBUG "function config_dcache_gen_voms2gplasmaconf start"
local dcacheVoms2GplasmaConf
local confexists
local file2update
dcacheVoms2GplasmaConf=$1
confexists=0
if [ -f "${dcacheVoms2GplasmaConf}" ] ; then
confexists=1
yaim_config_file_update_prepare ${dcacheVoms2GplasmaConf}
file2update=$RET
yaim_state_reset_dcache_config
rcupdateconfig=$?
if [ "$rcupdateconfig" == "1" ]; then
rm -f ${file2update}
config_dcache_gen_voms2gplasmaconf_header ${file2update}
fi
else
file2update=${dcacheVoms2GplasmaConf}
config_dcache_gen_voms2gplasmaconf_header ${file2update}
fi
for thisvo in $(echo $VOS)
do
voupper=$(echo $thisvo | tr '[:lower:].\-' '[:upper:]__')
thisvoserversel="VO_${voupper}_VOMS_SERVERS"
#echo thisvoserversel=$thisvoserversel
thisvoserverlist=$(eval echo '$'`echo $thisvoserversel`)
# Now we must iterate through each of the servers.
split_quoted_variable $thisvoserverlist | while read thisvoserver; do
#echo thisvoserver=$thisvoserver
#vomss://voms.cern.ch:8443/voms/lhcb?/lhcb/ ->
#https://voms.cern.ch:8443/voms/ops/services/VOMSCompatibility?method=getGridmapUsers&container=/ops
transvoserver=$(echo $thisvoserver | sed -e "s/\/$//" | sed -e "s/vomss/https/" | sed -e "s/\?/\/services\/VOMSCompatibility\?method=getGridmapUsers\&container=/" )
users_VoFlagGetsNames ${thisvo}
VoFlagGetsNamesRC=$?
username=`echo "$RET" | head -1`
if [ "${VoFlagGetsNamesRC}" != "0" ] ; then
yaimlog ERROR "VoFlagGetsNames ${thisvo} returned an error exiting."
exit 1
fi
if [ -z "${username}" ] ; then
yaimlog WARNING "VoFlagGetsNames vo="${thisvo}" returned no users so not supporting this VO."
yaimlog WARNING "Please check the \$USERS_CONF in site-info.def and that the file exists and contains an entry for ${thisvo} with no flags."
continue
fi
users_NameGetsUid ${username}
useridexists=$?
userid="$RET"
users_NameGetsGid ${username}
groupIdExistsRc=$?
if [ "${groupIdExistsRc}" != "0" ] ; then
yaimlog ERROR "users_NameGetsGid ${thisvo} returned an error exiting."
exit 1
fi
groupid=$(echo "$RET" | cut -d, -f1 )
if [ "0" == "${useridexists}" ] ; then
allreadyhere=$(grep "$transvoserver" ${file2update})
if [ -z "${allreadyhere}" ] ; then
echo >> ${file2update}
echo "# Mapping ${thisvo} members to ${username} uid=${userid} gid=${groupid}" >> ${file2update}
echo "group ${transvoserver} ${username} ${userid} ${groupid}" >> ${file2update}
echo >> ${file2update}
fi
fi
users_VoGetsFlags ${thisvo}
VoGetsFlagsRc=$?
VoFlags=$RET
if [ "${VoGetsFlagsRc}" != "0" ] ; then
yaimlog ERROR "users_VoGetsFlags ${thisvo} had an error skipping processing the rest of the VO."
exit 1
fi
for VoFlag in ${VoFlags}
do
mappedValue=""
if [ "${VoFlag}" == "sgm" ] ; then
mappedValue="/Role=lcgadmin"
fi
if [ "${VoFlag}" == "prd" ] ; then
mappedValue="/Role=production"
fi
users_VoFlagGetsNames ${thisvo} ${VoFlag}
VoFlagGetsNamesRC=$?
username=`echo "$RET" | head -1`
if [ "${VoFlagGetsNamesRC}" != "0" ] ; then
yaimlog ERROR "VoFlagGetsNames vo=${thisvo} role=${mappedValue} retrurned an error exiting."
exit 1
fi
if [ -z "${username}" ] ; then
yaimlog WARNING "VoFlagGetsNames vo=${thisvo} role=${mappedValue} returned no users so not supporting this VO role."
continue
fi
users_NameGetsUid ${username}
useridexists=$?
userid="$RET"
users_NameGetsGid ${username}
groupIdExistsRc=$?
if [ "${groupIdExistsRc}" != "0" ] ; then
yaimlog ERROR "users_NameGetsGid ${thisvo} returned an error exiting."
exit 1
fi
groupid=$(echo "$RET" | cut -d, -f1 )
if [ "0" == "${useridexists}" ] ; then
allreadyhere=$(grep "${transvoserver}${mappedValue}" ${file2update})
if [ -z "${allreadyhere}" ] ; then
echo >> ${file2update}
echo "# Mapping ${thisvo}${mappedValue} members to ${username} uid=${userid} gid=${groupid}" >> ${file2update}
echo "group ${transvoserver}${mappedValue} ${username} ${userid} ${groupid}" >> ${file2update}
echo >> ${file2update}
fi
else
yaimlog ERROR "users_NameGetsUid could not find UID for ${username}."
exit 1
fi
done
done
done
if [ "${confexists}" == "1" ] ; then
yaim_config_file_update_done ${dcacheVoms2GplasmaConf}
if [ $? == 1 ] ; then
yaimlog WARNING "Changed the file ${dcacheVoms2GplasmaConf}"
fi
fi
yaimlog DEBUG "function config_dcache_gen_voms2gplasmaconf stop"
}
config_dcache_vorolemap_authz_update()
{
yaimlog DEBUG "function config_dcache_vorolemap_authz_update start"
local rcupdatedauthz
local rcupdatedvorolemap
local rcupdateconfig
local dcacheVoms2GplasmaConf
local authzfile
local vorolemap
authzfile=/etc/grid-security/storage-authzdb
vorolemap=/etc/grid-security/grid-vorolemap
dcacheVoms2GplasmaConf=/opt/d-cache/etc/dcacheVoms2Gplasma.conf
yaim_query_conf_modifed_today ${authzfile}
rcupdatedauthz=$?
yaim_query_conf_modifed_today ${vorolemap}
rcupdatedvorolemap=$?
# check config for dcacheVoms2Gplasma
if [ -f "${dcacheVoms2GplasmaConf}" ] ; then
# check config for dcacheVoms2Gplasma exists
yaim_state_reset_dcache_config
rcupdateconfig=$?
if [ "$rcupdateconfig" == "1" ]; then
# update config for dcacheVoms2Gplasma
config_dcache_gen_voms2gplasmaconf ${dcacheVoms2GplasmaConf}
fi
else
# create config for dcacheVoms2Gplasma
config_dcache_gen_voms2gplasmaconf ${dcacheVoms2GplasmaConf}
fi
if [ "${rcupdatedauthz}" == "1" ] ;then
# generate authz
/opt/d-cache/sbin/dcacheVoms2Gplasma.py -a -c ${dcacheVoms2GplasmaConf}
fi
if [ "${rcupdatedvorolemap}" == "1" ] ;then
# generate
/opt/d-cache/sbin/dcacheVoms2Gplasma.py -rq -c ${dcacheVoms2GplasmaConf}
fi
yaimlog DEBUG "function config_dcache_vorolemap_authz_update stop"
}
yaim_config_pool_manager_add_lines()
{
yaimlog DEBUG "function yaim_config_pool_manager_add_lines start"
local file_location_poolmanager
local file2update
local vodone
local linksearch
local linkdone
file_location_poolmanager=/opt/d-cache/config/PoolManager.conf
yaim_config_file_update_prepare ${file_location_poolmanager}
file2update=$RET
for thiscurrentvo in ${VOS}
do
vosearch="# This section is for ${thiscurrentvo}"
vodone=$(grep "${vosearch}" ${file2update})
if [ -z "${vodone}" ] ; then
echo "#" >> ${file2update}
echo "${vosearch}" >> ${file2update}
echo "#" >> ${file2update}
echo psu create pgroup ${thiscurrentvo} >> ${file2update}
echo >> ${file2update}
fi
linksearch="# This section is for ${thiscurrentvo} link"
linkdone=$(grep "${linksearch}" ${file2update})
if [ -z "${linkdone}" ] ; then
echo "" >> ${file2update}
echo "${linksearch}" >> ${file2update}
echo "" >> ${file2update}
echo "psu create unit -store ${thiscurrentvo}:STATIC@osm" >> ${file2update}
echo "psu create unit -store ${thiscurrentvo}:GENERATED@osm" >> ${file2update}
echo "" >> ${file2update}
echo "psu addto ugroup any-store ${thiscurrentvo}:STATIC@osm" >> ${file2update}
echo "psu addto ugroup any-store ${thiscurrentvo}:GENERATED@osm" >> ${file2update}
echo "" >> ${file2update}
echo "psu create ugroup ${thiscurrentvo}-groups " >> ${file2update}
echo "psu addto ugroup ${thiscurrentvo}-groups ${thiscurrentvo}:STATIC@osm" >> ${file2update}
echo "psu addto ugroup ${thiscurrentvo}-groups ${thiscurrentvo}:GENERATED@osm" >> ${file2update}
echo >> ${file2update}
echo "psu create link ${thiscurrentvo}-link world-net ${thiscurrentvo}-groups" >> ${file2update}
echo "psu set link ${thiscurrentvo}-link -readpref=20 -writepref=20 -cachepref=20" >> ${file2update}
echo "psu add link ${thiscurrentvo}-link ${thiscurrentvo}" >> ${file2update}
echo >> ${file2upd