Merge "stx control stop: faster shutdown"

This commit is contained in:
Zuul 2024-02-20 21:31:23 +00:00 committed by Gerrit Code Review
commit fa10efb041
4 changed files with 7 additions and 3 deletions

View File

@ -51,6 +51,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
rpm2cpio \
ssh \
sudo \
tini \
unzip \
vim \
wget \
@ -97,3 +98,6 @@ RUN apt-key add /root/pubkey.rsa && rm -f /root/pubkey.rsa
RUN mkdir -p /etc/vim
COPY stx/toCOPY/common/vimrc.local /etc/vim/vimrc.local
RUN chmod 0644 /etc/vim/vimrc.local
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
CMD ["/bin/bash", "-i", "-c", "exec /bin/sleep infinity" ]

View File

@ -80,7 +80,7 @@ class KubeHelper:
suffix='.stderr') as stderr_file:
cmd = f'{self.config.kubectl()} get pods --no-headers'
cmd += f' --selector=app.kubernetes.io/instance={project_name} 2>{stderr_file.name}'
process_result = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE)
process_result = subprocess.run(cmd, encoding='utf-8', shell=True, stdout=subprocess.PIPE)
if process_result.returncode != 0:
logger.error('Command failed: %s\n%s', cmd, stderr_file.fread())
raise RuntimeError("Failed to list pods")

View File

@ -306,7 +306,7 @@ stx-pkgbuilder/configmap/')
self.logger.warning("gave up while pods are still running")
break
self.logger.info("waiting for %d pod(s) to exit", pod_count)
time.sleep(3)
time.sleep(2)
def handleIsStartedTask(self, projectname):
if self.k8s.helm_release_exists(projectname):

View File

@ -39,4 +39,4 @@ else
fi
# Start Supervisor
/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf