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

Allow pam_limits to handle negative nice levels #58784

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
3 participants
@leolchat
Copy link

commented Jul 5, 2019

SUMMARY

pam_limits is not able to set nice levels bellow -1 because of an erroneous value check.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

pam_limits

ADDITIONAL INFORMATION

To reproduce the issue, simply try something like:

pam_limits:
  domain: username
  limit_type: '-'
  limit_item: nice
  value: -20

before the change we get the error:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Argument 'value' can be one of 'unlimited', 'infinity', '-1' or positive number. Refer to manual pages for more details."}

Now it pass with no error.

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

The test ansible-test sanity --test pylint [explain] failed with 2 errors:

lib/ansible/modules/system/pam_limits.py:190:0: trailing-whitespace Trailing whitespace
lib/ansible/modules/system/pam_limits.py:251:0: trailing-whitespace Trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 3 errors:

lib/ansible/modules/system/pam_limits.py:190:1: W293 blank line contains whitespace
lib/ansible/modules/system/pam_limits.py:198:161: E501 line too long (164 > 160 characters)
lib/ansible/modules/system/pam_limits.py:251:1: W293 blank line contains whitespace

click here for bot help

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

@giovannisciortino

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

Only few limits.conf items accepts negative values and there is a my PR to resolve exactly the same problem that hasn't never merged

@ansibot ansibot removed the needs_triage label Jul 5, 2019

@leolchat leolchat changed the title Update pam_limits.py Allow pam_limits to handle negative nice levels Jul 6, 2019

@leolchat

This comment has been minimized.

Copy link
Author

commented Jul 6, 2019

@giovannisciortino what is your PR number?

@giovannisciortino

This comment has been minimized.

Copy link
Contributor

commented Jul 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.