mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-28 21:32:20 +00:00
fix(kvm): keep the mac attributes of a guest that rscan updates
rscan -u, and rscan -w for a guest that xCAT already knows, deleted the mac row of the guest and wrote back only its MAC address. That dropped mac.duid, so the next makedhcp reserved the default DUID in place of the identifier the node had selected, and its client lost the reserved address. rscan now updates the MAC address in the existing row and keeps the other mac attributes. The other tables it rewrites are unchanged. (cherry picked from commit b464b57499d74d525188c59a340c1bde8e3ffcf1) (cherry picked from commitb1ed21d010) (cherry picked from commit5f1fd10929) Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
committed by
Daniel Hilst
parent
965430fa6a
commit
a6a2596d7b
@@ -3400,7 +3400,7 @@ sub rscan {
|
||||
else {
|
||||
if ($hash_vm2host{$node} eq $hypervisor) {
|
||||
|
||||
#mark this node to delete in 'vm' 'mac' vpd' 'nodelist' 'nodetype' 'nodehm' tables
|
||||
#mark this node to delete in 'vm' vpd' 'nodelist' 'nodetype' 'nodehm' tables; its mac row keeps duid
|
||||
$updatetable->{vm}->{'!*XCATNODESTODELETE*!'}->{$node} = $node;
|
||||
|
||||
$updatetable->{vm}->{$node}->{host} = $hypervisor;
|
||||
@@ -3410,7 +3410,6 @@ sub rscan {
|
||||
$updatetable->{vm}->{$node}->{nics} = $vmnics;
|
||||
$updatetable->{vm}->{$node}->{nicmodel} = $vmnicnicmodel;
|
||||
$updatetable->{vm}->{$node}->{othersettings} = "nodefromrscan";
|
||||
$updatetable->{mac}->{'!*XCATNODESTODELETE*!'}->{$node} = $node;
|
||||
$updatetable->{mac}->{$node}->{mac} = $mac;
|
||||
$updatetable->{vpd}->{'!*XCATNODESTODELETE*!'}->{$node} = $node;
|
||||
$updatetable->{vpd}->{$node}->{uuid} = $uuid;
|
||||
@@ -3440,7 +3439,6 @@ sub rscan {
|
||||
$updatetable->{vm}->{$node}->{nics} = $vmnics;
|
||||
$updatetable->{vm}->{$node}->{nicmodel} = $vmnicnicmodel;
|
||||
$updatetable->{vm}->{$node}->{othersettings} = "nodefromrscan";
|
||||
$updatetable->{mac}->{'!*XCATNODESTODELETE*!'}->{$node} = $node;
|
||||
$updatetable->{mac}->{$node}->{mac} = $mac;
|
||||
$updatetable->{vpd}->{'!*XCATNODESTODELETE*!'}->{$node} = $node;
|
||||
$updatetable->{vpd}->{$node}->{uuid} = $uuid;
|
||||
|
||||
Reference in New Issue
Block a user