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

Add status to MultiNicNetwork CR and fix some bugs #3

Merged
merged 2 commits into from
Jul 25, 2022
Merged

Conversation

sunya-ch
Copy link
Collaborator

The main object of this PR is to add CIDR and route status regarding MultiNicNetwork.

// +enum
type RouteStatus string

const (
	// AllRouteApplied indicates that all routes are applied
	AllRouteApplied RouteStatus = "Success"

	// ApplyingRoute indicates that the new cidr is just recomputed and waiting for route update
	ApplyingRoute RouteStatus = "WaitForRoutes"

	// SomeRouteFailed indicates that some route cannot be applied, need attention
	SomeRouteFailed RouteStatus = "Failed"

	// RouteUnknown indicates that some daemon cannot be connected
	RouteUnknown RouteStatus = "Unknown"

	// RouteNoApplied indicates that there is no L3 configuration applied
	RouteNoApplied RouteStatus = "N/A"
)

type NicNetworkResult struct {
	NetAddress string `json:"netAddress"`
	NumOfHost  int    `json:"numOfHosts"`
}

// MultiNicNetworkStatus defines the observed state of MultiNicNetwork
type MultiNicNetworkStatus struct {
	ComputeResults []NicNetworkResult `json:"computeResults"`
	Status         RouteStatus        `json:"routeStatus"`
	LastSyncTime   metav1.Time        `json:"lastSyncTime"`
}

Additionally, I improved the code with the following fixes.

  • check daemon pod container ready state instead of ip assignment to reduce probability of connection refuse failure when try connecting to daemon at the first time
  • remove deprecated CIDR namespace (now cluster-wide)
  • update test suite to avoid conflicts among test cases with multinicnetwork deployment
  • shrink too long name in connection-check program
  • reduce hostinterface reconcile time when getting connection refuse failure

@sunya-ch sunya-ch requested a review from tatsuhirochiba July 25, 2022 11:27
@tatsuhirochiba tatsuhirochiba merged commit be9f330 into main Jul 25, 2022
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.

2 participants