-
Notifications
You must be signed in to change notification settings - Fork 597
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
Support deleting cloud accounts #2060
Conversation
514a9b9
to
e0414a6
Compare
e0414a6
to
3455664
Compare
f49d5ec
to
7f42076
Compare
// delete hosts discovered from cloud | ||
deleteHostsQuery := ` | ||
MATCH (n:Node{account_id: $node_id}) | ||
WHERE n.agent_running=false | ||
DETACH DELETE n | ||
` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not delete the Node
directly and leave this job to the clean up task, there are couple of edge cases to be handled
Let's mark it as not running via:
MATCH (n:Node{account_id: $node_id})
SET n.agent_running=false
Instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for nitpicks :)
} | ||
} | ||
|
||
h.AuditUserActivity(r, EventComplianceScan, ActionDelete, req, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think auditlogs should be created even if the task fails.
we need a better framework at router level for auditlog, instrumenting all the methods with h.AuditUserActivity
is overkill.(not scope of this PR)
7f42076
to
c33c93f
Compare
Changes proposed in this pull request: