Merge "stx control stop: faster shutdown"
This commit is contained in:
commit
fa10efb041
|
@ -51,6 +51,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
rpm2cpio \
|
rpm2cpio \
|
||||||
ssh \
|
ssh \
|
||||||
sudo \
|
sudo \
|
||||||
|
tini \
|
||||||
unzip \
|
unzip \
|
||||||
vim \
|
vim \
|
||||||
wget \
|
wget \
|
||||||
|
@ -97,3 +98,6 @@ RUN apt-key add /root/pubkey.rsa && rm -f /root/pubkey.rsa
|
||||||
RUN mkdir -p /etc/vim
|
RUN mkdir -p /etc/vim
|
||||||
COPY stx/toCOPY/common/vimrc.local /etc/vim/vimrc.local
|
COPY stx/toCOPY/common/vimrc.local /etc/vim/vimrc.local
|
||||||
RUN chmod 0644 /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" ]
|
||||||
|
|
|
@ -80,7 +80,7 @@ class KubeHelper:
|
||||||
suffix='.stderr') as stderr_file:
|
suffix='.stderr') as stderr_file:
|
||||||
cmd = f'{self.config.kubectl()} get pods --no-headers'
|
cmd = f'{self.config.kubectl()} get pods --no-headers'
|
||||||
cmd += f' --selector=app.kubernetes.io/instance={project_name} 2>{stderr_file.name}'
|
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:
|
if process_result.returncode != 0:
|
||||||
logger.error('Command failed: %s\n%s', cmd, stderr_file.fread())
|
logger.error('Command failed: %s\n%s', cmd, stderr_file.fread())
|
||||||
raise RuntimeError("Failed to list pods")
|
raise RuntimeError("Failed to list pods")
|
||||||
|
|
|
@ -306,7 +306,7 @@ stx-pkgbuilder/configmap/')
|
||||||
self.logger.warning("gave up while pods are still running")
|
self.logger.warning("gave up while pods are still running")
|
||||||
break
|
break
|
||||||
self.logger.info("waiting for %d pod(s) to exit", pod_count)
|
self.logger.info("waiting for %d pod(s) to exit", pod_count)
|
||||||
time.sleep(3)
|
time.sleep(2)
|
||||||
|
|
||||||
def handleIsStartedTask(self, projectname):
|
def handleIsStartedTask(self, projectname):
|
||||||
if self.k8s.helm_release_exists(projectname):
|
if self.k8s.helm_release_exists(projectname):
|
||||||
|
|
|
@ -39,4 +39,4 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start Supervisor
|
# Start Supervisor
|
||||||
/usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
|
exec /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
|
||||||
|
|
Loading…
Reference in New Issue