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

fix:imageprepulljob not report when nodename is not exist #5534

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Piwriw
Copy link
Member

@Piwriw Piwriw commented Apr 13, 2024

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?:


@kubeedge-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign kevin-wangzefeng after the PR has been reviewed.
You can assign the PR to them by writing /assign @kevin-wangzefeng in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 13, 2024
@wbc6080
Copy link
Contributor

wbc6080 commented Apr 15, 2024

/kind bug

@kubeedge-bot kubeedge-bot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 15, 2024
@Piwriw Piwriw closed this Apr 15, 2024
@Piwriw Piwriw reopened this Apr 15, 2024
@Piwriw Piwriw closed this Apr 15, 2024
@Piwriw Piwriw reopened this Apr 15, 2024
@Piwriw Piwriw closed this Apr 15, 2024
@Piwriw Piwriw reopened this Apr 15, 2024
@Piwriw Piwriw closed this Apr 15, 2024
@Piwriw Piwriw reopened this Apr 15, 2024
@Piwriw Piwriw closed this Apr 15, 2024
@Piwriw Piwriw reopened this Apr 15, 2024
@Piwriw Piwriw closed this Apr 16, 2024
@Piwriw Piwriw reopened this Apr 16, 2024
cloud/pkg/taskmanager/util/controller/controller.go Outdated Show resolved Hide resolved
cloud/pkg/taskmanager/manager/executor.go Outdated Show resolved Hide resolved
cloud/pkg/taskmanager/manager/executor.go Outdated Show resolved Hide resolved
cloud/pkg/taskmanager/manager/executor.go Outdated Show resolved Hide resolved
cloud/pkg/taskmanager/manager/executor.go Outdated Show resolved Hide resolved
cloud/pkg/taskmanager/manager/executor.go Show resolved Hide resolved
@WillardHu
Copy link
Collaborator

Please modify this PR description:

**Which issue(s) this PR fixes**:

Fixes #5531

@Piwriw Piwriw closed this Apr 17, 2024
@Piwriw Piwriw reopened this Apr 17, 2024
@Piwriw Piwriw closed this Apr 17, 2024
@Piwriw Piwriw reopened this Apr 17, 2024
GetNodeStatus(string) ([]v1alpha1.TaskStatus, error)
UpdateNodeStatus(string, []v1alpha1.TaskStatus) error
StageCompleted(taskID string, state api.State) bool
GetTaskNodes(name string) ([]string, error)
Copy link
Collaborator

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?

Copy link
Member Author

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})
Copy link
Collaborator

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.

Copy link
Member Author

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",
Copy link
Collaborator

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) {
Copy link
Collaborator

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)
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

image prepull status error
5 participants