-
Notifications
You must be signed in to change notification settings - Fork 264
Update nodeInfo once node was cordoned #491
Update nodeInfo once node was cordoned #491
Conversation
!reflect.DeepEqual(oldNode.Labels, newNode.Labels) | ||
switch { | ||
// TODO(jiaxuanzhou): reserved for predictions for volumes. | ||
case !reflect.DeepEqual(oldNode.Status, newNode.Status): |
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.
Why not check Allocatable
directly?
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.
For field of status
for node, there are several potential predictions as disk presure, volumes check , mem presure. etc.
when scheduling . So i list three logics for this check: status, spec, metaData of the node
, and Allocatable
is part of the status
.
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.
BTW, for resource calculating of the func (ni *NodeInfo) AddTask(task *TaskInfo)
, there is not any mutex lock for nodeinfo, even the tasks(pods) were handled sequentially , but it is easy to happen that the nodeInfo
for the next task(pod) is not the updated one, so the worst result is several pods were bind to the same node and the pods will be reported not enough of cpu 、 mem or GPU..
a871bb9
to
bfedd13
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jiaxuanzhou, k82cn The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Update nodeInfo once node was cordoned
Update nodeInfo once node was cordoned
Update nodeInfo once node was cordoned
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #453 with #455
need to update the nodeInfo once the node was cordoned.
#uns
Special notes for your reviewer:
/assign @k82cn
Release note: