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

feature(sdcm) Wait less for schema agreement #9716

Closed
wants to merge 2 commits 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
18 changes: 12 additions & 6 deletions docker/env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,19 @@ ADD requirements.txt .
RUN pip install uv==0.2.24
RUN uv pip install --system -r requirements.txt

FROM python:$PYTHON_IMAGE_TAG
# Download, extract and install Kubernetes packages.
FROM apt_base AS k8_packages
ARG KUBECTL_VERSION=1.27.3
ARG EKSCTL_VERSION=0.165.0
ARG HELM_VERSION=3.12.2
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl tar
RUN curl -fsSLo /usr/local/bin/kubectl https://dl.k8s.io/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl
RUN curl --silent --location "https://github.com/eksctl-io/eksctl/releases/download/v$EKSCTL_VERSION/eksctl_Linux_amd64.tar.gz" | tar xz -C /tmp && \
mv /tmp/eksctl /usr/local/bin
RUN curl --silent --location "https://get.helm.sh/helm-v$HELM_VERSION-linux-amd64.tar.gz" | tar xz -C /tmp && mv /tmp/linux-amd64/helm /usr/local/bin

#Final image.
FROM python:$PYTHON_IMAGE_TAG
ENV PYTHONWARNINGS="ignore:unclosed ignore::SyntaxWarning" \
PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
Expand Down Expand Up @@ -53,9 +62,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
docker-compose-plugin && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN curl -fsSLo /usr/local/bin/kubectl https://dl.k8s.io/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl && \
chmod +x /usr/local/bin/kubectl
RUN curl --silent --location "https://github.com/eksctl-io/eksctl/releases/download/v$EKSCTL_VERSION/eksctl_Linux_amd64.tar.gz" | tar xz -C /tmp && \
mv /tmp/eksctl /usr/local/bin
RUN curl --silent --location "https://get.helm.sh/helm-v$HELM_VERSION-linux-amd64.tar.gz" | tar xz -C /tmp && mv /tmp/linux-amd64/helm /usr/local/bin
COPY --from=python_packages /usr/local /usr/local
# TODO: make this layer optional in the future - only for Kubernetes development/tests.
COPY --from=k8_packages --chmod=755 /usr/local/bin/kubectl /usr/local/bin/eksctl /usr/local/bin/helm /usr/local/bin/
4 changes: 2 additions & 2 deletions sdcm/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -2780,7 +2780,7 @@ def get_peers_info(self):
cql_results)
return peers_details

@retrying(n=5, sleep_time=10, raise_on_exceeded=False)
@retrying(n=10, sleep_time=5, raise_on_exceeded=False)
def get_gossip_info(self) -> dict[BaseNode, dict]:
gossip_info = self.run_nodetool('gossipinfo', verbose=False, warning_event_on_exception=(Exception,),
publish_event=False)
Expand Down Expand Up @@ -4389,7 +4389,7 @@ def check_nodes_running_nemesis_count(self):
message=f"There are more then expected nodes running nemesis: {message}",
).publish()

@retrying(n=6, sleep_time=10, allowed_exceptions=(AssertionError,))
@retrying(n=10, sleep_time=5, allowed_exceptions=(AssertionError,))
def wait_for_schema_agreement(self):

for node in self.nodes:
Expand Down
4 changes: 2 additions & 2 deletions sdcm/utils/health_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from sdcm.sct_events.health import ClusterHealthValidatorEvent


CHECK_NODE_HEALTH_RETRIES = 3
CHECK_NODE_HEALTH_RETRY_DELAY = 45
CHECK_NODE_HEALTH_RETRIES = 10
CHECK_NODE_HEALTH_RETRY_DELAY = 15

LOGGER = logging.getLogger(__name__)

Expand Down
Loading