Bug 1278259 - [infrastructure_public_202]Delete a project can't delete the hpa
[infrastructure_public_202]Delete a project can't delete the hpa
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.x
Unspecified Unspecified
medium Severity high
: ---
: ---
Assigned To: Solly Ross
DeShuai Ma
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-05 01:11 EST by DeShuai Ma
Modified: 2015-11-23 16:15 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:15:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description DeShuai Ma 2015-11-05 01:11:12 EST
Description of problem:
Create a hpa under a project, after delete the project, the hpa still exist.

Version-Release number of selected component (if applicable):
openshift v1.0.7-287-g60781e3-dirty
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2

How reproducible:
Always

Steps to Reproduce:
1.Create a project and hpa
[fedora@ip-172-18-11-59 sample-app]$ oadm new-project dma
Created project dma
[fedora@ip-172-18-11-59 sample-app]$ oc create -f hpa.yaml -n dma
horizontalpodautoscaler "php-apache" created
[fedora@ip-172-18-11-59 sample-app]$ oc get hpa -n dma
NAME         REFERENCE                           TARGET    CURRENT     MINPODS   MAXPODS   AGE
php-apache   DeploymentConfig/php-apache/scale   50%       <waiting>   1         10        5s

2.Delete the project 
[fedora@ip-172-18-11-59 sample-app]$ oc delete project dma
project "dma" deleted

3.Get the hpa
[fedora@ip-172-18-11-59 sample-app]$ oc get hpa -n dma
NAME         REFERENCE                           TARGET    CURRENT     MINPODS   MAXPODS   AGE
php-apache   DeploymentConfig/php-apache/scale   50%       <waiting>   1         10        15s

Actual results:
3.The hpa still exist after delete the project

Expected results:
3.The hpa should be deleted

Additional info:
Comment 1 Derek Carr 2015-11-05 10:29:14 EST
Project deletion is asynchronous.

It's possible the user fetched the HPA prior to clean-up of the project.

Attempting to reproduce scenario, but verifying that project does not show in terminating status prior to fetching the resource.
Comment 2 Derek Carr 2015-11-05 11:07:58 EST
I was able to reproduce the error.
Comment 3 Derek Carr 2015-11-05 11:17:44 EST
Debugging further, I can see that the namespace_controller is running with experimentalMode: false, which means HPA, Job, etc. are all impacted by this.  Need to fix how namespace_controller is bootstrapped in origin.
Comment 4 Jordan Liggitt 2015-11-07 02:28:28 EST
fixed in https://github.com/openshift/origin/pull/5738
Comment 5 DeShuai Ma 2015-11-08 21:26:27 EST
This bug is fixed
[fedora@ip-172-18-12-17 sample-app]$ openshift version
openshift v1.0.8-2-g769ca7a-dirty
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2

[fedora@ip-172-18-12-17 sample-app]$ oc create -f hpa.yaml -n dma
horizontalpodautoscaler "php-apache" created
[fedora@ip-172-18-12-17 sample-app]$ oc get hpa -n dma
NAME         REFERENCE                           TARGET    CURRENT     MINPODS   MAXPODS   AGE
php-apache   DeploymentConfig/php-apache/scale   50%       <waiting>   1         10        6s
[fedora@ip-172-18-12-17 sample-app]$ oc delete project dma
project "dma" deleted
[fedora@ip-172-18-12-17 sample-app]$ oc get hpa -n dma
[fedora@ip-172-18-12-17 sample-app]$

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