salt: Upgrading Salt via Salt results in dying minions and broken dpkg
Description of Issue/Question
We use pkg.upgrade dist_upgrade=True
to upgrade our servers semi-unattended.
They were running 2017.7.0 prior to issuing the upgrade command and were supposed to be upgraded to 2017.7.1.
However, a majority of the machines had issues where the salt-minion
would not be running anymore afterwards and shows the following issue when doing anything with apt
afterwards on the machine itself:
E: dpkg was interrupted, you must manually run 'dpkg —configure -a' to correct the problem.
Doing so shows the following issue:
dpkg: error processing package salt-minion (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
After running the commands above, this
ISTM that this issue may be caused by the fact that the systemd config has changed, since it seems to only affect our Ubuntu 16.04 machines and works fine on 14.04.
Versions Report
Salt Version:
Salt: 2017.7.1
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.4.2
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.8
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: 1.0.3
msgpack-pure: Not Installed
msgpack-python: 0.4.6
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.12 (default, Nov 19 2016, 06:48:10)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.2.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: Ubuntu 16.04 xenial
locale: ANSI_X3.4-1968
machine: x86_64
release: 4.4.59-1-pve
system: Linux
version: Ubuntu 16.04 xenial
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 19 (14 by maintainers)
Ok, i have been able to replicate that, the problem is the fact that the
KillMode=process
is not in place when the debian scripts do what they do, which is stop the services before laying down the files, then start it again after laying them down.This should be fully fixed with the next upgrade, but I will make sure that it gets tested and is verified that it will work starting with 2017.7.4
Thanks, Daniel
I deployed the following before the upgrade, which allowed for a smooth one:
I have confirmed that the upgrade to 2017.7.4 goes smoothly using our staging repository.
The same thing is happening again with the upgrade of 2017.7.2: