Repository navigation
Closed
Labels
P1Priority 1RegressionThe issue is a bug that breaks functionality known to work in previous releases.Silicon v3004.0Release code nameZDThe issue is related to a Zendesk customer support ticket.bugbroken, incorrect, or confusing behaviorseverity-high2nd top severity, seen by most users, causes major problems
Milestone
Description
Description of Issue/Question
When running in docker/kubernetes the salt-master process leaks memory over time
I have confirmed the same behavior with or without our custom engine installed
Setup
Dockerfile:
FROM centos:latest as base
RUN yum -y update && \
yum -y install python-ldap python-setproctitle epel-release git && \
yum -y install https://repo.saltstack.com/yum/redhat/salt-repo-2018.3-1.el7.noarch.rpm && \
yum clean all
FROM base
RUN yum -y install salt-master virt-what python-pygit2 python-pip && \
yum clean all
RUN pip install pika
ADD Dockerfiles/salt-master/entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
RUN useradd saltapi
RUN echo "salt" | passwd --stdin saltapi
EXPOSE 4505/tcp 4506/tcp
ENTRYPOINT ["/entrypoint.sh"]
CMD ["salt-master", "-l", "info"]
Enterypoint.sh
#!/bin/bash
# Sync gitfs
/usr/bin/salt-run saltutil.sync_all
# This may be redundant, but ensure we sync the
# engines after we've got the latest code from gitfs
/usr/bin/salt-run saltutil.sync_engines
touch /tmp/entrypoint_ran
# Ensure that the saltapi password matches the
# $SALTAPI_PASSWORD environment variable
stty -echo
if [ -n "$SALTAPI_PASSWORD" ];
then echo ${SALTAPI_PASSWORD} | passwd --stdin saltapi;
fi
stty echo
# Run command
exec "$@"
master.conf
hash_type: sha512
state_aggregate: True
log_level_logfile: info
fileserver_backend:
- roots
- git
gitfs_remotes:
- https://states.gitfs.repo
- user: secret
- password: secret
ext_pillar:
- git:
# HTTPS authentication
- master https://pillar.gitfs.repo:
- user: secret
- password: secret
external_auth:
pam:
saltapi:
- .*
- '@runner'
- '@wheel'
custom:
rabbitmq:
user: salt
password: super secret
server: superdupersecret
exchange: salt-events
vhost: salt-events
queue: salt-events
engines:
- custom-salt: {}
Steps to Reproduce Issue
- Launch container
- Add one or more minions
- Watch as graph slowly rises
Versions Report
$ kubectl exec -it saltstack-54c9c75cc4-6mlf9 -c salt-master -- salt --versions-report
Salt Version:
Salt: 2018.3.3
Dependency Versions:
cffi: 1.6.0
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: 0.26.3
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: 0.26.4
Python: 2.7.5 (default, Jul 13 2018, 13:06:57)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: centos 7.5.1804 Core
locale: ANSI_X3.4-1968
machine: x86_64
release: 4.4.0-133-generic
system: Linux
version: CentOS Linux 7.5.1804 Core
Reacted by fangpsh
Metadata
Metadata
Assignees
Labels
P1Priority 1RegressionThe issue is a bug that breaks functionality known to work in previous releases.Silicon v3004.0Release code nameZDThe issue is related to a Zendesk customer support ticket.bugbroken, incorrect, or confusing behaviorseverity-high2nd top severity, seen by most users, causes major problems

Activity
doesitblend commentedon Oct 30, 2018
ZD-2933
goodwillcoding commentedon Oct 31, 2018
I have nearly identical issue though not in container. I have completely vanila Salt 2018.3.2 deployed with only 2 minions, only configuration changes from the default are the hostname of the salt master.
After a week of NOTHING running at all from the master the memory usage is nearly 5GB. At this point we are considering installing a cron task that restarts the service just to avoid this, which is frankly an insane solution. Is this really a P2 and not a P1?
goodwillcoding commentedon Nov 3, 2018
Wow, I've been using salt since 0.14 ... had all kind of issues, this is literally the WORST. @rallytime @DmitryKuzmenko do you have any instructions on what to do, how to fix ... or should we all just abandon all hope .. cause currently salt is just unusable. How can a DEFAULT install on widely used OS (Ubuntu 16.04 LTS) be having such issues?
mikeadamz commentedon Nov 6, 2018
I'm not sure if this helps, but I have two salt masters running on two different kubernetes clusters in two different datacenter in two different states. One master has a single minion and the other master has zero minions. The memory leak is exactly the same.
It's interesting to me that regardless of which cluster or if the master has a minion or not, the leak grows at the same rate. The bars are parallel at the exact same trajectory.
goodwillcoding commentedon Nov 8, 2018
wow the silence on tis bug is completely deafening ... despite the obvious P1 status
DmitryKuzmenko commentedon Nov 8, 2018
Sorry for the silence guys. I'm here and working on it.
DmitryKuzmenko commentedon Nov 8, 2018
@mikeadamz is it possible to get output of
ps aux | grep salton one of VMs where master already grown enough to see what subprocess of master has that problem?mikeadamz commentedon Nov 8, 2018
DmitryKuzmenko commentedon Nov 8, 2018
@mikeadamz thank you! It's very helpful.
55 remaining items
Address leaks in fileserver caused by git backends
Address leaks in fileserver caused by git backends
Address leaks in fileserver caused by git backends
Merge 3003.3 into master (#60924)