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

NAS-132742 / 25.04 / fix key collision in zpool.status #15043

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

yocalebo
Copy link
Contributor

@yocalebo yocalebo commented Nov 26, 2024

Someone named one of their zpools disks..... A strange zpool name but it caused a key collision in zpool.status. Place all zpools underneath a top-level pools key to prevent this scenario.

@yocalebo yocalebo requested a review from a team November 26, 2024 14:14
@bugclerk bugclerk changed the title fix key collision in zpool.status NAS-132742 / 25.04 / fix key collision in zpool.status Nov 26, 2024
@bugclerk
Copy link
Contributor

@themylogin
Copy link
Contributor

Why are pool names and static keys mixed in one dictionary? Can we have it like

{
    "disks": {...},
    "pools": {...},
}

?

@yocalebo
Copy link
Contributor Author

Why are pool names and static keys mixed in one dictionary? Can we have it like

{
    "disks": {...},
    "pools": {...},
}

?

Yeah, that's a better idea and actually has less risk of regression but also introduces more lines changed (since tests have to be updated). I've made those changes.

Copy link
Contributor

@themylogin themylogin left a comment

Choose a reason for hiding this comment

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

Thank you!

@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Nov 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants