Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quota.set is broken: set_() takes exactly 1 argument (10 given) #8102

Closed
arnisoph opened this issue Oct 25, 2013 · 3 comments · Fixed by #8112
Closed

quota.set is broken: set_() takes exactly 1 argument (10 given) #8102

arnisoph opened this issue Oct 25, 2013 · 3 comments · Fixed by #8112
Assignees
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists

Comments

@arnisoph
Copy link
Contributor

Running the module function quota.set with the syntax describe in http://docs.saltstack.com/ref/modules/all/salt.modules.quota.html#salt.modules.quota.set does not work:

[INFO    ] User root Executing command quota.set with jid 20131025205234376365
[DEBUG   ] Command details {'tgt_type': 'glob', 'jid': '20131025205234376365', 'tgt': '<MYHOSTNAME>', 'ret': '', 'user': 'root', 'arg': ['/', 'user=u98779975', 'block-hard-limit=524288000'], 'fun': 'quota.set'}
[WARNING ] TypeError encountered executing quota.set: set_() takes exactly 1 argument (10 given). See debug log for more info.  Possibly a missing arguments issue:  ArgSpec(args=['device'], varargs=None, keywords='kwargs', defaults=None)
[DEBUG   ] TypeError intercepted: set_() takes exactly 1 argument (10 given)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 659, in _thread_return
    return_data = func(*args, **kwargs)
TypeError: set_() takes exactly 1 argument (10 given)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/salt/minion.py", line 659, in _thread_return
    return_data = func(*args, **kwargs)
TypeError: set_() takes exactly 1 argument (10 given)
[INFO    ] Returning information for job: 20131025205234376365

The master and the minion run Debian Wheezy 7.2 with the latest packages (salt 0.17.1+dfsg-1bpo70+1dst.1, etc.).

Some unit tests might be useful.

See also http://irclog.perlgeek.de/salt/2013-10-25 (18:28 - 18:49)

@basepi
Copy link
Contributor

basepi commented Oct 25, 2013

For sure, we need tests here. Thanks for the report, we'll get this fixed.

@ghost ghost assigned terminalmage Oct 26, 2013
@terminalmage
Copy link
Contributor

Our CLI parser is not recognizing arguments with a dash in them as keyword arguments, so they get lumped in with the positional arguments. Working on a fix now.

@terminalmage
Copy link
Contributor

Unit test added in #8305.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants