-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(vm): add live migration for nodePlacement #518
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: yaroslavborbat <[email protected]>
Signed-off-by: yaroslavborbat <[email protected]>
Signed-off-by: yaroslavborbat <[email protected]>
Signed-off-by: yaroslavborbat <[email protected]>
Signed-off-by: yaroslavborbat <[email protected]>
813c320
to
42ec5a0
Compare
Signed-off-by: yaroslavborbat <[email protected]>
42ec5a0
to
dde4eb7
Compare
Signed-off-by: yaroslavborbat <[email protected]>
0cb3de5
to
f2570ef
Compare
Signed-off-by: yaroslavborbat <[email protected]>
f2570ef
to
c75f196
Compare
- task: dlv:virt-controller:print | ||
|
||
dlv:virt-controller:print: | ||
desc: "Print subcommands for debug" |
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.
What is the subcommand?
desc: "Print subcommands for debug" | |
desc: "Print commands for debug" |
cat <<EOF | ||
kubectl -n d8-virtualization patch deploy virt-controller --type='strategic' -p '{ | ||
"spec": { | ||
"template": { | ||
"spec": { | ||
"containers": [ { | ||
"name": "virt-controller", | ||
"image": "${IMAGE}", | ||
"ports": [ { "containerPort": 2345, "name": "dlv" } ] | ||
}] | ||
} | ||
} | ||
} | ||
}' | ||
EOF | ||
echo 'kubectl -n d8-virtualization port-forward $(kubectl -n d8-virtualization get pod -l kubevirt.internal.virtualization.deckhouse.io=virt-controller -oname | head -1) 2345:2345' |
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.
cat <<EOF | |
kubectl -n d8-virtualization patch deploy virt-controller --type='strategic' -p '{ | |
"spec": { | |
"template": { | |
"spec": { | |
"containers": [ { | |
"name": "virt-controller", | |
"image": "${IMAGE}", | |
"ports": [ { "containerPort": 2345, "name": "dlv" } ] | |
}] | |
} | |
} | |
} | |
}' | |
EOF | |
echo 'kubectl -n d8-virtualization port-forward $(kubectl -n d8-virtualization get pod -l kubevirt.internal.virtualization.deckhouse.io=virt-controller -oname | head -1) 2345:2345' | |
cat <<EOF | |
kubectl -n d8-virtualization patch deploy virt-controller --type='strategic' -p '{ | |
"spec": { | |
"template": { | |
"spec": { | |
"containers": [ { | |
"name": "virt-controller", | |
"image": "${IMAGE}", | |
"ports": [ { "containerPort": 2345, "name": "dlv" } ] | |
}] | |
} | |
} | |
} | |
}' | |
kubectl -n d8-virtualization port-forward deploy/virt-controller 2345:2345 | |
EOF |
+ "k8s.io/apimachinery/pkg/labels" | ||
"k8s.io/utils/ptr" | ||
|
||
+ "kubevirt.io/kubevirt/pkg/indexers" | ||
"kubevirt.io/kubevirt/pkg/virt-controller/network" | ||
|
||
+ networkv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" | ||
+ | ||
+ "kubevirt.io/kubevirt/pkg/util/affinity" | ||
+ | ||
"kubevirt.io/kubevirt/pkg/virt-controller/watch/topology" | ||
|
||
backendstorage "kubevirt.io/kubevirt/pkg/storage/backend-storage" | ||
|
||
- networkv1 "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1" | ||
- |
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, disable autoformatting for kubevirt =)
|
||
#### `024-auto-migrate-if-nodeplacement-changed.patch` | ||
|
||
Start the migration if the nodeSelector or affinity has changed. |
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.
This huge patch deserves more detailed description.
domainSpec.CPU.Sockets = uint32(cpuRequest.Value()) | ||
domainSpec.CPU.MaxSockets = uint32(cpuLimit.Value()) |
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.
Set values for sockets is something new. It should be explained in PR description.
Description
Apply nodeSelector and Affinity configuration immediately to build EE.
Add patch
024-auto-migrate-if-nodeplacement-changed.patch
for kubevirt.By default, migration at kubevirt startup is performed only to puHotplug,memoryHotplug or update static volumes.
This patch startup live-migration after updating nodeSelector or affinity.
If the current node is matched to a new "nodeSelector" or "affinity", then the migration will not be started
Why do we need it, and what problem does it solve?
What is the expected result?
Checklist