Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

user.present regression : TypeError checking existing user #4280

Closed
Mrten opened this Issue · 7 comments

4 participants

@Mrten
    State: - user
    Name:      virtual
    Function:  present
        Result:    False
        Comment:   An exception occured in this state: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/salt/state.py", line 1205, in call
    try:
  File "/usr/lib/pymodules/python2.7/salt/states/user.py", line 242, in present
    homephone)
  File "/usr/lib/pymodules/python2.7/salt/states/user.py", line 63, in _changes
    if lusr['uid'] != uid:
TypeError: list indices must be integers, not str

        Changes:

here's another:

    State: - user
    Name:      iso
    Function:  present
        Result:    False
        Comment:   An exception occured in this state: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/salt/state.py", line 1205, in call
    try:
  File "/usr/lib/pymodules/python2.7/salt/states/user.py", line 242, in present
    homephone)
  File "/usr/lib/pymodules/python2.7/salt/states/user.py", line 69, in _changes
    if __salt__['file.gid_to_group'](gid or lusr['gid']) in \
TypeError: list indices must be integers, not str

        Changes:

I'm pretty sure both users exist. 0.14 everywhere.

@Mrten

hm, this could have been a .13.3 minion.

@thatch45
Owner

I wonder why this did not show up in the tests, more coverage needs to be written!

@yml

There is also something going on with the groups options:

(git: master) sudo -E salt-call state.single user.present martin shell="/bin/bash" home="/home/martin" groups="[devs,www-data,sudo]"
[INFO    ] Loaded configuration file: /etc/salt/minion
[INFO    ] Executing command 'ps -efH' in directory '/home/yml'
[INFO    ] Loading fresh modules for state activity
[INFO    ] Executing state user.present for martin
[INFO    ] Executing command 'usermod -G "devs,sudo,www-data" martin' in directory '/home/yml'
[ERROR   ] No changes made for martin
local:
----------
    State: - user
    Name:      martin
    Function:  present
        Result:    False
        Comment:   These values could not be changed: {'groups': ['devs', 'sudo', 'www-data']}
        Changes:   
/srv/bell-labs

@terminalmage
Owner

I believe these were fixed earlier in the week in #4372. Can you test this against an updated git checkout?

@Mrten

I would love to but haven't seen it for quite some time.

@yml

Yes I did and I confirm it has been fixed.

@thatch45
Owner

Thanks for the follow up @Mrten, @yml, @terminalmage

@thatch45 thatch45 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.