databases/leofs: Remove due to obsolescence
LeoFS doesn't have an upstream release in years, and depends on an obsolete and unsupported version of Erlang. Approved by: erlang Sponsored by: SkunkWerks, GmbH
This commit is contained in:
@@ -5304,3 +5304,4 @@ lang/erlang-runtime23|lang/erlang-runtime28|2026-05-14|Has expired: no longer su
|
||||
lang/erlang-runtime24|lang/erlang-runtime28|2026-05-14|Has expired: no longer supported upstream, use lang/erlang >=28
|
||||
lang/erlang-runtime25|lang/erlang-runtime28|2026-05-14|Has expired: no longer supported upstream, use lang/erlang >=28
|
||||
lang/erlang-runtime26|lang/erlang-runtime28|2026-05-14|Has expired: no longer supported upstream, use lang/erlang >=28
|
||||
databases/leofs||2026-05-14|Has expired: no longer maintained upstream, with no supported OTP release
|
||||
|
||||
@@ -1,245 +0,0 @@
|
||||
PORTNAME= leofs
|
||||
DISTVERSION= 1.4.3
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= databases
|
||||
DIST_SUBDIR= ${PORTNAME}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Highly scalable, fault-tolerant distributed file system
|
||||
WWW= https://leo-project.net/
|
||||
|
||||
LICENSE= APACHE20
|
||||
|
||||
NOT_FOR_ARCHS= riscv64
|
||||
NOT_FOR_ARCHS_REASON= does not build: error Please implement AtomicPointer for this platform
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/lib/erlang21/bin/erlc:lang/erlang-runtime21 \
|
||||
${LOCALBASE}/bin/cmake:devel/cmake-core \
|
||||
${LOCALBASE}/lib/libcheck.a:devel/check
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= leo-project
|
||||
|
||||
LEOFS_USER= leofs
|
||||
LEOFS_GROUP= leofs
|
||||
USERS= ${LEOFS_USER}
|
||||
GROUPS= ${LEOFS_GROUP}
|
||||
|
||||
LEOFS_ETCDIR= ${ETCDIR}
|
||||
LEOFS_BASEDIR= ${PREFIX}/lib/${PORTNAME}
|
||||
LEOFS_DBDIR= /var/db/${PORTNAME}
|
||||
LEOFS_LOGDIR= /var/log/${PORTNAME}
|
||||
LEOFS_RUNDIR= /var/run/${PORTNAME}
|
||||
|
||||
LEOFS_SBIN_FILES= \
|
||||
leo_gateway \
|
||||
leo_manager \
|
||||
leo_manager_slave \
|
||||
leo_storage \
|
||||
leofs
|
||||
|
||||
PLIST_SUB+= LEOFS_USER=${LEOFS_USER} \
|
||||
LEOFS_GROUP=${LEOFS_GROUP} \
|
||||
LEOFS_DBDIR=${LEOFS_DBDIR} \
|
||||
LEOFS_LOGDIR=${LEOFS_LOGDIR} \
|
||||
LEOFS_RUNDIR=${LEOFS_RUNDIR}
|
||||
|
||||
SUB_LIST+= LEOFS_USER=${LEOFS_USER} \
|
||||
LEOFS_GROUP=${LEOFS_GROUP} \
|
||||
LEOFS_ETCDIR=${LEOFS_ETCDIR} \
|
||||
LEOFS_BASEDIR=${LEOFS_BASEDIR} \
|
||||
LEOFS_DBDIR=${LEOFS_DBDIR} \
|
||||
LEOFS_LOGDIR=${LEOFS_LOGDIR} \
|
||||
LEOFS_RUNDIR=${LEOFS_RUNDIR}
|
||||
|
||||
SUB_FILES+= ${LEOFS_SBIN_FILES:S/^/sbin-/}
|
||||
|
||||
USES= dos2unix gmake pkgconfig ssl
|
||||
USE_CXXSTD= gnu++11
|
||||
USE_RC_SUBR= ${PORTNAME}
|
||||
|
||||
DOS2UNIX_FILES= apps/leo_*/snmp/snmpa_*/leo_*_snmp.config
|
||||
|
||||
ALL_TARGET= release
|
||||
MAKE_JOBS_UNSAFE=yes
|
||||
MAKE_ENV= PATH=${LOCALBASE}/lib/erlang21/bin:${PATH}
|
||||
|
||||
LEOFS_DEPS= \
|
||||
DeadZen/goldrush=0.1.9:goldrush \
|
||||
davisp/jiffy=0.15.2:jiffy \
|
||||
eproxus/meck=0.8.12:meck \
|
||||
erlangpack/bcrypt=1.0.1:bcrypt \
|
||||
esl/elarm=5885c90:elarm \
|
||||
ferd/recon=2.3.1:recon \
|
||||
leo-project/bear=0.8.2-for-leofs:bear \
|
||||
leo-project/cowboy=for-leofs-1.4:cowboy \
|
||||
leo-project/eleveldb=2.0.37:eleveldb \
|
||||
leo-project/erlpass=612f487:erlpass \
|
||||
leo-project/erpcgen=0.2.7:erpcgen \
|
||||
leo-project/folsom=0.8.2.3:folsom \
|
||||
leo-project/lager=574d64a:lager \
|
||||
leo-project/leo_backend_db=1.2.31:leo_backend_db \
|
||||
leo-project/leo_cache=0.8.12:leo_cache \
|
||||
leo-project/leo_commons=1.2.1:leo_commons \
|
||||
leo-project/leo_dcerl=0.4.11:leo_dcerl \
|
||||
leo-project/leo_logger=1.3.8:leo_logger \
|
||||
leo-project/leo_mcerl=0.6.9:leo_mcerl \
|
||||
leo-project/leo_mq=1.5.19:leo_mq \
|
||||
leo-project/leo_object_storage=1.3.38:leo_object_storage \
|
||||
leo-project/leo_ordning_reda=1.2.11:leo_ordning_reda \
|
||||
leo-project/leo_pod=0.6.10:leo_pod \
|
||||
leo-project/leo_redundant_manager=1.9.64:leo_redundant_manager \
|
||||
leo-project/leo_rpc=0.10.18:leo_rpc \
|
||||
leo-project/leo_s3_libs=1.2.21:leo_s3_libs \
|
||||
leo-project/leo_statistics=1.1.23:leo_statistics \
|
||||
leo-project/leo_tran=0.2.14:leo_tran \
|
||||
leo-project/leo_watchdog=1.0.7:leo_watchdog \
|
||||
leo-project/leveldb=a9327e8:leveldb \
|
||||
leo-project/libcutil=0.5.1:libcutil \
|
||||
leo-project/nfs_rpc_server=0.2.7:nfs_rpc_server \
|
||||
leo-project/savanna_agent=0.4.26:savanna_agent \
|
||||
leo-project/savanna_commons=0.10.12:savanna_commons \
|
||||
manopapad/proper=f558989:proper \
|
||||
ninenines/cowlib=1.0.0:cowlib \
|
||||
ninenines/ranch=1.0.0:ranch \
|
||||
systemd/erlang-sd_notify=v1.0:sd_notify \
|
||||
|
||||
GH_TUPLE= ${LEOFS_DEPS:C,(.*)/(.*)=(.*):(.*),\1:\2:\3:\4/deps/\4,}
|
||||
|
||||
CFLAGS_aarch64= -DLEVELDB_CSTDATOMIC_PRESENT
|
||||
CFLAGS_armv6= -DLEVELDB_CSTDATOMIC_PRESENT
|
||||
CFLAGS_armv7= -DLEVELDB_CSTDATOMIC_PRESENT
|
||||
CFLAGS_powerpc= -DLEVELDB_CSTDATOMIC_PRESENT
|
||||
CFLAGS_powerpc64= -DLEVELDB_CSTDATOMIC_PRESENT
|
||||
CFLAGS_powerpc64le= -DLEVELDB_CSTDATOMIC_PRESENT
|
||||
CFLAGS_powerpcspe= -DLEVELDB_CSTDATOMIC_PRESENT
|
||||
|
||||
post-extract:
|
||||
.for dep in ${LEOFS_DEPS}
|
||||
.for tagname in ${dep:C,^[^=]+=([^\?]+)\?.*$,\1,}
|
||||
.for label in ${dep:C,^.*:,,}
|
||||
@if [ -f "${WRKSRC}/deps/${label}/src/${label}.app.src" ]; then \
|
||||
${REINPLACE_CMD} -e "s|{vsn, *git}|{vsn, \"${tagname}\"}|" \
|
||||
"${WRKSRC}/deps/${label}/src/${label}.app.src"; \
|
||||
fi
|
||||
.endfor
|
||||
.endfor
|
||||
.endfor
|
||||
@(cd ${WRKSRC}/deps/eleveldb/c_src && ${LN} -s ../../leveldb)
|
||||
@(cd ${WRKSRC}/deps/leo_mcerl/c_src && ${LN} -s ../../libcutil)
|
||||
@(cd ${WRKSRC}/deps/leo_dcerl/c_src && ${LN} -s ../../libcutil)
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} 's|%%PREFIX%%|${PREFIX}|g; \
|
||||
s|%%LEOFS_DBDIR%%|${LEOFS_DBDIR}|g; \
|
||||
s|%%LEOFS_LOGDIR%%|${LEOFS_LOGDIR}|g;' \
|
||||
${WRKSRC}/apps/leo_gateway/priv/leo_gateway.conf \
|
||||
${WRKSRC}/apps/leo_gateway/priv/leo_gateway.schema \
|
||||
${WRKSRC}/apps/leo_gateway/snmp/snmpa_gateway_0/leo_gateway_snmp.config \
|
||||
${WRKSRC}/apps/leo_manager/priv/leo_manager_0.conf \
|
||||
${WRKSRC}/apps/leo_manager/priv/leo_manager_0.schema \
|
||||
${WRKSRC}/apps/leo_manager/priv/leo_manager_1.conf \
|
||||
${WRKSRC}/apps/leo_manager/priv/leo_manager_1.schema \
|
||||
${WRKSRC}/apps/leo_manager/snmp/snmpa_manager_0/leo_manager_snmp.config \
|
||||
${WRKSRC}/apps/leo_manager/snmp/snmpa_manager_1/leo_manager_snmp.config \
|
||||
${WRKSRC}/apps/leo_storage/priv/leo_storage.conf \
|
||||
${WRKSRC}/apps/leo_storage/priv/leo_storage.schema \
|
||||
${WRKSRC}/apps/leo_storage/snmp/snmpa_storage_0/leo_storage_snmp.config
|
||||
|
||||
pre-build:
|
||||
(cd ${WRKSRC}/deps/erpcgen && ${MAKE_ENV} ${MAKE})
|
||||
(cd ${WRKSRC} && ${MAKE_ENV} ./deps/erpcgen/priv/erpcgen \
|
||||
-a [svc_callback,xdr,hrl] apps/leo_gateway/src/leo_nfs_proto3.x)
|
||||
(cd ${WRKSRC} && ${MAKE_ENV} ./deps/erpcgen/priv/erpcgen \
|
||||
-a [svc_callback,xdr,hrl] apps/leo_gateway/src/leo_nfs_mount3.x)
|
||||
(cd ${WRKSRC}/deps/nfs_rpc_server/src && \
|
||||
${MAKE_ENV} erl -noshell -pa ../../erpcgen/ebin \
|
||||
-eval 'erpcgen:file(pmap, [xdrlib,clnt])' -s init stop)
|
||||
(cd ${WRKSRC}/deps/nfs_rpc_server/src && \
|
||||
${MAKE_ENV} erl -noshell -pa ../../erpcgen/ebin \
|
||||
-eval 'erpcgen:file(nfs_rpc, [xdrlib,clnt])' -s init stop)
|
||||
|
||||
FIND_ARGS= "! -name *.bak ! -name *.orig"
|
||||
|
||||
do-install:
|
||||
${MKDIR} \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/bin \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/snmp \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/releases/1 \
|
||||
${STAGEDIR}${LEOFS_ETCDIR} \
|
||||
${STAGEDIR}${LEOFS_DBDIR} \
|
||||
${STAGEDIR}${LEOFS_LOGDIR} \
|
||||
${STAGEDIR}${LEOFS_RUNDIR}
|
||||
(cd ${WRKSRC}/package/leo_gateway && \
|
||||
${COPYTREE_BIN} erts-*/bin ${STAGEDIR}${LEOFS_BASEDIR} ${FIND_ARGS} && \
|
||||
${COPYTREE_SHARE} etc ${STAGEDIR}${LEOFS_BASEDIR} ${FIND_ARGS} && \
|
||||
${COPYTREE_SHARE} lib ${STAGEDIR}${LEOFS_BASEDIR} ${FIND_ARGS})
|
||||
|
||||
(cd ${WRKSRC}/package/leo_manager_0 && \
|
||||
${COPYTREE_SHARE} etc ${STAGEDIR}${LEOFS_BASEDIR} ${FIND_ARGS} && \
|
||||
${COPYTREE_SHARE} lib ${STAGEDIR}${LEOFS_BASEDIR} ${FIND_ARGS})
|
||||
(cd ${WRKSRC}/package/leo_storage && \
|
||||
${COPYTREE_SHARE} etc ${STAGEDIR}${LEOFS_BASEDIR} ${FIND_ARGS} && \
|
||||
${COPYTREE_SHARE} lib ${STAGEDIR}${LEOFS_BASEDIR} ${FIND_ARGS})
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_manager_1/etc/leo_manager.schema \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/etc/leo_manager_slave.schema
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_manager_1/etc/leo_manager.conf \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/etc/leo_manager_slave.conf
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/package/leo_gateway/bin/cuttlefish \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/bin
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/releases/start_erl.data \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/releases
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/releases/1/start_clean.* \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/releases/1
|
||||
(cd ${WRKSRC}/package/leo_gateway/releases && ${COPYTREE_SHARE} . \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/releases/leo_gateway ${FIND_ARGS})
|
||||
(cd ${WRKSRC}/package/leo_manager_0/releases && ${COPYTREE_SHARE} . \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/releases/leo_manager ${FIND_ARGS})
|
||||
(cd ${WRKSRC}/package/leo_storage/releases && ${COPYTREE_SHARE} . \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/releases/leo_storage ${FIND_ARGS})
|
||||
(cd ${WRKSRC}/package/leo_gateway/snmp/snmpa_gateway_0 && \
|
||||
${COPYTREE_SHARE} . \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/snmp/snmpa_gateway ${FIND_ARGS})
|
||||
(cd ${WRKSRC}/package/leo_manager_0/snmp/snmpa_manager_0 && \
|
||||
${COPYTREE_SHARE} . \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/snmp/snmpa_manager ${FIND_ARGS})
|
||||
(cd ${WRKSRC}/package/leo_manager_1/snmp/snmpa_manager_1 && \
|
||||
${COPYTREE_SHARE} . \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/snmp/snmpa_manager_slave ${FIND_ARGS})
|
||||
(cd ${WRKSRC}/package/leo_storage/snmp/snmpa_storage_0 && \
|
||||
${COPYTREE_SHARE} . \
|
||||
${STAGEDIR}${LEOFS_BASEDIR}/snmp/snmpa_storage ${FIND_ARGS})
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/etc/leo_gateway.conf \
|
||||
${STAGEDIR}${LEOFS_ETCDIR}/leo_gateway.conf.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/etc/server_cert.pem \
|
||||
${STAGEDIR}${LEOFS_ETCDIR}/server_cert.pem.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_gateway/etc/server_key.pem \
|
||||
${STAGEDIR}${LEOFS_ETCDIR}/server_key.pem.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_manager_0/etc/leo_manager.conf \
|
||||
${STAGEDIR}${LEOFS_ETCDIR}/leo_manager.conf.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_manager_1/etc/leo_manager.conf \
|
||||
${STAGEDIR}${LEOFS_ETCDIR}/leo_manager_slave.conf.sample
|
||||
${INSTALL_DATA} ${WRKSRC}/package/leo_storage/etc/leo_storage.conf \
|
||||
${STAGEDIR}${LEOFS_ETCDIR}/leo_storage.conf.sample
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/leofs-adm ${STAGEDIR}${PREFIX}/sbin/leofs-adm
|
||||
.for f in ${LEOFS_SBIN_FILES}
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/sbin-${f} ${STAGEDIR}${PREFIX}/sbin/${f}
|
||||
.endfor
|
||||
cd ${STAGEDIR}${PREFIX} ; \
|
||||
${FIND} ${LEOFS_BASEDIR:S/${PREFIX}\///} \
|
||||
${LEOFS_LIBXDIR:S/${PREFIX}\///} -type f -o -type l \
|
||||
| ${SORT} > ${WRKDIR}/PLIST.leofs
|
||||
cd ${STAGEDIR}${PREFIX} ; \
|
||||
${FIND} ${LEOFS_BASEDIR:S/${PREFIX}\///} \
|
||||
${LEOFS_LIBXDIR:S/${PREFIX}\///} -type d -empty \
|
||||
| ${SORT} -r | ${SED} -e 's/^/@dir /' \
|
||||
>> ${WRKDIR}/PLIST.leofs
|
||||
${ECHO_CMD} "r ${TMPPLIST}" > ${WRKDIR}/ex.script
|
||||
${ECHO_CMD} "/Insert PLIST.leofs" >> ${WRKDIR}/ex.script
|
||||
${ECHO_CMD} "d" >> ${WRKDIR}/ex.script
|
||||
${ECHO_CMD} "r ${WRKDIR}/PLIST.leofs" >> ${WRKDIR}/ex.script
|
||||
${ECHO_CMD} "x!" >> ${WRKDIR}/ex.script
|
||||
${CP} -p ${TMPPLIST} ${TMPPLIST}.pre-leofs
|
||||
cd ${WRKDIR} ; ex < ex.script
|
||||
|
||||
.include <bsd.port.mk>
|
||||
@@ -1,79 +0,0 @@
|
||||
TIMESTAMP = 1552207893
|
||||
SHA256 (leofs/leo-project-leofs-1.4.3_GH0.tar.gz) = 958be7e18f0436dae453bd20e315cff52375f209c791224a7bac61cb77990dd5
|
||||
SIZE (leofs/leo-project-leofs-1.4.3_GH0.tar.gz) = 6899276
|
||||
SHA256 (leofs/DeadZen-goldrush-0.1.9_GH0.tar.gz) = 6fb8ac6345d940396ecf89d4ce6b9b809039f336d85d7a54239e85106a807612
|
||||
SIZE (leofs/DeadZen-goldrush-0.1.9_GH0.tar.gz) = 24548
|
||||
SHA256 (leofs/davisp-jiffy-0.15.2_GH0.tar.gz) = 78ca592331cec59959d9303042a355efcee7dc493a98008a7e71be38a97e61d2
|
||||
SIZE (leofs/davisp-jiffy-0.15.2_GH0.tar.gz) = 1815308
|
||||
SHA256 (leofs/eproxus-meck-0.8.12_GH0.tar.gz) = abe94d8897aa354c6714c6c6d25eb1de81b91b2661b9d80c0b273b4b61300d5b
|
||||
SIZE (leofs/eproxus-meck-0.8.12_GH0.tar.gz) = 50998
|
||||
SHA256 (leofs/erlangpack-bcrypt-1.0.1_GH0.tar.gz) = 9386597aa6c3b3b1a0ec7ae277c0483b0ded2c0c27c02e4a97f8cf85a873f3a6
|
||||
SIZE (leofs/erlangpack-bcrypt-1.0.1_GH0.tar.gz) = 25860
|
||||
SHA256 (leofs/esl-elarm-5885c90_GH0.tar.gz) = 35df30923930ebe15f7de79c55dce34f6f1fe5b1281029c0bdd93afc77901f2e
|
||||
SIZE (leofs/esl-elarm-5885c90_GH0.tar.gz) = 23942
|
||||
SHA256 (leofs/ferd-recon-2.3.1_GH0.tar.gz) = c9d9750a07b3743e8a83a273fde83f741b3e802adaf7f8ef666984c985ad0642
|
||||
SIZE (leofs/ferd-recon-2.3.1_GH0.tar.gz) = 203506
|
||||
SHA256 (leofs/leo-project-bear-0.8.2-for-leofs_GH0.tar.gz) = 3c547fb59f1d5ba830a3b24cefc600c9ac42b5b41ee9180ebbd2cad7d8899ecd
|
||||
SIZE (leofs/leo-project-bear-0.8.2-for-leofs_GH0.tar.gz) = 110538
|
||||
SHA256 (leofs/leo-project-cowboy-for-leofs-1.4_GH0.tar.gz) = 3ba3860c574a6f2703f1aa0593ce861032108c67f7d4ff8593da3aa1ee08b9aa
|
||||
SIZE (leofs/leo-project-cowboy-for-leofs-1.4_GH0.tar.gz) = 4829758
|
||||
SHA256 (leofs/leo-project-eleveldb-2.0.37_GH0.tar.gz) = ebd839525b36616eccd39decf7abbb981e2d10b43bbe46723bf9bda6e5d9934b
|
||||
SIZE (leofs/leo-project-eleveldb-2.0.37_GH0.tar.gz) = 1760742
|
||||
SHA256 (leofs/leo-project-erlpass-612f487_GH0.tar.gz) = 0eb108db05427fb819c6ca1aa63f5cb81596c7971ad1d3f58766ad503f9bc8a4
|
||||
SIZE (leofs/leo-project-erlpass-612f487_GH0.tar.gz) = 772785
|
||||
SHA256 (leofs/leo-project-erpcgen-0.2.7_GH0.tar.gz) = 84b25bac1321620b2700f791673c830831ae59326785cf0b0affb9fa2511bddb
|
||||
SIZE (leofs/leo-project-erpcgen-0.2.7_GH0.tar.gz) = 205436
|
||||
SHA256 (leofs/leo-project-folsom-0.8.2.3_GH0.tar.gz) = d77f92b09b6bdf1cb93dad1c3c6f002a505d94153756cd7ffd18ecd63ed6f836
|
||||
SIZE (leofs/leo-project-folsom-0.8.2.3_GH0.tar.gz) = 174985
|
||||
SHA256 (leofs/leo-project-lager-574d64a_GH0.tar.gz) = b6ad1f35406115dba1cdf4cd1f065ecb586354e7b5b57f3243f9ec7674aac165
|
||||
SIZE (leofs/leo-project-lager-574d64a_GH0.tar.gz) = 259253
|
||||
SHA256 (leofs/leo-project-leo_backend_db-1.2.31_GH0.tar.gz) = 7f3086a6ac60da7ea1dcdff7c3b5777c36ba9f4cafbcef28ce3e19e4cea1125a
|
||||
SIZE (leofs/leo-project-leo_backend_db-1.2.31_GH0.tar.gz) = 196006
|
||||
SHA256 (leofs/leo-project-leo_cache-0.8.12_GH0.tar.gz) = 76a79f5b196c61cbc2286674a9be1a36013c64ca0465396c4c93b8776c19645f
|
||||
SIZE (leofs/leo-project-leo_cache-0.8.12_GH0.tar.gz) = 187880
|
||||
SHA256 (leofs/leo-project-leo_commons-1.2.1_GH0.tar.gz) = 04f24ba2101e2b9abd7c7f7fe775cbd5d64a574dac6a18fc19dca3db8e845e11
|
||||
SIZE (leofs/leo-project-leo_commons-1.2.1_GH0.tar.gz) = 224829
|
||||
SHA256 (leofs/leo-project-leo_dcerl-0.4.11_GH0.tar.gz) = d08e8fbce4c183615ccecb86720471c373dcb2def5d6afbc8c76a30ca3c102fb
|
||||
SIZE (leofs/leo-project-leo_dcerl-0.4.11_GH0.tar.gz) = 192873
|
||||
SHA256 (leofs/leo-project-leo_logger-1.3.8_GH0.tar.gz) = 3381ca55f1e97cfdf82ceef7b492213f8b23f24da2bc8af7d8194013e28e732e
|
||||
SIZE (leofs/leo-project-leo_logger-1.3.8_GH0.tar.gz) = 200077
|
||||
SHA256 (leofs/leo-project-leo_mcerl-0.6.9_GH0.tar.gz) = fc544acabed74a6f3dc6bb4e7f5e0503f29fffa7ac135a7ca751c7a771352308
|
||||
SIZE (leofs/leo-project-leo_mcerl-0.6.9_GH0.tar.gz) = 185312
|
||||
SHA256 (leofs/leo-project-leo_mq-1.5.19_GH0.tar.gz) = 8347b021e1dfa45420199b3ca948ede7ce016f7f54caf0aaf68d5ce96317623b
|
||||
SIZE (leofs/leo-project-leo_mq-1.5.19_GH0.tar.gz) = 201604
|
||||
SHA256 (leofs/leo-project-leo_object_storage-1.3.38_GH0.tar.gz) = 8544547c8dcd9153dfed41125c01e3c455d5ac6d5577df9f7d047e068e6523d1
|
||||
SIZE (leofs/leo-project-leo_object_storage-1.3.38_GH0.tar.gz) = 590230
|
||||
SHA256 (leofs/leo-project-leo_ordning_reda-1.2.11_GH0.tar.gz) = 3340bb328a78863ade014e1d4991a59e0e7015f62a2a94df43b820442d20c8d6
|
||||
SIZE (leofs/leo-project-leo_ordning_reda-1.2.11_GH0.tar.gz) = 190566
|
||||
SHA256 (leofs/leo-project-leo_pod-0.6.10_GH0.tar.gz) = 1924392c4f124c7751cbf46c98df51f7bd5f74fc8b862306f089294f8267d632
|
||||
SIZE (leofs/leo-project-leo_pod-0.6.10_GH0.tar.gz) = 170687
|
||||
SHA256 (leofs/leo-project-leo_redundant_manager-1.9.64_GH0.tar.gz) = 5a50328b54d2bbad879287292d5478380b3109254b0a893b3d809431762b437d
|
||||
SIZE (leofs/leo-project-leo_redundant_manager-1.9.64_GH0.tar.gz) = 242344
|
||||
SHA256 (leofs/leo-project-leo_rpc-0.10.18_GH0.tar.gz) = 4e6eafdc512bbb72b80b38cae68aa255b80606424e29e09e9eda7d621421a388
|
||||
SIZE (leofs/leo-project-leo_rpc-0.10.18_GH0.tar.gz) = 197775
|
||||
SHA256 (leofs/leo-project-leo_s3_libs-1.2.21_GH0.tar.gz) = 26599ed6312e64314541be6b3779d91e2756e8e1c810a69f87b7abd399c70701
|
||||
SIZE (leofs/leo-project-leo_s3_libs-1.2.21_GH0.tar.gz) = 212018
|
||||
SHA256 (leofs/leo-project-leo_statistics-1.1.23_GH0.tar.gz) = 8a4562fa999f96e005a80e32d11075e1035b509936a814d9f9e13a6191cc0d1a
|
||||
SIZE (leofs/leo-project-leo_statistics-1.1.23_GH0.tar.gz) = 190440
|
||||
SHA256 (leofs/leo-project-leo_tran-0.2.14_GH0.tar.gz) = b22ee4cdc14357b990edd7d94f50ae1135796d4fa4dc711caaf92f5418ca0f76
|
||||
SIZE (leofs/leo-project-leo_tran-0.2.14_GH0.tar.gz) = 188389
|
||||
SHA256 (leofs/leo-project-leo_watchdog-1.0.7_GH0.tar.gz) = 542beeb17097b1b00cda60b9d508ffbcd1f5e3aa5ecd1469f5dc9c27da6e08e4
|
||||
SIZE (leofs/leo-project-leo_watchdog-1.0.7_GH0.tar.gz) = 201401
|
||||
SHA256 (leofs/leo-project-leveldb-a9327e8_GH0.tar.gz) = 428c4fd9dd1a1154873162fa5ba33db968df5ba5563d5d9be7ab745f1c118b26
|
||||
SIZE (leofs/leo-project-leveldb-a9327e8_GH0.tar.gz) = 357818
|
||||
SHA256 (leofs/leo-project-libcutil-0.5.1_GH0.tar.gz) = ea73f8db2033cc30de3dd7f46485afaa867676bd4505d8f5ed625a08a4ad80f8
|
||||
SIZE (leofs/leo-project-libcutil-0.5.1_GH0.tar.gz) = 23875
|
||||
SHA256 (leofs/leo-project-nfs_rpc_server-0.2.7_GH0.tar.gz) = 88dcfe8254ba53cd13779eaaf037664d1b18b312425b4cbbcb398f0311e6b2ba
|
||||
SIZE (leofs/leo-project-nfs_rpc_server-0.2.7_GH0.tar.gz) = 197590
|
||||
SHA256 (leofs/leo-project-savanna_agent-0.4.26_GH0.tar.gz) = e58c4a3f827f52f667f08ea4ae908fee63ea5076a427ea19a044a285fa496f00
|
||||
SIZE (leofs/leo-project-savanna_agent-0.4.26_GH0.tar.gz) = 187113
|
||||
SHA256 (leofs/leo-project-savanna_commons-0.10.12_GH0.tar.gz) = b7f89539517e7faaf57904192400fb54747c0021673b7465d859ecf3329fcb35
|
||||
SIZE (leofs/leo-project-savanna_commons-0.10.12_GH0.tar.gz) = 198348
|
||||
SHA256 (leofs/manopapad-proper-f558989_GH0.tar.gz) = 67db9f6ee77a5f54967b99d70974d9dda1a07f5cd8839ef8ad80625fde639c1b
|
||||
SIZE (leofs/manopapad-proper-f558989_GH0.tar.gz) = 292555
|
||||
SHA256 (leofs/ninenines-cowlib-1.0.0_GH0.tar.gz) = 48a8784ae7d266724276f9842b3a06cfbbfe69469f58c27237c602232f7ebe5a
|
||||
SIZE (leofs/ninenines-cowlib-1.0.0_GH0.tar.gz) = 41538
|
||||
SHA256 (leofs/ninenines-ranch-1.0.0_GH0.tar.gz) = ec75e8876bf25df2e1f5156909d51cf11f2e98dd76a3be2090fa30ebefc8062f
|
||||
SIZE (leofs/ninenines-ranch-1.0.0_GH0.tar.gz) = 41121
|
||||
SHA256 (leofs/systemd-erlang-sd_notify-v1.0_GH0.tar.gz) = f85b731202ad0b9ff351127a44e00c052ec197366c4b96c4e488cd8ad9359eeb
|
||||
SIZE (leofs/systemd-erlang-sd_notify-v1.0_GH0.tar.gz) = 202032
|
||||
@@ -1,125 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: leofs
|
||||
# REQUIRE: LOGIN cleanvar
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# /etc/rc.conf variables:
|
||||
#
|
||||
# leofs_enable (bool): Set it to "YES" to enable swift.
|
||||
# Default is "NO".
|
||||
# leofs_servers (list): Specify servers to run as a space separated
|
||||
# list of possible values:
|
||||
# gateway,
|
||||
# manager,
|
||||
# manager_slave,
|
||||
# storage.
|
||||
# The aliase ALL may be used to run all servers.
|
||||
# Also the list can be overriden in command line:
|
||||
# any arguments but the first (if there are) are
|
||||
# treated as the server list.
|
||||
# Default is "ALL".
|
||||
# leofs_user (string): Set it to a user name the servers are run as.
|
||||
# Default is "%%LEOFS_USER%%".
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=leofs
|
||||
rcvar=leofs_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${leofs_enable:="NO"}
|
||||
: ${leofs_servers:="ALL"}
|
||||
: ${leofs_user=%%LEOFS_USER%%}
|
||||
|
||||
extra_commands="status"
|
||||
restart_cdm=leofs_restart
|
||||
start_cmd=leofs_start
|
||||
status_cmd=leofs_status
|
||||
stop_cmd=leofs_stop
|
||||
|
||||
leofs_restart()
|
||||
{
|
||||
leofs_stop
|
||||
leofs_start
|
||||
}
|
||||
|
||||
leofs_start()
|
||||
{
|
||||
local status=0
|
||||
local s
|
||||
|
||||
for s in ${leofs_servers}; do
|
||||
echo -n "Starting leofs ${s}... "
|
||||
%%PREFIX%%/sbin/leofs ${s} start
|
||||
if [ $? = 0 ]; then
|
||||
echo "done."
|
||||
else
|
||||
status=1
|
||||
fi
|
||||
done
|
||||
|
||||
return $status
|
||||
}
|
||||
|
||||
leofs_stop()
|
||||
{
|
||||
local status=0
|
||||
|
||||
for s in ${leofs_servers}; do
|
||||
echo -n "Stopping leofs ${s}... "
|
||||
%%PREFIX%%/sbin/leofs ${s} stop
|
||||
if [ $? = 0 ]; then
|
||||
echo "done."
|
||||
else
|
||||
status=1
|
||||
fi
|
||||
done
|
||||
|
||||
return $status
|
||||
}
|
||||
|
||||
leofs_status()
|
||||
{
|
||||
local status=0
|
||||
|
||||
for s in ${leofs_servers}; do
|
||||
%%PREFIX%%/sbin/leofs ${s} ping > /dev/null 2>&1
|
||||
if [ $? != 0 ]; then
|
||||
echo "leofs ${s} is not running."
|
||||
status=1
|
||||
else
|
||||
echo "leofs ${s} is running."
|
||||
fi
|
||||
done
|
||||
|
||||
return $status
|
||||
}
|
||||
|
||||
cmd=$1 ; shift
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
leofs_servers="$@"
|
||||
fi
|
||||
|
||||
for s in ${leofs_servers}; do
|
||||
case "${s}" in
|
||||
ALL)
|
||||
leofs_servers="manager manager_slave storage gateway"
|
||||
break
|
||||
;;
|
||||
gateway|manager|manager_slave|storage)
|
||||
;;
|
||||
*)
|
||||
warn "unknown leofs server: ${s}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
for s in ${leofs_servers}; do
|
||||
required_files=%%LEOFS_ETCDIR%%/leo_${s}.conf
|
||||
done
|
||||
|
||||
run_rc_command "$cmd"
|
||||
@@ -1,111 +0,0 @@
|
||||
--- apps/leo_gateway/priv/leo_gateway.conf.orig 2016-03-29 12:43:41.000000000 +0300
|
||||
+++ apps/leo_gateway/priv/leo_gateway.conf 2016-04-09 10:29:53.029616000 +0300
|
||||
@@ -13,7 +13,7 @@
|
||||
## about configuration parameters
|
||||
|
||||
## SASL error log path
|
||||
-## sasl.sasl_error_log = ./log/sasl/sasl-error.log
|
||||
+## sasl.sasl_error_log = %%LEOFS_LOGDIR%%/leo_gateway/sasl/sasl-error.log
|
||||
|
||||
## Restricts the error logging performed by the specified sasl_error_logger
|
||||
## to error reports, progress reports, or both.
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
## Specifies in which directory the files are stored.
|
||||
## If this parameter is undefined or false, the error_logger_mf_h is not installed.
|
||||
-## sasl.error_logger_mf_dir = ./log/sasl
|
||||
+## sasl.error_logger_mf_dir = %%LEOFS_LOGDIR%%/leo_gateway/sasl
|
||||
|
||||
## Specifies how large each individual file can be.
|
||||
## If this parameter is undefined, the error_logger_mf_h is not installed.
|
||||
@@ -36,7 +36,7 @@
|
||||
## Manager's Node(s)
|
||||
## --------------------------------------------------------------------
|
||||
## Name of Manager node(s)
|
||||
-managers = [manager_0@127.0.0.1, manager_1@127.0.0.1]
|
||||
+managers = [manager@127.0.0.1, manager_slave@127.0.0.1]
|
||||
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
@@ -65,10 +65,10 @@
|
||||
## http.ssl_port = 8443
|
||||
|
||||
## SSL Certificate file
|
||||
-## http.ssl_certfile = ./etc/server_cert.pem
|
||||
+## http.ssl_certfile = %%PREFIX%%/etc/leofs/server_cert.pem
|
||||
|
||||
## SSL key
|
||||
-## http.ssl_keyfile = ./etc/server_key.pem
|
||||
+## http.ssl_keyfile = %%PREFIX%%/etc/leofs/server_key.pem
|
||||
|
||||
## HTTP custom header configuration file path
|
||||
## http.headers_config_file = ./etc/http_custom_header.conf
|
||||
@@ -141,10 +141,10 @@
|
||||
## cache.cache_disc_threshold_len = 1048576
|
||||
|
||||
## Directory for the disk cache data
|
||||
-## cache.cache_disc_dir_data = ./cache/data
|
||||
+## cache.cache_disc_dir_data = %%LEOFS_DBDIR%%/leo_gateway/cache/data
|
||||
|
||||
## Directory for the disk cache journal
|
||||
-## cache.cache_disc_dir_journal = ./cache/journal
|
||||
+## cache.cache_disc_dir_journal = %%LEOFS_DBDIR%%/leo_gateway/cache/journal
|
||||
|
||||
|
||||
##
|
||||
@@ -256,25 +256,25 @@
|
||||
## log.is_enable_access_log = false
|
||||
|
||||
## Output log file(s) - Erlang's log
|
||||
-## log.erlang = ./log/erlang
|
||||
+## log.erlang = %%LEOFS_LOGDIR%%/leo_gateway/erlang
|
||||
|
||||
## Output log file(s) - app
|
||||
-## log.app = ./log/app
|
||||
+## log.app = %%LEOFS_LOGDIR%%/leo_gateway/app
|
||||
|
||||
## Output log file(s) - members of storage-cluster
|
||||
-## log.member_dir = ./log/ring
|
||||
+## log.member_dir = %%LEOFS_LOGDIR%%/leo_gateway/ring
|
||||
|
||||
## Output log file(s) - ring
|
||||
-## log.ring_dir = ./log/ring
|
||||
+## log.ring_dir = %%LEOFS_LOGDIR%%/leo_gateway/ring
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
## GATEWAY - Other Directories
|
||||
## --------------------------------------------------------------------
|
||||
## Directory of queue for monitoring "RING"
|
||||
-## queue_dir = ./work/queue
|
||||
+## queue_dir = %%LEOFS_DBDIR%%/leo_gateway/queue
|
||||
|
||||
## Directory of SNMP agent configuration
|
||||
-## snmp_agent = ./snmp/snmpa_gateway_0/LEO-GATEWAY
|
||||
+## snmp_agent = %%PREFIX%%/lib/leofs/snmp/snmpa_gateway_0/LEO-GATEWAY
|
||||
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
@@ -313,7 +313,7 @@
|
||||
## For vm.args
|
||||
##======================================================================
|
||||
## Name of the leofs-gateway node
|
||||
-nodename = gateway_0@127.0.0.1
|
||||
+nodename = gateway@127.0.0.1
|
||||
|
||||
## Cookie for distributed node communication. All nodes in the same cluster
|
||||
## should use the same cookie or they will not be able to communicate.
|
||||
@@ -329,7 +329,7 @@
|
||||
erlang.max_ports = 64000
|
||||
|
||||
## Set the location of crash dumps
|
||||
-erlang.crash_dump = ./log/erl_crash.dump
|
||||
+erlang.crash_dump = %%LEOFS_LOGDIR%%/leo_gateway/erl_crash.dump
|
||||
|
||||
## Raise the ETS table limit
|
||||
erlang.max_ets_tables = 256000
|
||||
@@ -359,4 +359,4 @@
|
||||
process_limit = 1048576
|
||||
|
||||
## Path of SNMP-agent configuration
|
||||
-## snmp_conf = ./snmp/snmpa_gateway_0/leo_gateway_snmp
|
||||
+snmp_conf = %%PREFIX%%/lib/leofs/snmp/snmpa_gateway/leo_gateway_snmp
|
||||
@@ -1,144 +0,0 @@
|
||||
--- apps/leo_gateway/priv/leo_gateway.schema.orig 2014-08-06 05:56:49.000000000 +0300
|
||||
+++ apps/leo_gateway/priv/leo_gateway.schema 2014-08-13 23:13:17.000000000 +0300
|
||||
@@ -37,7 +37,7 @@
|
||||
"sasl.sasl_error_logger",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/sasl/sasl-error.log"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_gateway/sasl/sasl-error.log"}
|
||||
]}.
|
||||
|
||||
{translation, "sasl.sasl_error_logger",
|
||||
@@ -63,7 +63,7 @@
|
||||
"sasl.error_logger_mf_dir",
|
||||
"sasl.error_logger_mf_dir",
|
||||
[
|
||||
- {default, "./log/sasl"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_gateway/sasl"}
|
||||
]}.
|
||||
|
||||
%% @doc Specifies how large each individual file can be.
|
||||
@@ -104,7 +104,7 @@
|
||||
Managers = cuttlefish_util:conf_get_value("managers", Conf),
|
||||
case string:tokens(Managers, "[ , ]") of
|
||||
[] ->
|
||||
- ['manager_0@127.0.0.1', 'manager_1@127.0.0.1'];
|
||||
+ ['manager@127.0.0.1', 'manager_slave@127.0.0.1'];
|
||||
Tokens ->
|
||||
lists:map(fun(X) ->
|
||||
list_to_atom(X)
|
||||
@@ -191,7 +191,7 @@
|
||||
"http.ssl_certfile",
|
||||
"leo_gateway.http.ssl_certfile",
|
||||
[
|
||||
- {default, "./etc/server_cert.pem"}
|
||||
+ {default, "%%PREFIX%%/etc/leofs/server_cert.pem"}
|
||||
]}.
|
||||
|
||||
%% @doc SSL key
|
||||
@@ -199,7 +199,7 @@
|
||||
"http.ssl_keyfile",
|
||||
"leo_gateway.http.ssl_keyfile",
|
||||
[
|
||||
- {default, "./etc/server_key.pem"}
|
||||
+ {default, "%%PREFIX%%/etc/leofs/server_key.pem"}
|
||||
]}.
|
||||
|
||||
%% @doc Synchronized time of a bucket property (second)
|
||||
@@ -306,7 +306,7 @@
|
||||
"cache.cache_disc_dir_data",
|
||||
"leo_gateway.cache.cache_disc_dir_data",
|
||||
[
|
||||
- {default, "./cache/data"}
|
||||
+ {default, "%%LEOFS_DBDIR%%/leo_gateway/cache/data"}
|
||||
]}.
|
||||
|
||||
%% @doc Directory for the disk cache journal
|
||||
@@ -314,7 +314,7 @@
|
||||
"cache.cache_disc_dir_journal",
|
||||
"leo_gateway.cache.cache_disc_dir_journal",
|
||||
[
|
||||
- {default, "./cache/journal"}
|
||||
+ {default, "%%LEOFS_DBDIR%%/leo_gateway/cache/journal"}
|
||||
]}.
|
||||
|
||||
%% @doc Cache Expire in seconds
|
||||
@@ -484,7 +484,7 @@
|
||||
"leo_gateway.log_dir",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/erlang"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_gateway/erlang"}
|
||||
]}.
|
||||
|
||||
%% @doc Output log file(s) - app
|
||||
@@ -493,7 +493,7 @@
|
||||
"leo_gateway.log_appender",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/app"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_gateway/app"}
|
||||
]}.
|
||||
|
||||
{translation, "leo_gateway.log_appender",
|
||||
@@ -508,7 +508,7 @@
|
||||
"leo_redundant_manager.log_dir_member",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/ring"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_gateway/ring"}
|
||||
]}.
|
||||
|
||||
%% @doc Output log file(s) - ring
|
||||
@@ -517,7 +517,7 @@
|
||||
"leo_redundant_manager.log_dir_ring",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/ring"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_gateway/ring"}
|
||||
]}.
|
||||
|
||||
|
||||
@@ -529,7 +529,7 @@
|
||||
"queue_dir",
|
||||
"leo_gateway.queue_dir",
|
||||
[
|
||||
- {default, "./work/queue"}
|
||||
+ {default, "%%LEOFS_DBDIR%%/leo_gateway/queue"}
|
||||
]}.
|
||||
|
||||
%% @doc Directory of SNMP agent configuration
|
||||
@@ -537,7 +537,7 @@
|
||||
"snmp_agent",
|
||||
"leo_gateway.snmp_agent",
|
||||
[
|
||||
- {default, "./snmp/snmpa_gateway_0/LEO-GATEWAY"}
|
||||
+ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_gateway/LEO-GATEWAY"}
|
||||
]}.
|
||||
|
||||
|
||||
@@ -752,7 +752,7 @@
|
||||
"nodename",
|
||||
"vm_args.-name",
|
||||
[
|
||||
- {default, "gateway_0@127.0.0.1"}
|
||||
+ {default, "gateway@127.0.0.1"}
|
||||
]}.
|
||||
|
||||
%% @doc Cookie for distributed node communication. All nodes in the same cluster
|
||||
@@ -800,7 +800,7 @@
|
||||
"erlang.crash_dump",
|
||||
"vm_args.-env ERL_CRASH_DUMP",
|
||||
[
|
||||
- {default, "./log/erl_crash.dump"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_gateway/erl_crash.dump"}
|
||||
]}.
|
||||
|
||||
%% @doc Raise the ETS table limit
|
||||
@@ -839,5 +839,5 @@
|
||||
"snmp_conf",
|
||||
"vm_args.-config",
|
||||
[
|
||||
- {default, "./snmp/snmpa_gateway_0/leo_gateway_snmp"}
|
||||
+ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_gateway/leo_gateway_snmp"}
|
||||
]}.
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
--- apps/leo_gateway/snmp/snmpa_gateway_0/leo_gateway_snmp.config.orig 2014-06-15 22:05:33.000000000 +0300
|
||||
+++ apps/leo_gateway/snmp/snmpa_gateway_0/leo_gateway_snmp.config 2014-06-15 22:06:17.000000000 +0300
|
||||
@@ -1,6 +1,6 @@
|
||||
[{snmp, [{agent, [{versions, [v1, v2]},
|
||||
- {db_dir, "snmp/snmpa_gateway_0/db"},
|
||||
- {config, [{dir, "snmp/snmpa_gateway_0/agent/conf"},
|
||||
+ {db_dir, "%%LEOFS_DBDIR%%/snmp/snmpa_gateway"},
|
||||
+ {config, [{dir, "%%PREFIX%%/lib/leofs/snmp/snmpa_gateway/agent/conf"},
|
||||
{verbosity, silence}]},
|
||||
{net_if, [{verbosity, silence}]}
|
||||
]},
|
||||
@@ -1,95 +0,0 @@
|
||||
--- apps/leo_manager/priv/leo_manager_0.conf.orig 2015-04-14 10:09:26.000000000 +0300
|
||||
+++ apps/leo_manager/priv/leo_manager_0.conf 2015-05-02 21:56:17.000000000 +0300
|
||||
@@ -13,7 +13,7 @@
|
||||
## about configuration parameters
|
||||
|
||||
## SASL error log path
|
||||
-## sasl.sasl_error_log = ./log/sasl/sasl-error.log
|
||||
+## sasl.sasl_error_log = %%LEOFS_LOGDIR%%/leo_manager/sasl/sasl-error.log
|
||||
|
||||
## Restricts the error logging performed by the specified sasl_error_logger
|
||||
## to error reports, progress reports, or both.
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
## Specifies in which directory the files are stored.
|
||||
## If this parameter is undefined or false, the error_logger_mf_h is not installed.
|
||||
-## sasl.error_logger_mf_dir = ./log/sasl
|
||||
+## sasl.error_logger_mf_dir = %%LEOFS_LOGDIR%%/leo_manager/sasl
|
||||
|
||||
## Specifies how large each individual file can be.
|
||||
## If this parameter is undefined, the error_logger_mf_h is not installed.
|
||||
@@ -36,7 +36,7 @@
|
||||
## MANAGER
|
||||
## --------------------------------------------------------------------
|
||||
## Partner of manager's alias
|
||||
-manager.partner = manager_1@127.0.0.1
|
||||
+manager.partner = manager_slave@127.0.0.1
|
||||
|
||||
## Manager-console accepatable port number
|
||||
console.port.cui = 10010
|
||||
@@ -96,7 +96,7 @@
|
||||
## * Store the RING and the command histories
|
||||
## --------------------------------------------------------------------
|
||||
## Mnesia dir
|
||||
-mnesia.dir = ./work/mnesia/127.0.0.1
|
||||
+mnesia.dir = %%LEOFS_DBDIR%%/leo_manager/mnesia/127.0.0.1
|
||||
|
||||
## The write threshold for transaction log dumps
|
||||
## as the number of writes to the transaction log
|
||||
@@ -113,26 +113,26 @@
|
||||
## log.log_level = 1
|
||||
|
||||
## Output log file(s) - Erlang's log
|
||||
-## log.erlang = ./log/erlang
|
||||
+## log.erlang = %%LEOFS_LOGDIR%%/leo_manager/erlang
|
||||
|
||||
## Output log file(s) - app
|
||||
-## log.app = ./log/app
|
||||
+## log.app = %%LEOFS_LOGDIR%%/leo_manager/app
|
||||
|
||||
## Output log file(s) - members of storage-cluster
|
||||
-## log.member_dir = ./log/ring
|
||||
+## log.member_dir = %%LEOFS_LOGDIR%%/leo_manager/ring
|
||||
|
||||
## Output log file(s) - ring
|
||||
-## log.ring_dir = ./log/ring
|
||||
+## log.ring_dir = %%LEOFS_LOGDIR%%/leo_manager/ring
|
||||
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
## MANAGER - Other Directories
|
||||
## --------------------------------------------------------------------
|
||||
## Directory of queue for monitoring "RING"
|
||||
-## queue_dir = ./work/queue
|
||||
+## queue_dir = %%LEOFS_DBDIR%%/leo_manager/queue
|
||||
|
||||
## Directory of SNMP agent configuration
|
||||
-## snmp_agent = ./snmp/snmpa_manager_0/LEO-MANAGER
|
||||
+## snmp_agent = %%PREFIX%%/lib/leofs/snmp/snmpa_manager/LEO-MANAGER
|
||||
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
@@ -177,7 +177,7 @@
|
||||
## For vm.args
|
||||
##======================================================================
|
||||
## Name of the LeoFS's manager node
|
||||
-nodename = manager_0@127.0.0.1
|
||||
+nodename = manager@127.0.0.1
|
||||
|
||||
## Cookie for distributed node communication. All nodes in the same cluster
|
||||
## should use the same cookie or they will not be able to communicate.
|
||||
@@ -193,7 +193,7 @@
|
||||
erlang.max_ports = 64000
|
||||
|
||||
## Set the location of crash dumps
|
||||
-erlang.crash_dump = ./log/erl_crash.dump
|
||||
+erlang.crash_dump = %%LEOFS_LOGDIR%%/leo_manager/erl_crash.dump
|
||||
|
||||
## Raise the ETS table limit
|
||||
erlang.max_ets_tables = 256000
|
||||
@@ -202,4 +202,4 @@
|
||||
process_limit = 1048576
|
||||
|
||||
## Path of SNMP-agent configuration
|
||||
-## snmp_conf = ./snmp/snmpa_manager_0/leo_manager_snmp
|
||||
+##snmp_conf = %%PREFIX%%/lib/leofs/snmp/snmpa_manager/leo_manager_snmp
|
||||
@@ -1,99 +0,0 @@
|
||||
--- apps/leo_manager/priv/leo_manager_0.schema.orig 2014-06-15 20:05:19.000000000 +0300
|
||||
+++ apps/leo_manager/priv/leo_manager_0.schema 2014-06-15 20:06:20.000000000 +0300
|
||||
@@ -37,7 +37,7 @@
|
||||
"sasl.sasl_error_logger",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/sasl/sasl-error.log"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager/sasl/sasl-error.log"}
|
||||
]}.
|
||||
|
||||
{translation, "sasl.sasl_error_logger",
|
||||
@@ -63,7 +63,7 @@
|
||||
"sasl.error_logger_mf_dir",
|
||||
"sasl.error_logger_mf_dir",
|
||||
[
|
||||
- {default, "./log/sasl"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager/sasl"}
|
||||
]}.
|
||||
|
||||
%% @doc Specifies how large each individual file can be.
|
||||
@@ -286,7 +286,7 @@
|
||||
"mnesia.dir",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./work/mnesia/127.0.0.1"}
|
||||
+ {default, "%%LEOFS_DBDIR%%/leo_manager/mnesia/127.0.0.1"}
|
||||
]}.
|
||||
|
||||
%% @doc The write threshold for transaction log dumps
|
||||
@@ -328,7 +328,7 @@
|
||||
"leo_manager.log_dir",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/erlang"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager/erlang"}
|
||||
]}.
|
||||
|
||||
%% @doc Output log file(s) - app
|
||||
@@ -337,7 +337,7 @@
|
||||
"leo_manager.log_appender",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/app"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager/app"}
|
||||
]}.
|
||||
|
||||
{translation, "leo_manager.log_appender",
|
||||
@@ -352,7 +352,7 @@
|
||||
"leo_redundant_manager.log_dir_member",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/ring"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager/ring"}
|
||||
]}.
|
||||
|
||||
%% @doc Output log file(s) - ring
|
||||
@@ -361,7 +361,7 @@
|
||||
"leo_redundant_manager.log_dir_ring",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/ring"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager/ring"}
|
||||
]}.
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@
|
||||
"queue_dir",
|
||||
"leo_manager.queue_dir",
|
||||
[
|
||||
- {default, "./work/queue"}
|
||||
+ {default, "%%LEOFS_DBDIR%%/leo_manager/queue"}
|
||||
]}.
|
||||
|
||||
%% @doc Directory of SNMP agent configuration
|
||||
@@ -381,7 +381,7 @@
|
||||
"snmp_agent",
|
||||
"leo_manager.snmp_agent",
|
||||
[
|
||||
- {default, "./snmp/snmpa_manager_0/LEO-MANAGER"}
|
||||
+ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager/LEO-MANAGER"}
|
||||
]}.
|
||||
|
||||
|
||||
@@ -592,7 +592,7 @@
|
||||
"erlang.crash_dump",
|
||||
"vm_args.-env ERL_CRASH_DUMP",
|
||||
[
|
||||
- {default, "./log/erl_crash.dump"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager/erl_crash.dump"}
|
||||
]}.
|
||||
|
||||
%% @doc Raise the ETS table limit
|
||||
@@ -631,5 +631,5 @@
|
||||
"snmp_conf",
|
||||
"vm_args.-config",
|
||||
[
|
||||
- {default, "./snmp/snmpa_manager_0/leo_manager_snmp"}
|
||||
+ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager/leo_manager_snmp"}
|
||||
]}.
|
||||
@@ -1,95 +0,0 @@
|
||||
--- apps/leo_manager/priv/leo_manager_1.conf.orig 2017-09-12 09:07:39.000000000 +0000
|
||||
+++ apps/leo_manager/priv/leo_manager_1.conf 2017-10-06 13:51:33.276074000 +0000
|
||||
@@ -16,7 +16,7 @@
|
||||
## about configuration parameters
|
||||
|
||||
## SASL error log path
|
||||
-## sasl.sasl_error_log = ./log/sasl/sasl-error.log
|
||||
+## sasl.sasl_error_log = %%LEOFS_LOGDIR%%/leo_manager_slave/sasl/sasl-error.log
|
||||
|
||||
## Restricts the error logging performed by the specified sasl_error_logger
|
||||
## to error reports, progress reports, or both.
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
## Specifies in which directory the files are stored.
|
||||
## If this parameter is undefined or false, the error_logger_mf_h is not installed.
|
||||
-## sasl.error_logger_mf_dir = ./log/sasl
|
||||
+## sasl.error_logger_mf_dir = %%LEOFS_LOGDIR%%/leo_manager_slave/sasl
|
||||
|
||||
## Specifies how large each individual file can be.
|
||||
## If this parameter is undefined, the error_logger_mf_h is not installed.
|
||||
@@ -39,7 +39,7 @@
|
||||
## MANAGER
|
||||
## --------------------------------------------------------------------
|
||||
## Partner of manager's alias
|
||||
-manager.partner = manager_0@127.0.0.1
|
||||
+manager.partner = manager@127.0.0.1
|
||||
|
||||
## Manager-console accepatable port number
|
||||
console.port.cui = 10011
|
||||
@@ -58,7 +58,7 @@
|
||||
## * Store the RING and the command histories
|
||||
## --------------------------------------------------------------------
|
||||
## Mnesia dir
|
||||
-mnesia.dir = ./work/mnesia/127.0.0.1
|
||||
+mnesia.dir = %%LEOFS_DBDIR%%/leo_manager_slave/mnesia/127.0.0.1
|
||||
|
||||
## The write threshold for transaction log dumps
|
||||
## as the number of writes to the transaction log
|
||||
@@ -75,26 +75,26 @@
|
||||
## log.log_level = 1
|
||||
|
||||
## Output log file(s) - Erlang's log
|
||||
-## log.erlang = ./log/erlang
|
||||
+log.erlang = %%LEOFS_LOGDIR%%/leo_manager_slave/erlang
|
||||
|
||||
## Output log file(s) - app
|
||||
-## log.app = ./log/app
|
||||
+log.app = %%LEOFS_LOGDIR%%/leo_manager_slave/app
|
||||
|
||||
## Output log file(s) - members of storage-cluster
|
||||
-## log.member_dir = ./log/ring
|
||||
+log.member_dir = %%LEOFS_LOGDIR%%/leo_manager_slave/ring
|
||||
|
||||
## Output log file(s) - ring
|
||||
-## log.ring_dir = ./log/ring
|
||||
+log.ring_dir = %%LEOFS_LOGDIR%%/leo_manager_slave/ring
|
||||
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
## MANAGER - Other Directories
|
||||
## --------------------------------------------------------------------
|
||||
## Directory of queue for monitoring "RING"
|
||||
-## queue_dir = ./work/queue
|
||||
+## queue_dir = %%LEOFS_DBDIR%%/leo_manager_slave/queue
|
||||
|
||||
## Directory of SNMP agent configuration
|
||||
-snmp_agent = ./snmp/snmpa_manager_1/LEO-MANAGER
|
||||
+## snmp_agent = %%PREFIX%%/lib/leofs/snmp/snmpa_manager_slave/LEO-MANAGER
|
||||
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
@@ -139,7 +139,7 @@
|
||||
## For vm.args
|
||||
##======================================================================
|
||||
## Name of the LeoFS's manager node
|
||||
-nodename = manager_1@127.0.0.1
|
||||
+nodename = manager_slave@127.0.0.1
|
||||
|
||||
## Cookie for distributed node communication. All nodes in the same cluster
|
||||
## should use the same cookie or they will not be able to communicate.
|
||||
@@ -155,7 +155,7 @@
|
||||
erlang.max_ports = 64000
|
||||
|
||||
## Set the location of crash dumps
|
||||
-erlang.crash_dump = ./log/erl_crash.dump
|
||||
+erlang.crash_dump = %%LEOFS_LOGDIR%%/leo_manager_slave/erl_crash.dump
|
||||
|
||||
## Raise the ETS table limit
|
||||
erlang.max_ets_tables = 256000
|
||||
@@ -167,4 +167,4 @@
|
||||
process_limit = 1048576
|
||||
|
||||
## Path of SNMP-agent configuration
|
||||
-## snmp_conf = ./snmp/snmpa_manager_1/leo_manager_snmp
|
||||
+snmp_conf = %%PREFIX%%/lib/leofs/snmp/snmpa_manager_slave/leo_manager_snmp
|
||||
@@ -1,108 +0,0 @@
|
||||
--- apps/leo_manager/priv/leo_manager_1.schema.orig 2014-06-15 20:05:45.000000000 +0300
|
||||
+++ apps/leo_manager/priv/leo_manager_1.schema 2014-06-15 20:06:47.000000000 +0300
|
||||
@@ -37,7 +37,7 @@
|
||||
"sasl.sasl_error_logger",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/sasl/sasl-error.log"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/sasl/sasl-error.log"}
|
||||
]}.
|
||||
|
||||
{translation, "sasl.sasl_error_logger",
|
||||
@@ -63,7 +63,7 @@
|
||||
"sasl.error_logger_mf_dir",
|
||||
"sasl.error_logger_mf_dir",
|
||||
[
|
||||
- {default, "./log/sasl"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/sasl"}
|
||||
]}.
|
||||
|
||||
%% @doc Specifies how large each individual file can be.
|
||||
@@ -167,7 +167,7 @@
|
||||
"mnesia.dir",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./work/mnesia/127.0.0.1"}
|
||||
+ {default, "%%LEOFS_DBDIR%%/leo_manager_slave/mnesia/127.0.0.1"}
|
||||
]}.
|
||||
|
||||
%% @doc The write threshold for transaction log dumps
|
||||
@@ -209,7 +209,7 @@
|
||||
"leo_manager.log_dir",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/erlang"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/erlang"}
|
||||
]}.
|
||||
|
||||
%% @doc Output log file(s) - app
|
||||
@@ -218,7 +218,7 @@
|
||||
"leo_manager.log_appender",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/app"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/app"}
|
||||
]}.
|
||||
|
||||
{translation, "leo_manager.log_appender",
|
||||
@@ -233,7 +233,7 @@
|
||||
"leo_redundant_manager.log_dir_member",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/ring"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/ring"}
|
||||
]}.
|
||||
|
||||
%% @doc Output log file(s) - ring
|
||||
@@ -242,7 +242,7 @@
|
||||
"leo_redundant_manager.log_dir_ring",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/ring"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/ring"}
|
||||
]}.
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
"queue_dir",
|
||||
"leo_manager.queue_dir",
|
||||
[
|
||||
- {default, "./work/queue"}
|
||||
+ {default, "%%LEOFS_DBDIR%%/leo_manager_slave/queue"}
|
||||
]}.
|
||||
|
||||
%% @doc Directory of SNMP agent configuration
|
||||
@@ -262,7 +262,7 @@
|
||||
"snmp_agent",
|
||||
"leo_manager.snmp_agent",
|
||||
[
|
||||
- {default, "./snmp/snmpa_manager_0/LEO-MANAGER"}
|
||||
+ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager/LEO-MANAGER"}
|
||||
]}.
|
||||
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
"nodename",
|
||||
"vm_args.-name",
|
||||
[
|
||||
- {default, "manager_0@127.0.0.1"}
|
||||
+ {default, "manager_slave@127.0.0.1"}
|
||||
]}.
|
||||
|
||||
%% @doc Cookie for distributed node communication. All nodes in the same cluster
|
||||
@@ -474,7 +474,7 @@
|
||||
"erlang.crash_dump",
|
||||
"vm_args.-env ERL_CRASH_DUMP",
|
||||
[
|
||||
- {default, "./log/erl_crash.dump"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_manager_slave/erl_crash.dump"}
|
||||
]}.
|
||||
|
||||
%% @doc Raise the ETS table limit
|
||||
@@ -513,5 +513,5 @@
|
||||
"snmp_conf",
|
||||
"vm_args.-config",
|
||||
[
|
||||
- {default, "./snmp/snmpa_manager_0/leo_manager_snmp"}
|
||||
+ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager_slave/leo_manager_snmp"}
|
||||
]}.
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
--- apps/leo_manager/snmp/snmpa_manager_0/leo_manager_snmp.config.orig 2014-06-15 21:57:21.000000000 +0300
|
||||
+++ apps/leo_manager/snmp/snmpa_manager_0/leo_manager_snmp.config 2014-06-15 21:59:33.000000000 +0300
|
||||
@@ -1,6 +1,6 @@
|
||||
[{snmp, [{agent, [{versions, [v1, v2]},
|
||||
- {db_dir, "snmp/snmpa_manager_0/db"},
|
||||
- {config, [{dir, "snmp/snmpa_manager_0/agent/conf"},
|
||||
+ {db_dir, "%%LEOFS_DBDIR%%/snmp/snmpa_manager"},
|
||||
+ {config, [{dir, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager/agent/conf"},
|
||||
{verbosity, silence}]},
|
||||
{net_if, [{verbosity, silence}]}
|
||||
]},
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
--- apps/leo_manager/snmp/snmpa_manager_1/leo_manager_snmp.config.orig 2014-06-15 21:57:21.000000000 +0300
|
||||
+++ apps/leo_manager/snmp/snmpa_manager_1/leo_manager_snmp.config 2014-06-15 21:59:33.000000000 +0300
|
||||
@@ -1,6 +1,6 @@
|
||||
[{snmp, [{agent, [{versions, [v1, v2]},
|
||||
- {db_dir, "snmp/snmpa_manager_1/db"},
|
||||
- {config, [{dir, "snmp/snmpa_manager_1/agent/conf"},
|
||||
+ {db_dir, "%%LEOFS_DBDIR%%/snmp/snmpa_manager_slave"},
|
||||
+ {config, [{dir, "%%PREFIX%%/lib/leofs/snmp/snmpa_manager_slave/agent/conf"},
|
||||
{verbosity, silence}]},
|
||||
{net_if, [{verbosity, silence}]}
|
||||
]},
|
||||
@@ -1,103 +0,0 @@
|
||||
--- apps/leo_storage/priv/leo_storage.conf.orig 2017-11-22 13:11:55.000000000 +0000
|
||||
+++ apps/leo_storage/priv/leo_storage.conf 2017-11-29 20:42:19.732467000 +0000
|
||||
@@ -16,7 +16,7 @@
|
||||
## about configuration parameters
|
||||
|
||||
## SASL error log path
|
||||
-## sasl.sasl_error_log = ./log/sasl/sasl-error.log
|
||||
+## sasl.sasl_error_log = %%LEOFS_LOGDIR%%/leo_storage/sasl/sasl-error.log
|
||||
|
||||
## Restricts the error logging performed by the specified sasl_error_logger
|
||||
## to error reports, progress reports, or both.
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
## Specifies in which directory the files are stored.
|
||||
## If this parameter is undefined or false, the error_logger_mf_h is not installed.
|
||||
-## sasl.error_logger_mf_dir = ./log/sasl
|
||||
+## sasl.error_logger_mf_dir = %%LEOFS_LOGDIR%%/leo_storage/sasl
|
||||
|
||||
## Specifies how large each individual file can be.
|
||||
## If this parameter is undefined, the error_logger_mf_h is not installed.
|
||||
@@ -39,13 +39,13 @@
|
||||
## Manager's Node(s)
|
||||
## --------------------------------------------------------------------
|
||||
## Name of Manager node(s)
|
||||
-managers = [manager_0@127.0.0.1, manager_1@127.0.0.1]
|
||||
+managers = [manager@127.0.0.1, manager_slave@127.0.0.1]
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
## STORAGE
|
||||
## --------------------------------------------------------------------
|
||||
## Object container
|
||||
-obj_containers.path = [./avs]
|
||||
+obj_containers.path = [%%LEOFS_DBDIR%%/leo_storage/avs]
|
||||
obj_containers.num_of_containers = [8]
|
||||
|
||||
## e.g. Case of plural pathes
|
||||
@@ -313,16 +313,16 @@
|
||||
## log.access_log_level = 0
|
||||
|
||||
## Output log file(s) - Erlang's log
|
||||
-## log.erlang = ./log/erlang
|
||||
+## log.erlang = %%LEOFS_LOGDIR%%/leo_storage/erlang
|
||||
|
||||
## Output log file(s) - app
|
||||
-## log.app = ./log/app
|
||||
+## log.app = %%LEOFS_LOGDIR%%/leo_storage/app
|
||||
|
||||
## Output log file(s) - members of storage-cluster
|
||||
-## log.member_dir = ./log/ring
|
||||
+## log.member_dir = %%LEOFS_LOGDIR%%/leo_storage/ring
|
||||
|
||||
## Output log file(s) - ring
|
||||
-## log.ring_dir = ./log/ring
|
||||
+## log.ring_dir = %%LEOFS_LOGDIR%%/leo_storage/ring
|
||||
|
||||
## Output data-diagnosis log
|
||||
log.is_enable_diagnosis_log = true
|
||||
@@ -331,10 +331,10 @@
|
||||
## STORAGE - Other Directories
|
||||
## --------------------------------------------------------------------
|
||||
## Directory of db for MQs
|
||||
-## queue_dir = ./work/queue
|
||||
+## queue_dir = %%LEOFS_DBDIR%%/leo_storage/queue
|
||||
|
||||
## Directory of SNMP agent configuration
|
||||
-## snmp_agent = ./snmp/snmpa_storage_0/LEO-STORAGE
|
||||
+## snmp_agent = %%PREFIX%%/lib/leofs/snmp/snmpa_storage/LEO-STORAGE
|
||||
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
@@ -344,7 +344,7 @@
|
||||
leo_ordning_reda.send_after_interval = 0
|
||||
|
||||
## Temporary directory of stacked objects
|
||||
-## leo_ordning_reda.temp_stacked_dir = "work/ord_reda/"
|
||||
+## leo_ordning_reda.temp_stacked_dir = %%LEOFS_DBDIR%%/leo_storage/ord_reda/
|
||||
|
||||
|
||||
## --------------------------------------------------------------------
|
||||
@@ -418,7 +418,7 @@
|
||||
## For vm.args
|
||||
##======================================================================
|
||||
## Name of the leofs-storage node
|
||||
-nodename = storage_0@127.0.0.1
|
||||
+nodename = storage@127.0.0.1
|
||||
|
||||
## Cookie for distributed node communication. All nodes in the same cluster
|
||||
## should use the same cookie or they will not be able to communicate.
|
||||
@@ -434,7 +434,7 @@
|
||||
erlang.max_ports = 64000
|
||||
|
||||
## Set the location of crash dumps
|
||||
-erlang.crash_dump = ./log/erl_crash.dump
|
||||
+erlang.crash_dump = %%LEOFS_LOGDIR%%/leo_storage/erl_crash.dump
|
||||
|
||||
## Raise the ETS table limit
|
||||
erlang.max_ets_tables = 256000
|
||||
@@ -464,4 +464,4 @@
|
||||
process_limit = 1048576
|
||||
|
||||
## Path of SNMP-agent configuration
|
||||
-## snmp_conf = ./snmp/snmpa_storage_0/leo_storage_snmp
|
||||
+snmp_conf = %%PREFIX%%/lib/leofs/snmp/snmpa_storage/leo_storage_snmp
|
||||
@@ -1,117 +0,0 @@
|
||||
--- apps/leo_storage/priv/leo_storage.schema.orig 2014-12-17 11:21:38.000000000 +0200
|
||||
+++ apps/leo_storage/priv/leo_storage.schema 2014-12-20 00:06:58.000000000 +0200
|
||||
@@ -37,7 +37,7 @@
|
||||
"sasl.sasl_error_logger",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/sasl/sasl-error.log"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_storage/sasl/sasl-error.log"}
|
||||
]}.
|
||||
|
||||
{translation, "sasl.sasl_error_logger",
|
||||
@@ -63,7 +63,7 @@
|
||||
"sasl.error_logger_mf_dir",
|
||||
"sasl.error_logger_mf_dir",
|
||||
[
|
||||
- {default, "./log/sasl"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_storage/sasl"}
|
||||
]}.
|
||||
|
||||
%% @doc Specifies how large each individual file can be.
|
||||
@@ -104,7 +104,7 @@
|
||||
Managers = cuttlefish_util:conf_get_value("managers", Conf),
|
||||
case string:tokens(Managers, "[ , ]") of
|
||||
[] ->
|
||||
- ['manager_0@127.0.0.1', 'manager_1@127.0.0.1'];
|
||||
+ ['manager@127.0.0.1', 'manager_slave@127.0.0.1'];
|
||||
Tokens ->
|
||||
lists:map(fun(X) ->
|
||||
list_to_atom(X)
|
||||
@@ -146,7 +146,7 @@
|
||||
Paths = cuttlefish_util:conf_get_value("obj_containers.path", Conf),
|
||||
Paths_1 = case string:tokens(Paths, "[ , ]") of
|
||||
[] ->
|
||||
- ["./avs"];
|
||||
+ ["%%LEOFS_DBDIR%%/leo_storage/avs"];
|
||||
Tokens_1 ->
|
||||
Tokens_1
|
||||
end,
|
||||
@@ -780,7 +780,7 @@
|
||||
"leo_storage.log_dir",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/erlang"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_storage/erlang"}
|
||||
]}.
|
||||
|
||||
%% @doc Output log file(s) - app
|
||||
@@ -789,7 +789,7 @@
|
||||
"leo_storage.log_appender",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/app"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_storage/app"}
|
||||
]}.
|
||||
|
||||
{translation, "leo_storage.log_appender",
|
||||
@@ -804,7 +804,7 @@
|
||||
"leo_redundant_manager.log_dir_member",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/ring"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_storage/ring"}
|
||||
]}.
|
||||
|
||||
%% @doc Output log file(s) - ring
|
||||
@@ -813,7 +813,7 @@
|
||||
"leo_redundant_manager.log_dir_ring",
|
||||
[
|
||||
{datatype, string},
|
||||
- {default, "./log/ring"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_storage/ring"}
|
||||
]}.
|
||||
|
||||
%% @doc is enable data-diagnosis log
|
||||
@@ -833,7 +833,7 @@
|
||||
"queue_dir",
|
||||
"leo_storage.queue_dir",
|
||||
[
|
||||
- {default, "./work/queue"}
|
||||
+ {default, "%%LEOFS_DBDIR%%/leo_storage/queue"}
|
||||
]}.
|
||||
|
||||
%% @doc Directory of SNMP agent configuration
|
||||
@@ -841,7 +841,7 @@
|
||||
"snmp_agent",
|
||||
"leo_storage.snmp_agent",
|
||||
[
|
||||
- {default, "./snmp/snmpa_storage_0/LEO-STORAGE"}
|
||||
+ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_storage/LEO-STORAGE"}
|
||||
]}.
|
||||
|
||||
|
||||
@@ -1070,7 +1070,7 @@
|
||||
"nodename",
|
||||
"vm_args.-name",
|
||||
[
|
||||
- {default, "storage_0@127.0.0.1"}
|
||||
+ {default, "storage@127.0.0.1"}
|
||||
]}.
|
||||
|
||||
%% @doc Cookie for distributed node communication. All nodes in the same cluster
|
||||
@@ -1121,7 +1121,7 @@
|
||||
"erlang.crash_dump",
|
||||
"vm_args.-env ERL_CRASH_DUMP",
|
||||
[
|
||||
- {default, "./log/erl_crash.dump"}
|
||||
+ {default, "%%LEOFS_LOGDIR%%/leo_storage/erl_crash.dump"}
|
||||
]}.
|
||||
|
||||
%% @doc Raise the ETS table limit
|
||||
@@ -1202,5 +1202,5 @@
|
||||
"snmp_conf",
|
||||
"vm_args.-config",
|
||||
[
|
||||
- {default, "./snmp/snmpa_storage_0/leo_storage_snmp"}
|
||||
+ {default, "%%PREFIX%%/lib/leofs/snmp/snmpa_storage/leo_storage_snmp"}
|
||||
]}.
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
--- apps/leo_storage/snmp/snmpa_storage_0/leo_storage_snmp.config.orig 2014-06-15 22:07:24.000000000 +0300
|
||||
+++ apps/leo_storage/snmp/snmpa_storage_0/leo_storage_snmp.config 2014-06-15 22:08:18.000000000 +0300
|
||||
@@ -1,6 +1,6 @@
|
||||
[{snmp, [{agent, [{versions, [v1, v2]},
|
||||
- {db_dir, "snmp/snmpa_storage_0/db"},
|
||||
- {config, [{dir, "snmp/snmpa_storage_0/agent/conf"},
|
||||
+ {db_dir, "%%LEOFS_DBDIR%%/snmp/snmpa_storage"},
|
||||
+ {config, [{dir, "%%PREFIX%%/lib/leofs/snmp/snmpa_storage/agent/conf"},
|
||||
{verbosity, silence}]},
|
||||
{net_if, [{verbosity, silence}]}
|
||||
]},
|
||||
@@ -1,13 +0,0 @@
|
||||
--- deps/bcrypt/rebar.config.orig 2017-05-16 10:06:50.323294000 +0300
|
||||
+++ deps/bcrypt/rebar.config 2017-05-16 10:14:15.468298000 +0300
|
||||
@@ -16,8 +16,8 @@
|
||||
%% These post_hooks are for rebar2. rebar.config.script removes them if
|
||||
%% rebar3 is detected
|
||||
{post_hooks,
|
||||
- [{clean, "make -C c_src clean"},
|
||||
- {compile, "make -C c_src"}]}.
|
||||
+ [{clean, "gmake -C c_src clean"},
|
||||
+ {compile, "gmake -C c_src"}]}.
|
||||
|
||||
%% plugins and provider_hooks are for rebar3. rebar.config.script removes them
|
||||
%% if rebar2 is detected
|
||||
@@ -1,31 +0,0 @@
|
||||
Don't remove /dev/null on 8.x (see kern/139014)
|
||||
-bdrewery 09/27/2013
|
||||
--- deps/eleveldb/c_src/leveldb/build_detect_platform.orig 2014-01-10 00:50:17.000000000 +0000
|
||||
+++ deps/eleveldb/c_src/leveldb/build_detect_platform 2014-07-06 14:20:03.716601064 +0000
|
||||
@@ -134,7 +134,7 @@
|
||||
true
|
||||
else
|
||||
# If -std=c++0x works, use <cstdatomic>. Otherwise use port_posix.h.
|
||||
- $CXX $CFLAGS -std=c++0x -x c++ - -o /dev/null 2>/dev/null <<EOF
|
||||
+ $CXX $CFLAGS -std=c++0x -x c++ - 2>/dev/null <<EOF
|
||||
#include <cstdatomic>
|
||||
int main() {}
|
||||
EOF
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
# Test whether Snappy library is installed
|
||||
# http://code.google.com/p/snappy/
|
||||
- $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
|
||||
+ $CXX $CFLAGS -x c++ - 2>/dev/null <<EOF
|
||||
#include <snappy.h>
|
||||
int main() {}
|
||||
EOF
|
||||
@@ -157,7 +157,7 @@
|
||||
fi
|
||||
|
||||
# Test whether tcmalloc is available
|
||||
- $CXX $CFLAGS -x c++ - -o /dev/null -ltcmalloc 2>/dev/null <<EOF
|
||||
+ $CXX $CFLAGS -x c++ - -ltcmalloc 2>/dev/null <<EOF
|
||||
int main() {}
|
||||
EOF
|
||||
if [ "$?" = 0 ]; then
|
||||
@@ -1,11 +0,0 @@
|
||||
--- deps/leveldb/include/leveldb/env.h.orig 2015-06-06 06:41:04.463152255 +0000
|
||||
+++ deps/leveldb/include/leveldb/env.h 2015-06-06 06:46:21.094442005 +0000
|
||||
@@ -13,6 +13,8 @@
|
||||
#ifndef STORAGE_LEVELDB_INCLUDE_ENV_H_
|
||||
#define STORAGE_LEVELDB_INCLUDE_ENV_H_
|
||||
|
||||
+#include <pthread.h>
|
||||
+
|
||||
#include <cstdarg>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -1,11 +0,0 @@
|
||||
--- deps/leveldb/port/atomic_pointer.h.orig 2021-05-20 13:33:22 UTC
|
||||
+++ deps/leveldb/port/atomic_pointer.h
|
||||
@@ -116,7 +116,7 @@ class AtomicPointer {
|
||||
|
||||
// AtomicPointer based on <cstdatomic>
|
||||
#elif defined(LEVELDB_CSTDATOMIC_PRESENT)
|
||||
-#include <cstdatomic>
|
||||
+#include <atomic>
|
||||
|
||||
class AtomicPointer {
|
||||
private:
|
||||
@@ -1,8 +0,0 @@
|
||||
--- make_reltool.sh.orig 2018-04-24 12:31:51.000000000 +0200
|
||||
+++ make_reltool.sh 2018-06-11 15:59:25.081369000 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
|
||||
# requires first parameter to be either "yes" or "no", which is done by "make reltool"
|
||||
with_sd_notify=$1
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
%%PREFIX%%/sbin/leofs gateway "$@"
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
%%PREFIX%%/sbin/leofs manager "$@"
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
%%PREFIX%%/sbin/leofs manager_slave "$@"
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
%%PREFIX%%/sbin/leofs storage "$@"
|
||||
@@ -1,665 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Manage LeoFS servers.
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# GLOBALS
|
||||
#-------------------------------------------------------------------------------
|
||||
LEOFS_SERVERS="
|
||||
gateway
|
||||
manager
|
||||
manager_slave
|
||||
storage
|
||||
"
|
||||
|
||||
LEOFS_COMMANDS=
|
||||
LEOFS_COMMANDS_MINIHELP=
|
||||
|
||||
PROGNAME=$(basename $0)
|
||||
PROGPATH=$(realpath $0)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Functions
|
||||
#-------------------------------------------------------------------------------
|
||||
in_list()
|
||||
{
|
||||
local needle=$1
|
||||
local i
|
||||
|
||||
shift
|
||||
|
||||
for i
|
||||
do
|
||||
test "$i" = "$needle" && return 0
|
||||
done
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
usage()
|
||||
{
|
||||
local servers
|
||||
|
||||
servers=$(echo $LEOFS_SERVERS | sed -e 's/ /|/g')
|
||||
|
||||
echo "usage: ${PROGNAME} [help | -h | --help]"
|
||||
echo " ${PROGNAME} ${servers} <command> [<args>]"
|
||||
echo
|
||||
echo "Commands:"
|
||||
echo "$LEOFS_COMMANDS_MINIHELP"
|
||||
echo
|
||||
echo "See '${PROGNAME} help <command>' for more information on a specific command."
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# cmd utils
|
||||
#-------------------------------------------------------------------------------
|
||||
register_cmd()
|
||||
{
|
||||
local cmd=$1
|
||||
|
||||
LEOFS_COMMANDS="${LEOFS_COMMANDS} ${cmd}"
|
||||
LEOFS_COMMANDS_MINIHELP=$(printf "%s\n %-16s%s" \
|
||||
"${LEOFS_COMMANDS_MINIHELP}" "${cmd}" "$(cmd_${cmd} help_summary)")
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
check_cmd()
|
||||
{
|
||||
local cmd=$1
|
||||
|
||||
if ! in_list "$cmd" $LEOFS_COMMANDS
|
||||
then
|
||||
echo "unknown command: $1" >&2
|
||||
echo >&2
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
run_cmd()
|
||||
{
|
||||
local cmd=$1
|
||||
|
||||
check_cmd "${cmd}"
|
||||
|
||||
shift
|
||||
|
||||
"cmd_${cmd}" "$@"
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
print_cmd_help()
|
||||
{
|
||||
local cmd=$1
|
||||
local desc
|
||||
|
||||
check_cmd "${cmd}"
|
||||
|
||||
echo "NAME"
|
||||
echo " ${cmd} - $(cmd_${cmd} help_summary)"
|
||||
echo
|
||||
echo "SYNOPSIS"
|
||||
echo " $(cmd_${cmd} help_synopsis)"
|
||||
|
||||
desc="$(cmd_${cmd} help_desc)"
|
||||
|
||||
if [ -n "${desc}" ]
|
||||
then
|
||||
echo
|
||||
echo "DESCRIPTION"
|
||||
echo -n "${desc}" | sed -e 's/^/ /'
|
||||
fi
|
||||
|
||||
opts="$(cmd_${cmd} help_opts)"
|
||||
|
||||
if [ -n "${opts}" ]
|
||||
then
|
||||
echo
|
||||
echo "OPTIONS"
|
||||
echo -n "${opts}" | sed -e 's/^/ /'
|
||||
fi
|
||||
|
||||
echo
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# make ENV
|
||||
#-------------------------------------------------------------------------------
|
||||
check_app()
|
||||
{
|
||||
local app=$1
|
||||
|
||||
if ! in_list "${app}" $LEOFS_SERVERS
|
||||
then
|
||||
echo "unknown server: $1" >&2
|
||||
echo >&2
|
||||
usage >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
setusercontext()
|
||||
{
|
||||
local cmd
|
||||
|
||||
: ${LEOFS_USER=%%LEOFS_USER%%}
|
||||
|
||||
user=`whoami`
|
||||
|
||||
if [ ${user} = ${LEOFS_USER} ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ ${user} != root ]
|
||||
then
|
||||
echo "Must be run as ${LEOFS_USER} user or root (or set LEOFS_USER)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Restart as LEOFS_USER
|
||||
|
||||
cmd="${PROGPATH} $@"
|
||||
|
||||
exec /usr/bin/su -m ${LEOFS_USER} -c "${cmd}"
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
gen_config()
|
||||
{
|
||||
local args cfg_dir app_config vm_args res snmp_cfg dir
|
||||
|
||||
cfg_dir=${LEOFS_DBDIR}/etc
|
||||
|
||||
mkdir -p ${cfg_dir}
|
||||
|
||||
if [ ${LEOFS_ETCDIR}/${LEOFS_SERVER}.conf -ot ${cfg_dir}/app.config ]
|
||||
then
|
||||
return
|
||||
fi
|
||||
|
||||
rm -f ${cfg_dir}/app.*.config ${cfg_dir}/vm.*.args
|
||||
|
||||
args=`PATH=${ERTS_PATH}:${PATH} \
|
||||
${LEOFS_BASEDIR}/bin/cuttlefish \
|
||||
-i ${LEOFS_BASEDIR}/etc/${LEOFS_SERVER}.schema \
|
||||
-c ${LEOFS_ETCDIR}/${LEOFS_SERVER}.conf \
|
||||
-d ${cfg_dir}`
|
||||
|
||||
app_config=`echo ${args} | sed -nEe 's/^.*(app\.[0-9.]*\.config).*$/\1/p'`
|
||||
vm_args=`echo ${args} | sed -nEe 's/^.*(vm\.[0-9.]*\.args).*$/\1/p'`
|
||||
|
||||
if [ -z "${app_config}" -o -z "${vm_args}" ]
|
||||
then
|
||||
echo "Failed to parse ${LEOFS_SERVER}.conf" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Sanity check the app.config file
|
||||
res=`${ERTS_PATH}/escript \
|
||||
${ERTS_PATH}/nodetool chkconfig ${cfg_dir}/${app_config}`
|
||||
if [ "${res}" != "ok" ]
|
||||
then
|
||||
echo "Error reading ${app_config}: ${res}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv ${cfg_dir}/$app_config ${cfg_dir}/app.config
|
||||
mv ${cfg_dir}/$vm_args ${cfg_dir}/vm.args
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
make_env()
|
||||
{
|
||||
local app=${1#leo_} # Remove 'leo_' prefix in server name if present.
|
||||
local user
|
||||
|
||||
check_app "${app}"
|
||||
|
||||
LEOFS_SERVER=leo_${app}
|
||||
|
||||
LEOFS_ETCDIR=%%LEOFS_ETCDIR%%
|
||||
LEOFS_BASEDIR=%%LEOFS_BASEDIR%%
|
||||
LEOFS_DBDIR=%%LEOFS_DBDIR%%/${LEOFS_SERVER}
|
||||
LEOFS_RUNDIR=%%LEOFS_RUNDIR%%
|
||||
LEOFS_PIPE=${LEOFS_RUNDIR}/${LEOFS_SERVER}.pipe
|
||||
LEOFS_LOGDIR=%%LEOFS_LOGDIR%%/${LEOFS_SERVER}
|
||||
|
||||
START_ERL=`cat ${LEOFS_BASEDIR}/releases/${LEOFS_SERVER%_slave}/start_erl.data`
|
||||
ERTS_VSN=${START_ERL% *}
|
||||
APP_VSN=${START_ERL#* }
|
||||
ERTS_PATH=${LEOFS_BASEDIR}/erts-${ERTS_VSN}/bin
|
||||
|
||||
: ${ERLEXEC_MODE=embedded}
|
||||
|
||||
LEOFS_BOOT=${LEOFS_BASEDIR}/releases/${LEOFS_SERVER%_slave}/${APP_VSN}/${LEOFS_SERVER%_slave}
|
||||
|
||||
HOME=%%LEOFS_DBDIR%%
|
||||
cd ${HOME}
|
||||
|
||||
setusercontext "$@"
|
||||
|
||||
gen_config
|
||||
|
||||
snmp_cfg=`sed -nEe 's/^-config *(.*)$/\1.config/p' ${LEOFS_DBDIR}/etc/vm.args`
|
||||
|
||||
sed -nEe 's:^.*dir, *"((%%LEOFS_DBDIR%%|%%LEOFS_LOGDIR%%)[^"]*)".*$:\1:p' \
|
||||
${LEOFS_DBDIR}/etc/app.config ${snmp_cfg} | sort -u |
|
||||
while read dir
|
||||
do
|
||||
mkdir -p "${dir}"
|
||||
done
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Erlang tools
|
||||
#-------------------------------------------------------------------------------
|
||||
nodetool()
|
||||
{
|
||||
local cmd=$1 ; shift
|
||||
local vmargs_path name_arg cookie_arg
|
||||
|
||||
vmargs_path=${LEOFS_DBDIR}/etc/vm.args
|
||||
|
||||
name_arg=`egrep '^-s?name' ${vmargs_path}`
|
||||
if [ -z "${name_arg}" ]
|
||||
then
|
||||
echo "vm.args needs either -name or -sname parameter" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cookie_arg=`grep '^-setcookie' ${vmargs_path}`
|
||||
if [ -z "${cookie_arg}" ]
|
||||
then
|
||||
echo "vm.args needs a -setcookie parameter" 2>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${ERTS_PATH}/escript ${ERTS_PATH}/nodetool ${name_arg} ${cookie_arg} ${cmd}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
check_node()
|
||||
{
|
||||
local expected_state=$1
|
||||
local status
|
||||
|
||||
nodetool ping >/dev/null 2>&1
|
||||
status=$?
|
||||
|
||||
if [ "${expected_state}" = DOWN ]
|
||||
then
|
||||
if [ ${status} -eq 0 ]
|
||||
then
|
||||
echo "Node is already running" >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [ ${status} -ne 0 ]
|
||||
then
|
||||
echo "Node is not running" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
remsh()
|
||||
{
|
||||
local vmargs_path name_arg cookie_arg
|
||||
local remsh_type remsh_name remsh_name_arg remsh_remsh_arg
|
||||
|
||||
vmargs_path=${LEOFS_DBDIR}/etc/vm.args
|
||||
|
||||
name_arg=`egrep '^-s?name' ${vmargs_path}`
|
||||
if [ -z "${name_arg}" ]
|
||||
then
|
||||
echo "vm.args needs either -name or -sname parameter" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cookie_arg=`grep '^-setcookie' ${vmargs_path}`
|
||||
if [ -z "${cookie_arg}" ]
|
||||
then
|
||||
echo "vm.args needs a -setcookie parameter" 2>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract the name type and name from the name_arg for remsh
|
||||
remsh_type=${name_arg% *}
|
||||
remsh_name=${name_arg#* }
|
||||
|
||||
# `date +%s` is used to allow multiple remsh to the same node transparently
|
||||
remsh_name_arg="${remsh_type} remsh$(date +%s)@${remsh_name#*@}"
|
||||
remsh_remsh_arg="-remsh ${remsh_name}"
|
||||
|
||||
${ERTS_PATH}/erl ${remsh_name_arg} ${remsh_remsh_arg} ${cookie_arg}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Commands
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_help()
|
||||
{
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "Display help information about ${PROGNAME}"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} help [<command>]"
|
||||
exit
|
||||
;;
|
||||
help_desc)
|
||||
echo "With no command given, the synopsis of the ${PROGNAME} command"
|
||||
echo "and a list of possible ${PROGNAME} commands are printed on the"
|
||||
echo "standard output."
|
||||
echo
|
||||
echo "If a ${PROGNAME} command is named, a mini help for that command is"
|
||||
echo "brought up."
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$1" ]
|
||||
then
|
||||
print_cmd_help "$1"
|
||||
else
|
||||
usage
|
||||
fi
|
||||
}
|
||||
|
||||
register_cmd help
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_attach()
|
||||
{
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "Attach to the running node"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} <server> attach"
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
check_node UP
|
||||
|
||||
${ERTS_PATH}/to_erl ${LEOFS_PIPE}
|
||||
}
|
||||
|
||||
register_cmd attach
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_console()
|
||||
{
|
||||
local config_path vmargs_path cmd
|
||||
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "Start the server in console"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} <server> console"
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
export ROOTDIR=${LEOFS_BASEDIR}
|
||||
export BINDIR=${ERTS_PATH}
|
||||
export EMU=beam
|
||||
export PROGNAME=${PROGNAME}
|
||||
|
||||
config_path=${LEOFS_DBDIR}/etc/app.config
|
||||
vmargs_path=${LEOFS_DBDIR}/etc/vm.args
|
||||
|
||||
cmd="${BINDIR}/erlexec -boot ${LEOFS_BOOT} -mode ${ERLEXEC_MODE} \
|
||||
-config ${config_path} -args_file ${vmargs_path} -- console $@"
|
||||
|
||||
# Dump environment info for logging purposes
|
||||
echo Exec: ${cmd}
|
||||
echo Root: ${ROOTDIR}
|
||||
|
||||
${cmd}
|
||||
}
|
||||
|
||||
register_cmd console
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_console_clean()
|
||||
{
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "Start the VM in console using start_clean.boot"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} <server> cosole_clean"
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
LEOFS_BOOT=$(dirname ${LEOFS_BOOT})/start_clean
|
||||
|
||||
cmd_console
|
||||
}
|
||||
|
||||
register_cmd console_clean
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_ping()
|
||||
{
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "See if the VM is alive"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} <server> ping"
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
nodetool ping
|
||||
}
|
||||
|
||||
register_cmd ping
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_reboot()
|
||||
{
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "Restart the VM completely (uses heart to restart it)"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} <server> reboot"
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
nodetool reboot
|
||||
}
|
||||
|
||||
register_cmd reboot
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_remote_console()
|
||||
{
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "Run remote shell command to control node"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} <server> remote_console"
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
check_node UP
|
||||
|
||||
remsh "$@"
|
||||
}
|
||||
|
||||
register_cmd remote_console
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_restart()
|
||||
{
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "Restart the VM without exiting the process"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} <server> restart"
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
nodetool restart
|
||||
}
|
||||
|
||||
register_cmd restart
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_start()
|
||||
{
|
||||
local i res
|
||||
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "Launch the application"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} <server> start"
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
check_node DOWN
|
||||
|
||||
export HEART_COMMAND="${PROGPATH} ${LEOFS_SERVER} start"
|
||||
|
||||
${ERTS_PATH}/run_erl -daemon ${LEOFS_PIPE} ${LEOFS_LOGDIR} \
|
||||
"exec ${PROGPATH} ${LEOFS_SERVER} console $@" 2>&1
|
||||
res=$?
|
||||
|
||||
if [ "${res}" -ne 0 ]
|
||||
then
|
||||
exit ${res}
|
||||
fi
|
||||
|
||||
# Wait up to 1 minute for the node to start responding on ping.
|
||||
for i in `jot 60`
|
||||
do
|
||||
nodetool ping >/dev/null 2>&1 || exit 0
|
||||
sleep 1
|
||||
done
|
||||
exit 1
|
||||
}
|
||||
|
||||
register_cmd start
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
cmd_stop()
|
||||
{
|
||||
local pid res i
|
||||
|
||||
case "$1" in
|
||||
help_summary)
|
||||
echo "Stop the application"
|
||||
exit
|
||||
;;
|
||||
help_synopsis)
|
||||
echo "${PROGNAME} <server> stop"
|
||||
exit
|
||||
;;
|
||||
help_*)
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
|
||||
pid=`ps xww -o pid= -o command= |
|
||||
grep "${LEOFS_BASEDIR}.*/[b]eam.*${LEOFS_SERVER}" |
|
||||
awk '{print $1}'`
|
||||
|
||||
nodetool stop > /dev/null
|
||||
res=$?
|
||||
|
||||
if [ "${res}" -ne 0 ]
|
||||
then
|
||||
if [ -z "${pid}" ]
|
||||
then
|
||||
echo "${LEOFS_SERVER} is not running"
|
||||
else
|
||||
echo "Failed to stop ${LEOFS_SERVER}"
|
||||
fi
|
||||
exit ${res}
|
||||
fi
|
||||
|
||||
# Wait up to 1 minute for the process to terminate.
|
||||
for i in `jot 60`
|
||||
do
|
||||
kill -0 ${pid} 2>/dev/null || exit 0
|
||||
sleep 1
|
||||
done
|
||||
echo "Failed to terminate the ${LEOFS_SERVER} process (pid ${pid})"
|
||||
exit 1
|
||||
}
|
||||
|
||||
register_cmd stop
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Main
|
||||
#-------------------------------------------------------------------------------
|
||||
if in_list "$1" "" "help" "-h" "--help" || test -z "$2"
|
||||
then
|
||||
cmd=help ; shift
|
||||
else
|
||||
make_env "$@"
|
||||
|
||||
app="$1" ; shift
|
||||
cmd="$1" ; shift
|
||||
fi
|
||||
|
||||
run_cmd "${cmd}" "$@"
|
||||
@@ -1,16 +0,0 @@
|
||||
LeoFS is a highly scalable, fault-tolerant distributed file system
|
||||
for the Web.
|
||||
|
||||
LeoFS provides High Cost Performance Ratio. It allows you to build
|
||||
LeoFS clusters using commodity hardware. LeoFS will require a smaller
|
||||
cluster than other storage to achieve the same performance. LeoFS is
|
||||
also very easy to setup and to operate.
|
||||
|
||||
LeoFS provides High Reliability thanks to its great design on top of
|
||||
the Erlang/OTP capabilities. LeoFS system will stay up regardless of
|
||||
software errors or hardware failures happening inside the cluster.
|
||||
|
||||
LeoFS provides High Scalability. Adding and removing nodes is simple
|
||||
and quick, allowing you to react swiftly when your needs change. A
|
||||
LeoFS cluster can be thought as elastic storage that you can stretch
|
||||
as much and as often as you need.
|
||||
@@ -1,18 +0,0 @@
|
||||
@dir(%%LEOFS_USER%%,%%LEOFS_GROUP%%,) %%LEOFS_RUNDIR%%
|
||||
@dir(%%LEOFS_USER%%,%%LEOFS_GROUP%%,) %%LEOFS_LOGDIR%%
|
||||
@dir(%%LEOFS_USER%%,%%LEOFS_GROUP%%,) %%LEOFS_DBDIR%%
|
||||
@sample %%ETCDIR%%/leo_gateway.conf.sample
|
||||
@sample %%ETCDIR%%/leo_manager.conf.sample
|
||||
@sample %%ETCDIR%%/leo_manager_slave.conf.sample
|
||||
@sample %%ETCDIR%%/leo_storage.conf.sample
|
||||
@sample %%ETCDIR%%/server_cert.pem.sample
|
||||
@sample %%ETCDIR%%/server_key.pem.sample
|
||||
sbin/leo_gateway
|
||||
sbin/leo_manager
|
||||
sbin/leo_manager_slave
|
||||
sbin/leo_storage
|
||||
sbin/leofs
|
||||
sbin/leofs-adm
|
||||
@comment Insert PLIST.leofs here
|
||||
@comment -=[ begin PLIST.leofs ]=-
|
||||
@comment -=[ end PLIST.leofs ]=-
|
||||
Reference in New Issue
Block a user