Skip to content

Commit

Permalink
merge master and fix image tag to execute-3.6-gpu for gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Fengping Hu committed Aug 22, 2023
2 parents f57b756 + 4eddc21 commit 4abfe53
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 348 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
# schedule:
# - cron: '41 9 * * *'
push:
branches: [ master, gpu ]
branches: [ master, gpu, htcondor-10 ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ master, gpu ]
branches: [ master, gpu, htcondor-10 ]

env:
# Dockhub
Expand Down Expand Up @@ -86,6 +86,7 @@ jobs:
tag_list=()
tag_list+=(${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:"latest")
tag_list+=(${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:$TIMESTAMP)
tag_list=("execute-3.6-gpu")
# This causes the tag_list array to be comma-separated below,
# which is required for build-push-action
IFS=,
Expand Down
24 changes: 2 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=opensciencegrid/software-base:3.6-el7-release
ARG BASE_IMAGE=hub.opensciencegrid.org/opensciencegrid/software-base:3.6-el7-release
FROM ${BASE_IMAGE}
ARG BASE_IMAGE

Expand Down Expand Up @@ -47,34 +47,14 @@ RUN yum install --enablerepo=osg-upcoming -y condor

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.3-1.noarch.rpm
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

# Add CVMFSEXEC
#RUN git clone https://github.com/cvmfs/cvmfsexec /cvmfsexec \
# && cd /cvmfsexec \
# && ./makedist osg \
# # /cvmfs-cache and /cvmfs-logs is where the cache and logs will go; possibly bind-mounted. \
# # Needs to be 1777 so the unpriv user can use it. \
# # (Can't just chown, don't know the UID of the unpriv user.) \
# && mkdir -p /cvmfs-cache /cvmfs-logs \
# && chmod 1777 /cvmfs-cache /cvmfs-logs \
# && rm -rf dist/var/lib/cvmfs log \
# && ln -s /cvmfs-cache dist/var/lib/cvmfs \
# && ln -s /cvmfs-logs log \
# # tar up and delete the contents of /cvmfsexec so the unpriv user can extract it and own the files. \
# && tar -czf /cvmfsexec.tar.gz ./* \
# && rm -rf ./* \
# # Again, needs to be 1777 so the unpriv user can extract into it. \
# && chmod 1777 /cvmfsexec

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 sysview-client/sysclient /bin/
COPY sysview-client/client /usr/lib/python3.6/site-packages/sysview/client
COPY scripts/condor_node_check.sh /usr/local/sbin/
COPY scripts/entrypoint.sh /bin/entrypoint.sh

Expand Down
1 change: 1 addition & 0 deletions condor/01-ccb.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CCB_ADDRESS = $(CONDOR_HOST)
PRIVATE_NETWORK_NAME = $(UID_DOMAIN)
TRUST_DOMAIN = head01.af.uchicago.edu
16 changes: 12 additions & 4 deletions prometheus/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import time
from subprocess import check_call
from prometheus_client import start_http_server, Gauge, Enum
import requests

Expand All @@ -12,7 +13,7 @@ class AppMetrics:
application metrics into Prometheus metrics.
"""

def __init__(self, paths=None, app_port=80, polling_interval_seconds=5):
def __init__(self, paths=None, app_port=80, polling_interval_seconds=30):
self.app_port = app_port
self.polling_interval_seconds = polling_interval_seconds
if not paths:
Expand Down Expand Up @@ -55,10 +56,17 @@ def fetch(self):
#self.total_uptime.set(status_data["total_uptime"])

for p in self.paths:
if os.path.exists(p):
self.health.labels(path=p).state("healthy")
else:
try:
check_call(['test', '-e', p], timeout=10)
except:
self.health.labels(path=p).state("unhealthy")
else:
self.health.labels(path=p).state("healthy")
# thread could stuck in D wait and result will be stale
#if os.path.exists(p):
# self.health.labels(path=p).state("healthy")
#else:
# self.health.labels(path=p).state("unhealthy")

def main():
"""Main entry point"""
Expand Down
Empty file removed sysview-client/client/__init__.py
Empty file.
285 changes: 0 additions & 285 deletions sysview-client/client/client.py

This file was deleted.

Loading

0 comments on commit 4abfe53

Please sign in to comment.