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

CASMTRIAGE-7301: Ansible play to create iscsi-sbps-targets should not… #305

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ravikanth-nalla-hpe
Copy link
Contributor

CASMTRIAGE-7301: Ansible play to create iscsi-sbps-targets should not delegate to localhost
  - fixed the tasks, update file (with host, HSN and NMN info) and creation of DNS SRV and A records
    to delegate to one of the worker nodes instead of localhost.

Summary and Scope

One of the tasks of role csm.sbps.dns_srv_records was failing when running in CFS environment when compared to running with standard ansible-playbook command. This was due to the reason of "delegate_to: localhost" where the tasks were delegated to run inside the CFS k8s job (in non CFS case "delegate_to: localhost" would be the master node where plays are getting executed) and failing with kubectl command not found error. Two specific tasks under this role are supposed to be run either on master node or on one of the worker nodes instead of running locally inside the CFS k8s job.

Fixed these two specific tasks to run on the 1st worker from the host inventory group (Management_Worker) and that is the best fix is what I see as we can't run these tasks on master node (original intention) in CFS environment with current _delegate_to: "{{ play_hosts | first }}"_fix when inventory is "Management_Worker". Here it will now update the file "/tmp/hsn_nmn_info.txt" on the first worker as well as invoke creation of the DNS SRV and S records on the same worker referring to "/tmp/hsn_nmn_info.txt" that should solve the purpose.

Issues and Related PRs

List and characterize relationship to Jira/Github issues and other pull requests. Be sure to list dependencies.

  • Resolves [issue id](issue link)
  • Change will also be needed in <insert branch name here>
  • Future work required by [issue id](issue link)
  • Documentation changes required in [issue id](issue link)
  • Merge with/before/after <insert PR URL here>

Testing

Tested on bare metal systems: starlord and surtur

Tested on:

Tested on bare metal systems: starlord and surtur

Test description:

Verified the fix by running the ansible plays with CFS session/ config. Observed that all the tasks have been completed
successfully in CFS environment without any fail and also the DNS SRV and A records are created (tasks where the fix is actually applied).
...
_PLAY RECAP *********************************************************************
x3000c0s11b0n0 : ok=10 changed=5 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
x3000c0s26b0n0 : ok=9 changed=4 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
x3000c0s7b0n0 : ok=9 changed=4 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
x3000c0s9b0n0 : ok=9 changed=4 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

All playbooks completed successfully_

Risks and Mitigations

None

Pull Request Checklist

  • [NA] Version number(s) incremented, if applicable
  • Copyrights updated
  • [NA] License file intact
  • Target branch correct
  • CHANGELOG.md updated
  • Testing is appropriate and complete, if applicable
  • [NA] HPC Product Announcement prepared, if applicable

… delegate to localhost

  - fixed the tasks, update file (with host, HSN and NMN info) and creation of DNS SRV and A records
    to delegate to one of the worker node instead of localhost.
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