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

xfs_quota fails to initialize new project quotas #5143

Closed
1 task done
MichaelRiss opened this issue Aug 22, 2022 · 3 comments
Closed
1 task done

xfs_quota fails to initialize new project quotas #5143

MichaelRiss opened this issue Aug 22, 2022 · 3 comments
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type) system

Comments

@MichaelRiss
Copy link

MichaelRiss commented Aug 22, 2022

Summary

When I initialize new XFS project quotas with the xfs_quota module the setup of the quotas fails, ansible is not reporting any errors (silent failure).

This is a new attempt to submit #3350, I will try to also open a new PR.

Issue Type

Bug Report

Component Name

  • plugins/modules/system/xfs_quota.py

Ansible Version

$ ansible --version
ansible [core 2.13.0.post0] (stable-2.13 e6b16ddeb5) last updated 2022/06/01 12:54:52 (GMT +200)
  config file = $HOME/.ansible.cfg
  configured module search path = ['$HOME/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = $ansibledir/ansible/lib/ansible
  ansible collection location = $HOME/.ansible/collections:/usr/share/ansible/collections
  executable location = $ansibledir/ansible/bin/ansible
  python version = 3.10.6 (main, Aug  2 2022, 00:00:00) [GCC 12.1.1 20220507 (Red Hat 12.1.1-1)]
  jinja version = 3.0.3
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general
# $HOME/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 5.0.1 

Configuration

$ ansible-config dump --only-changed
DEFAULT_FORKS($HOME/.ansible.cfg) = 32
DEFAULT_HOST_LIST($HOME/.ansible.cfg) = ['$ansibledir/ansible>
DEFAULT_JINJA2_NATIVE($HOME/.ansible.cfg) = True
DEFAULT_ROLES_PATH($HOME/.ansible.cfg) = ['$HOME/.ansible/roles']
DEFAULT_STDOUT_CALLBACK($HOME/.ansible.cfg) = yaml
DEFAULT_TIMEOUT($HOME/.ansible.cfg) = 60

OS / Environment

Fedora 36

Steps to Reproduce

Have on your target machine /etc/projects with e.g.

100:/home

and /etc/projid with

home:100
- name: Set root project soft and hard limit
  community.general.xfs_quota:
    type: project
    name: home
    mountpoint: /
    bsoft: 60g
    bhard: 60g
    state: present

Check the results with xfs_quota -x -c report on the target machine before and after. The entry should change from

home              232          0          0     00 [--------]

to

home              232   62914560   62914560     00 [--------]

but it does not.

Expected Results

I expected the module to properly setup the quota project with something like xfs_quota -x -c 'project -s <project name>' /, but this setup fails.

Actual Results

The ansible playbook run finishes without error message as if there is no problem.

xfs_quota -x -c report on the target machine reveals that the quota project group has not been set up.

home              232          0          0     00 [--------]

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

patchback bot pushed a commit that referenced this issue May 6, 2023
This fix ensures that in case of a project quota, the corresponding project gets initialized, if required.

Signed-off-by: Christoph Fiehe <[email protected]>
Co-authored-by: Christoph Fiehe <[email protected]>
(cherry picked from commit 9c11230)
felixfontein pushed a commit that referenced this issue May 6, 2023
…o initialize new project quotas (#6495)

Fixes #5143: xfs_quota fails to initialize new project quotas (#6387)

This fix ensures that in case of a project quota, the corresponding project gets initialized, if required.

Signed-off-by: Christoph Fiehe <[email protected]>
Co-authored-by: Christoph Fiehe <[email protected]>
(cherry picked from commit 9c11230)

Co-authored-by: cfiehe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type) system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants