Skip to content

Commit

Permalink
Merge pull request #146 from jthiltges/pr/condorconfig
Browse files Browse the repository at this point in the history
Remove condor config.d file from xcache-reporter
  • Loading branch information
matyasselmeci authored Aug 25, 2023
2 parents 34ad658 + 48b4fac commit 94204f1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ install:
ln -srf $(DESTDIR)/$(INSTALL_XROOTD_DIR)/xrootd-stash-origin.cfg $(DESTDIR)/$(INSTALL_XROOTD_DIR)/xrootd-stash-origin-auth.cfg
mkdir -p $(DESTDIR)/$(INSTALL_XROOTD_DIR)/config.d
install -p -m 0644 $(XROOTD_CONFIGD) $(DESTDIR)/$(INSTALL_XROOTD_DIR)/config.d
# Condor config files
mkdir -p $(DESTDIR)/etc/condor/config.d
install -p -m 0644 configs/xcache/condor/01-xcache-reporter-auth.conf $(DESTDIR)/etc/condor/config.d/01-xcache-reporter-auth.conf
# XCache Consistency Check
mkdir -p $(DESTDIR)/usr/bin
mkdir -p $(DESTDIR)/var/lib/xcache-consistency-check
Expand Down
6 changes: 0 additions & 6 deletions configs/xcache/condor/01-xcache-reporter-auth.conf

This file was deleted.

1 change: 0 additions & 1 deletion rpm/xcache.spec
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ mkdir -p %{buildroot}%{_sysconfdir}/grid-security/xrd
%{_unitdir}/xcache-reporter.timer
%{_unitdir}/xrootd-renew-proxy.service
%{_unitdir}/xrootd-renew-proxy.timer
%config(noreplace) %{_sysconfdir}/condor/config.d/01-xcache-reporter-auth.conf
%config %{_sysconfdir}/xrootd/config.d/40-xcache-auth.cfg
%config(noreplace) %{_sysconfdir}/xrootd/config.d/90-xcache-logging.cfg
%config(noreplace) %{_sysconfdir}/xrootd/digauth.cfg
Expand Down
20 changes: 15 additions & 5 deletions src/xcache-reporter
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,21 @@ def main():
if 'TOOL_DEBUG' not in htcondor.param:
htcondor.param['TOOL_DEBUG'] = "D_ALL D_CATEGORY"

# Check for existence of host cert/key pair
for pki in 'cert', 'key':
pki_path = '/etc/grid-security/host%s.pem' % pki
if not os.path.exists(pki_path):
logging.error('Could not find host %s at %s', pki, pki_path)
# Advertise to the central collector with SSL (SOFTWARE-3940)
htcondor.param['SEC_CLIENT_AUTHENTICATION_METHODS'] = 'SSL'

# Set SSL client config if not defined
if 'AUTH_SSL_CLIENT_CERTFILE' not in htcondor.param:
htcondor.param['AUTH_SSL_CLIENT_CERTFILE'] = '/etc/grid-security/xrd/xrdcert.pem'
if 'AUTH_SSL_CLIENT_KEYFILE' not in htcondor.param:
htcondor.param['AUTH_SSL_CLIENT_KEYFILE'] = '/etc/grid-security/xrd/xrdkey.pem'
if 'AUTH_SSL_CLIENT_CADIR' not in htcondor.param:
htcondor.param['AUTH_SSL_CLIENT_CADIR'] = '/etc/grid-security/certificates'

# Check for existence of xrootd cert/key pair
for certfile in htcondor.param['AUTH_SSL_CLIENT_CERTFILE'], htcondor.param['AUTH_SSL_CLIENT_KEYFILE']:
if not os.path.exists(certfile):
logging.error('Could not find client SSL file %s', certfile)
sys.exit(1)

scr = StashCacheReporter(cache_path=args.cache_path, collectors=args.collectors,
Expand Down

0 comments on commit 94204f1

Please sign in to comment.