CASMPET-7238:/etc/target/saveconfig.json exists as a dir instead of file #181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary and Scope
This issue is caused due to hostpath /etc/target/saveconfig.json not existed when iscsi_daemon.yaml was deployed. Mounting '/etc/target/' directory instead of '/etc/target/saveconfig.json' fixed the issue.
Issues and Related PRs
None.
<insert branch name here>
: N/A<insert PR URL here>
: N/ATesting
Tested on both Starlord and Fanta having CSM 1.6.0-alpha.67 installed.
Tested on:
Starlord and Fanta
Test description:
Reproduced the issue when iSCSI was not configured. /etc/target/saveconfig.json directory got created on host as this file was not existed (iSCSI was not configured). When iSCSI was configured via CFS ansible play books, it tried to create /etc/target/saveconfig.json file. But since there was a directory /etc/target/saveconfig.json/ , /etc/target/saveconfig.json/saveconfig.json.temp file got created.
Fix verification: Edited the daemonset "kubectl edit cray-sysmgmt-health-node-exporter-iscsi -n sysmgmt-health" to mount "/etc/target" and issue is not seen.
Risks and Mitigations
None.
Pull Request Checklist