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

[Cleanup] Types, ready-log-messages & closing connections #818

Merged
merged 7 commits into from
Oct 27, 2021

Conversation

iwilltry42
Copy link
Member

@iwilltry42 iwilltry42 commented Oct 25, 2021

Intro

This PR grew from just checking for leftover connections to a rather large cleanup of types to get a better oversight of various types.

Changes

  • new special internal role initServer used only to determine the correct ready-log-message
  • ready-log-messages now looked up by role and new Intent type (cluster-create/cluster-start/node-create/node-start), as especially for the init server there are different log messages indicating that we can proceed with the next step
  • moving types around:
    • K3s env vars now under .../types/k3s/env.go
    • defaults now under .../types/defaults.go
    • ...
  • improved waiting for log messages
    • not checking the whole log again and again in a loop
    • follow log with a single reader (and retry in case we see a fatal error, meaning that the K3s container will restart -> backoff after 10 tries)
    • BREAKING: new *runtimeTypes.NodeLogsOpts parameter in GetNodeLogs

To-Do:

  • FIXME: move back-off limit to config option (or default value in types)
  • FIXME: do not use goto

@iwilltry42 iwilltry42 added bug Something isn't working enhancement New feature or request priority/high breaking change labels Oct 25, 2021
@iwilltry42 iwilltry42 added this to the v5.0.2 milestone Oct 25, 2021
@iwilltry42 iwilltry42 self-assigned this Oct 25, 2021
@iwilltry42 iwilltry42 changed the title [Enhancement] Close connections and improve waiting for log lines [Cleanup] Types, ready-log-messages & closing connections Oct 27, 2021
@iwilltry42 iwilltry42 merged commit f8f17ca into main Oct 27, 2021
@iwilltry42 iwilltry42 deleted the enhancement/close-connections branch October 27, 2021 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change bug Something isn't working enhancement New feature or request priority/high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant