-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Error in file module when changing group owner on RHEL 8 #49343
Comments
Hi @tabowling, thank you for submitting this issue! |
Files identified in the description: If these files are inaccurate, please update the |
Hmm... first question in diagnosing this... does the apache group exist on those machines? needs_info |
The callback failure is separate.... it looks like a bug in the python that's being used in RHEL8, the json.py stdlib module with sort_keys = True. I see it on Python-3.6 as shipped by Fedora as well:
We'll have to work around that python bug in our code while we file a bug for it to be fixed upstream. |
Found a previously filed python3 bug for the callback/json.dumps() issue https://bugs.python.org/issue25457 There seems to be a proposed fix but it needs a python core maintainer to review and approve it. If you know of one, you could give him a nudge ;-) |
And the PR for it as well: python/cpython#8011 |
@tabowling I think that PR #49512 will fix the warning coming from the callback plugins. It won't fix the traceback you're getting from the file module, though. |
…keys that aren't strings This fixes one of the problems reported in ansible#49343 Upstream Python3 bug for the json traceback: https://bugs.python.org/issue25457 and PR that may fix it: python/cpython#8011
…keys that aren't strings This fixes one of the problems reported in #49343 Upstream Python3 bug for the json traceback: https://bugs.python.org/issue25457 and PR that may fix it: python/cpython#8011
@tabowling The error message:
and the code which produces that error: try:
gid = grp.getgrnam(group).gr_gid
except KeyError:
path = to_text(b_path)
self.fail_json(path=path, msg='chgrp failed: failed to look up group %s' % group) Strongly imply that the failure being seen here is that the apache group does not exist on the remote host. Could you confirm? |
…s dictionary keys that aren't strings This fixes one of the problems reported in ansible#49343 Upstream Python3 bug for the json traceback: https://bugs.python.org/issue25457 and PR that may fix it: python/cpython#8011. (cherry picked from commit c817bef) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
FWIW - the RHEL8 Beta Container shipped from |
@abadger Apologies for my lack of response. I will test this tomorrow, but I suspect you are correct about the apache group not being created. |
…keys that aren't strings This fixes one of the problems reported in ansible#49343 Upstream Python3 bug for the json traceback: https://bugs.python.org/issue25457 and PR that may fix it: python/cpython#8011
@tabowling This issue is waiting for your response. Please respond or the issue will be closed. |
Apologies for my delayed response. Confirmed that the problem was that the Apache user/group did not yet exist. Modifying the playbook to first install the httpd package resolved this. It would be nice if the file module had better error handling to detect this and output a more human friendly error message. I would think this could be a common issue users could experience. |
@tabowling so I'm attempting to reproduce with the latest stable release (2.7.7 at the time of this writing), I'm even seeing the following message that is much friendlier than what you're seeing on 2.7.2 needs_info |
@tabowling This issue is waiting for your response. Please respond or the issue will be closed. |
@tabowling You have not responded to information requests in this issue so we will assume it no longer affects you. If you are still interested in this, please create a new issue with the requested information. |
SUMMARY
When creating directory structure against a RHEL 8 managed node, task fails when setting group ownership.
ISSUE TYPE
COMPONENT NAME
file
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
[root@rhel8beta html]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.0 Beta (Ootpa)
[root@rhel8beta html]# uname -a
Linux rhel8beta.localdomain 4.18.0-32.el8.x86_64 #1 SMP Sat Oct 27 19:26:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Control node has python set for rhel8
rhel8beta ansible_python_interpreter=/usr/libexec/platform-python
STEPS TO REPRODUCE
Run the example playbook. It fails when setting the group owner. Success if group commented out.
Both success and fail scenarios generates this message:
EXPECTED RESULTS
The following directories should be created, with root:apache ownerships:
ACTUAL RESULTS
Only the ./ISO/8.0 directory is created, with the group:root, and then the playbook fails.
The text was updated successfully, but these errors were encountered: