Repository navigation
Fix profile list when there are multi node clusters - #9996
Conversation
|
Hi @daehyeok. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Can one of the admins verify this patch? |
|
|
||
| // TODO: MachineName is copied from driver to avoid dependency cycle. Remove it or move to other module | ||
| // MachineName returns the name of the machine, as seen by the hypervisor given the cluster and node names | ||
| func MachineName(cc *ClusterConfig, n *Node) string { |
There was a problem hiding this comment.
lets move this a package that everyone can use, and we could refactor all other existances of this function
this could be moved to maybe util package or drivers package
There was a problem hiding this comment.
Which package is good for new home of this func?
There was a problem hiding this comment.
does it allow to put it in 'drivers" package ?
There was a problem hiding this comment.
or can we put it in the machine package?
so we could call it something like this
machine.NameFromConfig(cc *ClusterConfig, n *Node)
or simply
machine.Name(cc *ClusterConfig, n *Node)
There was a problem hiding this comment.
Are you means pkg/minikube/machine package?
Unfortunately, it also depend on config.
There was a problem hiding this comment.
how about we refactor the MachineName func to not depend on clusterConfig or Node ?
so we pass everything we want from it ?
machine.Name(name string, int nodes, controlPlane bool, ...)
There was a problem hiding this comment.
Function required following arguments,
Cluster name, Node name, number of node in cluster, is controlPlane or not
machine.Name(clusterName, nodeName string, int nodes, controlPlane bool).
Is it okay?
|
|
||
| // TODO: MachineName is copied from driver to avoid dependency cycle. Remove it or move to other module | ||
| // MachineName returns the name of the machine, as seen by the hypervisor given the cluster and node names | ||
| func MachineName(cc *ClusterConfig, n *Node) string { |
There was a problem hiding this comment.
or can we put it in the machine package?
so we could call it something like this
machine.NameFromConfig(cc *ClusterConfig, n *Node)
or simply
machine.Name(cc *ClusterConfig, n *Node)
|
Any update here? I wonder if @medyagh 's suggestion will also result in a circular dependency. |
|
|
||
| // TODO: MachineName is copied from driver to avoid dependency cycle. Remove it or move to other module | ||
| // MachineName returns the name of the machine, as seen by the hypervisor given the cluster and node names | ||
| func MachineName(cc *ClusterConfig, n *Node) string { |
There was a problem hiding this comment.
how about we refactor the MachineName func to not depend on clusterConfig or Node ?
so we pass everything we want from it ?
machine.Name(name string, int nodes, controlPlane bool, ...)
There was a problem hiding this comment.
thanks for this PR
it looks good just one thing I request to add integation test for it.
we have a TestMultiNode https://github.com/medyagh/minikube/blob/89a8cdc794098f9ba0550fbb5eeb19bc3dd8774d/test/integration/multinode_test.go#L29
lets add a Profile List to that test
and ensure the Profile List Exits Normally
only check for exit code 0
}{
{"FreshStart2Nodes", validateMultiNodeStart},
{"AddNode", validateAddNodeToMultiNode},
{"StopNode", validateStopRunningNode},
{"StartAfterStop", validateStartNodeAfterStop},
{"DeleteNode", validateDeleteNodeFromMultiNode},
{"StopMultiNode", validateStopMultiNodeCluster},
{"RestartMultiNode", validateRestartMultiNodeCluster},
lets add profile list after "FreshStart2Nodes",
|
Test added case to integration test. |
|
Can we be sure that we don't show the "Found 0 invalid profiles" when there are no invalid profiles? When everything is ok, it should just show the table. |
Oops my bad. I confused master brach also print warn. Please ignore my previous comment. fixed it. |
Fix prolbem which ListProfiles return subnodes in Mult-Node clusters as a part of inValidPs.
|
/ok-to-test |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: daehyeok, medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fix problem which ListProfiles return sub-nodes in Mult-Node clusters as
a part of inValidPs.
fixes #9772
before
after