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

Don't try to set devices fact when osd_auto_discovery was skipped (backport #7620) #7621

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Oct 28, 2024

Right now, under certain OS and Ansible versions, ie Rocky Linux and
ansible-core 2.17, devices_check variable is getting defined even if
task was skipped.

That results in set_fact to fail, as resulting variable has no results
key in it.

Structure of such variable looks like that:

"devices_check": {
    "changed": false,
    "false_condition": "osd_auto_discovery | default(False) | bool",
    "skip_reason": "Conditional result was False",
    "skipped": true
}

Checking for task not being skipped solves such issues.

Signed-Off-By: Dmitriy Rabotyagov [email protected]


This is an automatic backport of pull request #7620 done by Mergify.

Right now, under certain OS and Ansible versions, ie Rocky Linux and
ansible-core 2.17, `devices_check` variable is getting defined even if
task was skipped.

That results in set_fact to fail, as resulting variable has no `results`
key in it.

Structure of such variable looks like that:
```
"devices_check": {
    "changed": false,
    "false_condition": "osd_auto_discovery | default(False) | bool",
    "skip_reason": "Conditional result was False",
    "skipped": true
}
```

Checking for task not being skipped solves such issues.

Signed-off-by: Dmitriy Rabotyagov <[email protected]>
(cherry picked from commit 9405558)
@clwluvw
Copy link
Member

clwluvw commented Oct 29, 2024

jenkins test centos-non_container-switch_to_containers

@clwluvw
Copy link
Member

clwluvw commented Oct 29, 2024

jenkins test centos-container-update

1 similar comment
@clwluvw
Copy link
Member

clwluvw commented Oct 29, 2024

jenkins test centos-container-update

@clwluvw clwluvw merged commit 88b6ece into stable-8.0 Oct 29, 2024
25 of 27 checks passed
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.

1 participant