-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix:imageprepulljob not report when nodename is not exist #5534
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/kind bug |
cloud/pkg/taskmanager/nodeupgradecontroller/node_upgrade_controller.go
Outdated
Show resolved
Hide resolved
b2f35d6
to
84a8c07
Compare
84a8c07
to
de86f23
Compare
de86f23
to
7fdeda7
Compare
Please modify this PR description: **Which issue(s) this PR fixes**:
Fixes #5531 |
4481093
to
ddde848
Compare
cloud/pkg/taskmanager/imageprepullcontroller/image_prepull_controller.go
Show resolved
Hide resolved
cloud/pkg/taskmanager/nodeupgradecontroller/node_upgrade_controller.go
Outdated
Show resolved
Hide resolved
cloud/pkg/taskmanager/imageprepullcontroller/image_prepull_controller.go
Outdated
Show resolved
Hide resolved
GetNodeStatus(string) ([]v1alpha1.TaskStatus, error) | ||
UpdateNodeStatus(string, []v1alpha1.TaskStatus) error | ||
StageCompleted(taskID string, state api.State) bool | ||
GetTaskNodes(name string) ([]string, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm still confused about this function GetTaskNodes
. I cannot find where implement it or use it. Could you please explain more about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry,it is my problem,I forget to delete it .I must apologize for any inconvenience it may have caused you. Thanks for your time.Now is update.
Signed-off-by: joohwan <piwriw@163.com>
successNodes, failNodes := controller.ValidateNode(message) | ||
nodeStatus = make([]v1alpha1.TaskStatus, 0, len(message.Name)) | ||
for _, node := range failNodes { | ||
nodeStatus = append(nodeStatus, v1alpha1.TaskStatus{NodeName: node.Name, State: api.TaskFailed}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please set fields Event, Action and Reason to ensure that the error is traceable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry,it passed a week.Now is updated.
Signed-off-by: joohwan <piwriw@163.com>
nodeStatus = append(nodeStatus, v1alpha1.TaskStatus{ | ||
NodeName: node.Name, | ||
State: api.TaskFailed, | ||
Event: "Check", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the event type always "Check" here?
if err != nil { | ||
klog.Warningf("get node list error: %s", err.Error()) | ||
return nil | ||
return nil, nil | ||
} | ||
for _, node := range nodes { | ||
if !util.IsEdgeNode(node) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thare are nodes status records are ignored that not edge nodes and not ready nodes. I think these nodes need to be recorded in the state as well
nodes, err := bc.getNodeList(taskMessage.NodeNames, taskMessage.LabelSelector) | ||
func (bc *BaseController) ValidateNode(taskMessage util.TaskMessage) ([]*v1.Node, []*v1.Node) { | ||
var validateNodes []*v1.Node | ||
nodes, nodesNonExist, err := bc.getNodeList(taskMessage.NodeNames, taskMessage.LabelSelector) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is an error here, the status will not have any feedback, we can only find the cloudcore log, is this what we expected?
What type of PR is this?
What this PR does / why we need it:
fix:imageprepulljob not report when nodename is not exist
Which issue(s) this PR fixes:
Fixes #5531
Special notes for your reviewer:
Does this PR introduce a user-facing change?: