Bug 1363659

Summary: [networking_public_244] The egressnetworkpolicy can not be delete after delete project
Product: OpenShift Container Platform Reporter: Yan Du <yadu>
Component: NetworkingAssignee: Dan Winship <danw>
Status: CLOSED ERRATA QA Contact: Meng Bo <bmeng>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, eparis, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-27 09:42:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yan Du 2016-08-03 10:01:01 UTC
Description of problem:
The egressnetworkpolicy can not be delete after delete project

Version-Release number of selected component (if applicable):
openshift v1.3.0-alpha.2+5e26b6a-dirty
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git

How reproducible:
Always

Steps to Reproduce:
1. Create a new projecrt a1
2. Create EgressNetworkPolicy by cluster admin
# oc create -f egress.json -n a1
{
    "kind": "EgressNetworkPolicy",
    "apiVersion": "v1",
    "metadata": {
        "name": "default"
    },
    "spec": {
        "egress": [
            {
                "type": "Allow",
                "to": {
                    "cidrSelector": "10.66.128.0/24"
                }
            },
            {
                "type": "Deny",
                "to": {
                    "cidrSelector": "10.66.140.0/24"
                }
            }
        ]
    }
}
3. Delete the project
4. Check the egressnetworkpolicy
[root@master ~]# oc get egressnetworkpolicy --all-namespaces
NAMESPACE   NAME
a1          default

5. Delete the egressnetworkpolicy by admin
# oc delete egressnetworkpolicy default -n a1



Actual results:
[root@master ~]# oc delete egressnetworkpolicy default -n a1
Error from server: namespaces "a1" not found


Expected results:
The egressnetworkpolicy can be deleted successfully

Comment 1 Yan Du 2016-08-03 10:05:15 UTC
Additional info:
step3: Even delete the project by cluster-admin, egressnetworkpolicy still can not be deleted.

Comment 2 Meng Bo 2016-08-05 07:13:59 UTC
The following output are getting from the ocp build 3.3.0.14.

[root@qe-networking-master-1 ~]# oc get egressnetworkpolicy --all-namespaces 
NAMESPACE   NAME
bmengp1     policy-1
[root@qe-networking-master-1 ~]# oc delete egressnetworkpolicy --all -n bmengp1
[root@qe-networking-master-1 ~]# echo $?
0
[root@qe-networking-master-1 ~]# oc get egressnetworkpolicy --all-namespaces 
NAMESPACE   NAME
bmengp1     policy-1
[root@qe-networking-master-1 ~]# oc get project bmengp1
Error from server: namespaces "bmengp1" not found

Comment 3 Dan Winship 2016-08-16 20:43:51 UTC
fixed in git

Comment 4 Troy Dawson 2016-08-18 20:16:58 UTC
This has been merged into ose and is in OSE v3.3.0.22 or newer.

Comment 6 Yan Du 2016-08-19 02:22:07 UTC
Test on latest OCP code, bug have been fixed. egressnetworkpolicy could be delete successfully after delete project

oc v3.3.0.22
kubernetes v1.3.0+507d3a7

Comment 8 errata-xmlrpc 2016-09-27 09:42:23 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, 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/RHBA-2016:1933