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

fix: Allow tangd socket override directory to be managed outside of the role #139

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

richm
Copy link
Contributor

@richm richm commented Feb 14, 2024

Cause: The role was assuming that the only file being managed in the tangd
socket override directory was the override.conf file for the custom port.

Consequence: The role would delete the directory if there was no custom port
without checking if there were other files in that directory being used to
override tangd settings. This would cause the directory to be recreated
upon subsequent runs, and the role would report a change, and not appear
to be idempotent.

Fix: When adding the override directory for the port override file, do not
change its attributes. Do not delete the directory if there are other files
in it.

Result: The role will co-exist with the tangd socket override files being
managed outside of the role.

Signed-off-by: Rich Megginson rmeggins@redhat.com

Fixes #138

@richm
Copy link
Contributor Author

richm commented Feb 14, 2024

[citest]

…he role

Cause: The role was assuming that the only file being managed in the tangd
socket override directory was the override.conf file for the custom port.

Consequence: The role would delete the directory if there was no custom port
without checking if there were other files in that directory being used to
override tangd settings.  This would cause the directory to be recreated
upon subsequent runs, and the role would report a change, and not appear
to be idempotent.

Fix: When adding the override directory for the port override file, do not
change its attributes.  Do not delete the directory if there are other files
in it.

Result: The role will co-exist with the tangd socket override files being
managed outside of the role.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>

Fixes linux-system-roles#138
@richm
Copy link
Contributor Author

richm commented Feb 14, 2024

[citest]

Copy link
Member

@sergio-correia sergio-correia left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM.

@richm richm merged commit 7abb08b into linux-system-roles:main Feb 14, 2024
28 checks passed
@richm richm deleted the custom-port-idempotent branch February 14, 2024 15:37
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.

Critical Error in Idempotence Test When Setting Custom Port for Tangd
2 participants