Skip to content

Commit

Permalink
Resolve merge conflict by incorporating both suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Fengping Hu committed May 28, 2024
2 parents 8de362a + 8add154 commit 06c1e5b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
25 changes: 10 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=hub.opensciencegrid.org/opensciencegrid/software-base:3.6-el7-release
ARG BASE_IMAGE=hub.opensciencegrid.org/opensciencegrid/software-base:23-el9-release
FROM ${BASE_IMAGE}
ARG BASE_IMAGE

Expand All @@ -12,22 +12,13 @@ RUN yum install -y \
git \
bc \
bind-utils \
cpio \
ed \
file \
bzip2 \
gnupg2 \
libaio \
rdate \
rng-tools \
rsync \
tcsh \
time \
wget \
which \
words \
xz \
zip \
yum-utils \
dos2unix \
man-db \
Expand All @@ -46,24 +37,28 @@ RUN yum install cuda-12-1 -y
#RUN yum localinstall -y https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/nvidia-driver-branch-535-535.86.10-1.el7.x86_64.rpm
#RUN yum install -y cuda-12-2

RUN yum install --enablerepo=osg-upcoming -y condor
RUN yum install -y https://linuxsoft.cern.ch/wlcg/centos7/x86_64/wlcg-repo-1.0.0-1.el7.noarch.rpm
RUN yum install -y https://linuxsoft.cern.ch/wlcg/el9/x86_64/wlcg-repo-1.0.0-1.el9.noarch.rpm
RUN yum install -y HEP_OSlibs
RUN yum install -y condor
RUN yum install -y python3-pip

RUN yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
RUN yum install -y docker-ce-cli
RUN yum install -y http://mirror.grid.uchicago.edu/pub/mwt2/sw/el7/mwt2-sysview-worker-2.0.5-1.noarch.rpm
RUN yum install -y python36-tabulate
RUN yum install -y http://mirror.grid.uchicago.edu/pub/mwt2/sw/el9/mwt2-sysview-worker-2.0.6-1.noarch.rpm

COPY condor/*.conf /etc/condor/config.d/
COPY cron/* /etc/cron.d/
COPY supervisor/* /etc/supervisord.d/
COPY image-config/* /etc/osg/image-config.d/
COPY libexec/* /usr/local/libexec/
COPY scripts/condor_node_check.sh /usr/local/sbin/
COPY scripts/entrypoint.sh /bin/entrypoint.sh

COPY prometheus/exporter.py /app/
RUN pip3 install prometheus_client

RUN pip install prometheus_client

RUN pip install python3-memcached
RUN chmod 755 /usr/local/sbin/condor_node_check.sh

# Igor's wrapper for singularity to make things work inside of K8S, requires OASIS CVMFS
Expand Down
3 changes: 3 additions & 0 deletions condor/01-nodechk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ STARTD_CRON_nodecheck_PERIOD = 5m
STARTD_CRON_nodecheck_MODE = periodic
STARTD_CRON_nodecheck_RECONFIG = false
STARTD_CRON_nodecheck_KILL = true

STARTD_ATTRS = $(STARTD_ATTRS) NodeOnline
START = ($(START)) && (NodeOnline =?= True)
1 change: 0 additions & 1 deletion cron/sync_users.cron

This file was deleted.

6 changes: 6 additions & 0 deletions image-config/60-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ chmod +x $CONNECT_DIR/sync_users.sh
pushd $CONNECT_DIR
echo "token=$API_TOKEN" > $CONNECT_DIR/token
export API_TOKEN_FILE=$CONNECT_DIR/token
# Random sleep to prevent thundering herd.
sleep $((RANDOM%300))
$CONNECT_DIR/sync_users.sh -u root.atlas-af -g root.atlas-af -e https://api.ci-connect.net:18080
popd

echo 'export PATH="$PATH:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"' >> $CONNECT_DIR/config
echo "export API_TOKEN_FILE=$CONNECT_DIR/token" >> $CONNECT_DIR/config

###############################################################################
# Set up periodic syncs with randomized jitter to avoid hammering the API too hard
echo '*/10 * * * * root ( sleep $((RANDOM%300)) && cd /usr/local/ciconnect && source /usr/local/ciconnect/config && ./sync_users.sh -u root.atlas-af -g root.atlas-af -e https://api.ci-connect.net:18080 ) >> /var/log/provisioner.log 2>&1' > /etc/cron.d/sync_users.cron
7 changes: 1 addition & 6 deletions scripts/condor_node_check.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
#!/bin/bash
### GET THE NODE NAME FIRST
full_node=$(hostname)
IFS='.' read -r nodename af uchi edu <<< "${full_node}"

/bin/sysclient --config-file /etc/sysview/sysview.ini online "${nodename}"
/bin/condor_node_check --config-file /etc/sysview/sysview.ini
/usr/bin/condor_node_check --config-file /etc/sysview/sysview.ini

0 comments on commit 06c1e5b

Please sign in to comment.