Bug 2094462 - DeleteACLsFromPortGroupOps doesn't actually have any UUIDs set, so it deletes nothing and complains
Summary: DeleteACLsFromPortGroupOps doesn't actually have any UUIDs set, so it deletes...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.11
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.12.0
Assignee: Nadia Pinaeva
QA Contact: huirwang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-07 16:25 UTC by Surya Seetharaman
Modified: 2023-01-17 19:50 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-17 19:49:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ovn-kubernetes pull 1205 0 None Merged [DownstreamMerge] 4.12 initial merge from upstream: 7-18-22 2022-07-22 11:12:36 UTC
Github ovn-org ovn-kubernetes pull 3055 0 None Merged Fix deleteMulticastAllowPolicy: don't cleanup ACLs for port group 2022-06-29 14:31:21 UTC
Red Hat Product Errata RHSA-2022:7399 0 None None None 2023-01-17 19:50:00 UTC

Description Surya Seetharaman 2022-06-07 16:25:23 UTC
Description of problem:

E0601 13:32:27.979534      39 namespace.go:188] error in transact with ops [{Op:mutate Table:Port_Group Row:map[] Rows:[] Columns:[] Mutations:[{Column:acls Mutator:delete Value:{GoSet:[{GoUUID:} {GoUUID:}]}}] Timeout:<nil> Where:[where column _uuid == {8eba5920-69a7-49e9-97f7-e239a430802e}] Until: Durable:<nil> Comment:<nil> Lock:<nil> UUIDName:} {Op:delete Table:Port_Group Row:map[] Rows:[] Columns:[] Mutations:[] Timeout:<nil> Where:[where column _uuid == {8eba5920-69a7-49e9-97f7-e239a430802e}] Until: Durable:<nil> Comment:<nil> Lock:<nil> UUIDName:}] results [{Count:0 Error:syntax error Details:named-uuid string is not a valid <id> UUID:{GoUUID:} Rows:[]} {Count:0 Error: Details: UUID:{GoUUID:} Rows:[]}] and errors [syntax error: named-uuid string is not a valid <id>]: 1 ovsdb operations failed

egressMatch := getACLMatch(portGroupName, getMulticastACLEgrMatch(), knet.PolicyTypeEgress)
	egressACL := buildACL(ns, portGroupName, "MulticastAllowEgress", nbdb.ACLDirectionFromLport, types.DefaultMcastAllowPriority, egressMatch, nbdb.ACLActionAllow, "", knet.PolicyTypeEgress)

	ingressMatch := getACLMatch(portGroupName, getMulticastACLIgrMatch(nsInfo), knet.PolicyTypeIngress)
	ingressACL := buildACL(ns, portGroupName, "MulticastAllowIngress", nbdb.ACLDirectionToLport, types.DefaultMcastAllowPriority, ingressMatch, nbdb.ACLActionAllow, "", knet.PolicyTypeIngress)

	ops, err := libovsdbops.DeleteACLsFromPortGroupOps(nbClient, nil, portGroupName, egressACL, ingressACL)
	if err != nil {
		return err
	}

func DeleteACLsFromPortGroupOps(nbClient libovsdbclient.Client, ops []libovsdb.Operation, name string, acls ...*nbdb.ACL) ([]libovsdb.Operation, error) {
	if len(acls) == 0 {
		return ops, nil
	}

	pg := nbdb.PortGroup{
		Name: name,
		ACLs: make([]string, 0, len(acls)),
	}

	for _, acl := range acls {
		pg.ACLs = append(pg.ACLs, acl.UUID)
	}

	opModel := operationModel{
		Model:            &pg,
		OnModelMutations: []interface{}{&pg.ACLs},
		ErrNotFound:      true,
		BulkOp:           false,
	}

	m := newModelClient(nbClient)
	return m.DeleteOps(ops, opModel)
}

BuildACL doesn't actually have any acl uuid set.


Version-Release number of selected component (if applicable):


How reproducible:
Always in upstream ovnk CI

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Surya Seetharaman 2022-06-15 21:01:19 UTC
Seems like there is already a PR upstream to fix this: https://github.com/ovn-org/ovn-kubernetes/pull/2994 so this bug will simply track the downstream cherry-pick

Comment 3 Surya Seetharaman 2022-06-20 19:23:55 UTC
Changing state to POST since I don't have to do much on this bug.

Comment 4 Surya Seetharaman 2022-06-29 14:30:56 UTC
easy fix merged by Nadia: https://github.com/ovn-org/ovn-kubernetes/pull/3055
giving her the bug as well since she did the fix.

Comment 11 errata-xmlrpc 2023-01-17 19:49:52 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.12.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7399


Note You need to log in before you can comment on or make changes to this bug.