trying to use the current RC for dev work. and ran into this bug on a state that was working.
mysql_setup:
debconf.set:
- name: mysql-server
- data:
'mysql-server/root_password': {'type': 'string', 'value': '{{ pillar["SQL_ROOT_PASSWORD"] }}'}
'mysql-server/root_password_again': {'type': 'string', 'value': '{{ pillar["SQL_ROOT_PASSWORD"] }}'}
here is the trace from the exception.
ctrl.wolfcloud.bad4.us:
The minion function caused an exception: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 1045, in _thread_return
return_data = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/modules/state.py", line 698, in sls
ret = st_.state.call_high(high_)
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 2119, in call_high
ret = dict(list(disabled.items()) + list(self.call_chunks(chunks).items()))
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1651, in call_chunks
running = self.call_chunk(low, running, chunks)
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1819, in call_chunk
self._mod_init(low)
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 635, in _mod_init
self.states['{0}.{1}'.format(low['state'], low['fun'])] # pylint: disable=W0106
File "/usr/lib/python2.7/dist-packages/salt/utils/lazy.py", line 93, in __getitem__
raise KeyError(key)
KeyError: 'debconf.set'
this is on a brand new minion.
@whytewolf, thanks for reporting. What does salt ctrl.wolfcloud.bad4.us sys.doc debconf.set? If it doesn't return, I think that that is the issue, but this stack trace needs to be fixed in any case. Here is my test case:
# cat /srv/salt/fake.sls
fake state:
fake.state:
- name: really
# salt jmoney-main state.apply fake
jmoney-main:
The minion function caused an exception: Traceback (most recent call last):
File "/root/salt/salt/minion.py", line 1045, in _thread_return
return_data = func(*args, **kwargs)
File "/root/salt/salt/modules/state.py", line 297, in apply_
return sls(mods, **kwargs)
File "/root/salt/salt/modules/state.py", line 697, in sls
ret = st_.state.call_high(high_)
File "/root/salt/salt/state.py", line 2119, in call_high
ret = dict(list(disabled.items()) + list(self.call_chunks(chunks).items()))
File "/root/salt/salt/state.py", line 1651, in call_chunks
running = self.call_chunk(low, running, chunks)
File "/root/salt/salt/state.py", line 1819, in call_chunk
self._mod_init(low)
File "/root/salt/salt/state.py", line 635, in _mod_init
self.states['{0}.{1}'.format(low['state'], low['fun'])] # pylint: disable=W0106
File "/root/salt/salt/utils/lazy.py", line 93, in __getitem__
raise KeyError(key)
KeyError: 'fake.state'
# salt jmoney-main test.versions
jmoney-main:
Salt Version:
Salt: 2015.5.0-1819-gf6fbbaf
Dependency Versions:
Jinja2: 2.7.3
M2Crypto: 0.21.1
Mako: 1.0.0
PyYAML: 3.11
PyZMQ: 14.4.0
Python: 2.7.9 (default, Mar 1 2015, 12:57:24)
RAET: Not Installed
Tornado: 4.1
ZMQ: 4.0.5
ioflo: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.6
pycrypto: 2.6.1
System Versions:
dist: debian 8.1
machine: x86_64
release: 3.16.0-4-amd64
system: debian 8.1
you are correct salt ctrl.wolfcloud.bad4.us sys.doc debconf.set does not appear to return.
and for comparison test.versions from my own system. which seems relatively similar.
ctrl.wolfcloud.bad4.us:
Salt Version:
Salt: 2015.5.0-1839-gceee713
Dependency Versions:
Jinja2: 2.7.2
M2Crypto: 0.21.1
Mako: 0.9.1
PyYAML: 3.10
PyZMQ: 14.0.1
Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.0.4
ioflo: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.2
pycrypto: 2.6.1
System Versions:
dist: Ubuntu 14.04 trusty
machine: x86_64
release: 3.13.0-59-generic
system: Ubuntu 14.04 trusty
Thanks, @whytewolf. I have also reproduced this on v2015.8.0rc2.
This also happens on 2015.5.3.
The PR #25928 fixes this. It now returns:
local:
----------
ID: fake state
Function: fake.state
Name: really
Result: False
Comment: State 'fake.state' was not found in SLS 'fake'
Reason: 'fake.state' is not available.
Started:
Duration:
Changes:
Summary for local
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Total run time: 0.000 ms
Merged fix. Closing.
So is there any workaround for making debconf.set work under 2015.8?
make sure the debconf-utils is installed. [which turned out to be my main issue.]
Most helpful comment
make sure the debconf-utils is installed. [which turned out to be my main issue.]