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

Adds block to prevent deploying to un-handshake'd VM, shuts node down if first handshake fails #136

Merged
merged 6 commits into from
Mar 6, 2024

Conversation

autodidaddict
Copy link
Contributor

Closes #134

Don't worry about the large "delete" portion of the diff, I just moved a bunch of related functions into their own file to try and keep the machine_mgr.go file to a manageable size.

@autodidaddict autodidaddict requested a review from a team as a code owner March 4, 2024 14:05
@@ -352,133 +355,6 @@ func (m *MachineManager) awaitHandshake(vmid string) {
}
}

// Called when the node server gets a log entry via internal NATS. Used to
Copy link
Contributor

Choose a reason for hiding this comment

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

I kinda liked having all of the MachineManager code in the same place. Maybe it doesn't matter too much. @jordan-rash do you have an opinion?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I start to itch when we get over the 500 line mark. While yes it's all under the machine manager umbrella, I like having logically related stuff in nearby locations.

Copy link
Contributor

Choose a reason for hiding this comment

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

I start to itch when we get over the 500 line mark. While yes it's all under the machine manager umbrella, I like having logically related stuff in nearby locations.

Makes sense. It would be better if we created a new interface and struct to make things more readable imho instead of separating it into separate files. I will not die on this hill though.

Copy link
Contributor

@kthomas kthomas left a comment

Choose a reason for hiding this comment

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

We can revisit creating an interface for select MachineManager methods we are moving into machine_mgr_events.go in a separate PR.

@autodidaddict autodidaddict merged commit 1b96f07 into main Mar 6, 2024
3 checks passed
@autodidaddict autodidaddict deleted the fix/shakernoshaking branch March 6, 2024 13:48
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.

Nex tries to deploy workload into a VM that hasn't reported a handshake
2 participants