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

test: delete kdump user last, retry until success #171

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

richm
Copy link
Contributor

@richm richm commented Sep 11, 2023

Some tests fail like this:

TASK [Delete user] *************************************************************
fatal: [/tmp/tmp.cgsy6Vmlnz/RHEL_8_9_TESTING.qcow2]: FAILED! => {
    "changed": false,
    "name": "kdump_ssh_user",
    "rc": 8
}

userdel: user kdump_ssh_user is currently used by process 23050

Move the deletion of the user to the last part of the test, and retry
until success or timeout.

Signed-off-by: Rich Megginson [email protected]

@richm
Copy link
Contributor Author

richm commented Sep 11, 2023

[citest]

Some tests fail like this:
```
TASK [Delete user] *************************************************************
fatal: [/tmp/tmp.cgsy6Vmlnz/RHEL_8_9_TESTING.qcow2]: FAILED! => {
    "changed": false,
    "name": "kdump_ssh_user",
    "rc": 8
}

userdel: user kdump_ssh_user is currently used by process 23050
```

Move the deletion of the user to the last part of the test, and retry
until success or timeout.

Signed-off-by: Rich Megginson <[email protected]>
@richm richm merged commit d02f189 into linux-system-roles:main Sep 12, 2023
@richm richm deleted the retry-user-delete branch September 12, 2023 13:55
name: "{{ kdump_ssh_user }}"
state: absent
register: __user_delete
until: __user_delete is success
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value for “retries” is 3 and “delay” is 5, is it enough here?
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html#retrying-a-task-until-a-condition-is-met

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so - the error is very difficult to reproduce in CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants