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

Deleting a damaged graph can sometimes led to removal of valid graphs too #4126

Closed
TheWitness opened this issue Feb 15, 2021 · 0 comments
Closed
Labels
blocker Blocking release bug Undesired behaviour resolved A fixed issue
Milestone

Comments

@TheWitness
Copy link
Member

Describe the bug

In certain cases, where for example, you database has been corrupted due to a bug, it is possible to create a graph with a graph id of 0. When you go to delete that corrupt graph, you also delete all your Graph Templates.

To Reproduce

Create a graph manually with a id in the graph_local table of 0, then delete it.

Expected behavior

Cacti should remove the local graph id, but not any templates.

@TheWitness TheWitness added bug Undesired behaviour unverified Some days we don't have a clue blocker Blocking release and removed unverified Some days we don't have a clue labels Feb 15, 2021
@TheWitness TheWitness added this to the v1.2.17 milestone Feb 15, 2021
TheWitness added a commit that referenced this issue Feb 15, 2021
It is possible to delete all templates by deleting a damaged graph with a local_graph_id of 0
@TheWitness TheWitness added the resolved A fixed issue label Feb 15, 2021
TheWitness added a commit that referenced this issue Feb 15, 2021
Let's only run that query when we need to.
TheWitness added a commit that referenced this issue Feb 15, 2021
How can an auto_increment be 0 you ask?  I don't know.
@netniV netniV changed the title It is possible to delete all templates by deleting a damaged graph with a local_graph_id of 0 Deleting a damaged graph can sometimes led to removal of valid graphs too Apr 30, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocker Blocking release bug Undesired behaviour resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

1 participant