salt icon indicating copy to clipboard operation
salt copied to clipboard

user.present will not create windows account (version 17.1.1)

Open emmellee opened this issue 13 years ago • 7 comments

C:\salt>salt --versions-report
           Salt: 0.17.1
         Python: 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)]
         Jinja2: 2.7.1
       M2Crypto: 0.21.1
 msgpack-python: 0.3.0
   msgpack-pure: Not Installed
       pycrypto: 2.6
         PyYAML: 3.10
          PyZMQ: 13.1.0
            ZMQ: 3.2.2
C:\salt>salt-call state.sls usermgmt
[INFO    ] Loading fresh modules for state activity
[INFO    ] Executing state user.present for Jenkins
[INFO    ] Executing command 'net localgroup JenkinsGroup' in directory 'C:\\Users\\<snipped>'
[ERROR   ] An exception occurred in this state: Traceback (most recent call last):
  File "salt/state.py", line 1260, in call
  File "salt/states/user.py", line 277, in present
  File "salt/states/user.py", line 67, in _changes
KeyError: 'user.info'

[INFO    ] Executing command 'attrib -R "c:\\salt\\var\\cache\\salt\\minion\\sls
.p"' in directory 'C:\\Users\\<snipped>'
←[0;31mlocal:←[0m
←[0;31m----------
    State: - user←[0m
    ←[0;31mName:      Jenkins←[0m
    ←[0;31mFunction:  present←[0m
        ←[0;31mResult:    False←[0m
        ←[0;31mComment:   An exception occurred in this state: Traceback (most recent call last):
  File "salt/state.py", line 1260, in call
  File "salt/states/user.py", line 277, in present
  File "salt/states/user.py", line 67, in _changes
KeyError: 'user.info'
←[0m
←[0;31m        Changes:
                   ←[0;36m----------←[0;36m←[0m
←[0;36m
Summary
------------←[0m
←[0;32mSucceeded: 0←[0m
←[0;31mFailed:    1←[0m
←[0;36m------------
Total:     1←[0m

Here is the usermgmt.sls

Jenkins:
  user.present:
    - fullname: 'Continuous Integration Account'
    - groups:
      - JenkinsGroup

emmellee avatar Nov 01 '13 18:11 emmellee

(Edited with triple backticks for readability)

Thanks for the report! We'll definitely look into this.

basepi avatar Nov 01 '13 20:11 basepi

Was this fix included in 17.2? I've upgraded to 17.2 but am still receiving this error.

emmellee avatar Nov 18 '13 23:11 emmellee

I just checked and unfortunately the fix was overlooked for 0.17.2.

I've verified that @basepi will cherry pick it for 0.17.3.

https://github.com/saltstack/salt/pull/8500

UtahDave avatar Nov 18 '13 23:11 UtahDave

I'm using 0.17.4 Unfortunately, still appeared like below.

Function:  present
    Result:    False
    Comment:   An exception occurred in this state: Traceback (most recent call last):

File "salt/state.py", line 1307, in call File "salt/states/user.py", line 280, in present File "salt/states/user.py", line 70, in _changes KeyError: 'user.info'

    Changes:

zeroidle avatar Jan 15 '14 12:01 zeroidle

@zeroidle Looks like the cherry-pick failed when I attempted it, not sure what happened there. (it's been awhile)

Any chance you can test on the 2014.1 RC or the develop branch?

basepi avatar Jan 16 '14 18:01 basepi

Any word on when a fix to this problem will be included in a release? Thanks.

emmellee avatar Feb 04 '14 18:02 emmellee

This fix should be in the 2014.1.0 release (coming any day now). It's also already in the 2014.1.0rc3 release that's on PyPI.

basepi avatar Feb 06 '14 19:02 basepi