From 32a9f1840a90b8736d1ba5b030da207f28d7f230 Mon Sep 17 00:00:00 2001 From: wanyaoqi <18528551+wanyaoqi@users.noreply.github.com> Date: Wed, 7 Dec 2022 02:15:05 +0800 Subject: [PATCH] fix(host): update host wire with mac addr (#15500) --- pkg/hostman/hostinfo/hostinfo.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/hostman/hostinfo/hostinfo.go b/pkg/hostman/hostinfo/hostinfo.go index 160ea8ebb6..05a4b8c56a 100644 --- a/pkg/hostman/hostinfo/hostinfo.go +++ b/pkg/hostman/hostinfo/hostinfo.go @@ -1621,9 +1621,10 @@ func (h *SHostInfo) doSyncNicInfo(nic *SNIC) error { content := jsonutils.NewDict() content.Set("bridge", jsonutils.NewString(nic.Bridge)) content.Set("interface", jsonutils.NewString(nic.Inter)) - content.Set("mac_addr", jsonutils.NewString(nic.BridgeDev.GetMac())) + query := jsonutils.NewDict() + query.Set("mac_addr", jsonutils.NewString(nic.BridgeDev.GetMac())) _, err := modules.Hostwires.Update(h.GetSession(), - h.HostId, nic.WireId, nil, content) + h.HostId, nic.WireId, query, content) if err != nil { return errors.Wrap(err, "modules.Hostwires.Update") }