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

Investigate not writing a machine to DB until registered #341

Closed
kradalby opened this issue Feb 20, 2022 · 3 comments
Closed

Investigate not writing a machine to DB until registered #341

kradalby opened this issue Feb 20, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@kradalby
Copy link
Collaborator

Currently a Machine object is created in the database immediately when the registration process starts, and not always clean up.

This seem to be to hold temporary data between requests during the registration process.

This often leads to half-finished machine objects being left around in the database, this specially happens when registering Windows clients for some reason.

This ticket is to track an effort to not save the machine object to the database until it is actually registered, as there is no real point to have it in there. Any in-flight registration should be able to live in memory until complete.

@kradalby kradalby added the enhancement New feature or request label Feb 20, 2022
@restanrm
Copy link
Contributor

Could it be instead put in special table with expiration date and cleanup job ?

I'm thinking that in case of distributed deployment, in memory state will not work.

@kradalby
Copy link
Collaborator Author

That would be a possibility, I want it to have as little logic as possible, registration should not need to be inflight for long.

but I dont know what is a good approach, so needs some thought.

@restanrm
Copy link
Contributor

An in-memory solution seems quite good. It still should be implemented with interfaces in mind to be replacable by a small implementation of an external service like Redis in my opinion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants