Skip to content

Commit

Permalink
fix: liveMigration with IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
fanriming committed Jan 11, 2022
1 parent c4cc8f0 commit c830594
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ func (c *Controller) syncVmLiveMigrationPort() {
// lists pods with the same IP address
vmLsps, err := c.ovnClient.ListLogicalEntity("logical_switch_port",
fmt.Sprintf("external_ids:ls=%s", subnet.Name),
fmt.Sprintf("external_ids:ip=%s", strings.ReplaceAll(addr.Spec.IPAddress, ",", "/")))
fmt.Sprintf("external_ids:ip=\"%s\"", strings.ReplaceAll(addr.Spec.IPAddress, ",", "/")))
if err != nil {
klog.Errorf("list logical_switch_port failed, %v", err)
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/ovs/ovn-nbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (c Client) CreatePort(ls, port, ip, mac, pod, namespace string, portSecurit

ports, err := c.ListLogicalEntity("logical_switch_port",
fmt.Sprintf("external_ids:ls=%s", ls),
fmt.Sprintf("external_ids:ip=%s", strings.ReplaceAll(ip, ",", "/")))
fmt.Sprintf("external_ids:ip=\"%s\"", strings.ReplaceAll(ip, ",", "/")))
if err != nil {
klog.Errorf("list logical entity failed: %v", err)
return err
Expand Down

0 comments on commit c830594

Please sign in to comment.