Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporarily move base image #67

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
FROM registry.access.redhat.com/ubi8/ubi-minimal
RUN microdnf install -y python3 python3-devel redhat-rpm-config gcc libffi-devel openssl-devel cargo
#FROM registry.access.redhat.com/ubi9/ubi-minimal
#RUN microdnf install -y python3 python3-devel redhat-rpm-config gcc libffi-devel openssl-devel cargo
FROM docker.io/python:3.11-slim-bullseye
WORKDIR /app
COPY ./requirements.txt /app/
RUN python3 -m pip install setuptools_rust
RUN python3 -m pip install -r /app/requirements.txt
RUN python3 -m pip uninstall pip -y
COPY *.py /app/
COPY test-assets /app/test-assets
# Create and set user
RUN adduser -D trawler -u 1000
#RUN adduser -D trawler -u 1000
RUN adduser trawler -u 1000
RUN chown -R trawler:users /app
USER 1000
ENV APP_FILE=/app/trawler.py
Expand Down
8 changes: 8 additions & 0 deletions datapower_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ def object_counts(self):

except requests.exceptions.RequestException as e:
logger.info("Failed to get object instance count: {} (Check rest-mgmt is enabled and you have network connectivity)".format(e.strerror))
except requests.exceptions.ConnectTimeout:
logger.info("Failed to get object count - connect timed out ")
except requests.exceptions.ReadTimeout:
logger.info("Failed to get object count - read timed out ")
else:
logger.info("Processing status provider ObjectStatus (DP version is %s)", self.version)
try:
Expand All @@ -307,6 +311,10 @@ def object_counts(self):
logger.debug(counts)
except requests.exceptions.RequestException as e:
logger.info("Failed to get object status: {} (Check rest-mgmt is enabled and you have network connectivity)".format(e.strerror))
except requests.exceptions.ConnectTimeout:
logger.info("Failed to get object count - connect timed out ")
except requests.exceptions.ReadTimeout:
logger.info("Failed to get object count - read timed out ")


def fetch_document_cache_summary(self, suffix=''):
Expand Down