Bug 1277891 - [clusterinfra_public_202]The hpa reference info is error when create hpa without namespace
Summary: [clusterinfra_public_202]The hpa reference info is error when create hpa with...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Solly Ross
QA Contact: Jianwei Hou
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-04 10:17 UTC by DeShuai Ma
Modified: 2015-11-23 21:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:16:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description DeShuai Ma 2015-11-04 10:17:01 UTC
Description of problem:
When create a hpa without namespace, the display info is error

Version-Release number of selected component (if applicable):
oc v1.0.7-203-geebdecd
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4

How reproducible:
Always

Steps to Reproduce:
1.Create a namespace
$ oc new-project dma1

2.Create a hpa don't specify namespace 
[fedora@ip-172-18-15-150 sample-app]$ cat hpa.yaml 
apiVersion: extensions/v1beta1
kind: HorizontalPodAutoscaler
metadata:
  name: php-apache
spec:
  maxReplicas: 10
  minReplicas: 1
  scaleRef:
    kind: DeploymentConfig
    name: php-apache
  cpuUtilization:
    targetPercentage: 10
$ oc create -f hpa.yaml -n dma1

3.Get hpa
[fedora@ip-172-18-15-150 sample-app]$ oc get hpa -n dma2
NAME         REFERENCE                       TARGET    CURRENT     MINPODS        MAXPODS   AGE
php-apache   DeploymentConfig//php-apache/   10%       <waiting>   859533528128   10        4m

Actual results:
3.The display info is "DeploymentConfig//php-apache/"

Expected results:
3.The display info should be "DeploymentConfig/dma1/php-apache/"

Additional info:

Comment 1 DeShuai Ma 2015-11-11 07:00:39 UTC
Verify this bug on the latest origin.
[fedora@ip-172-18-15-226 sample-app]$ openshift version
openshift v1.0.8-16-gd81eca7-dirty
kubernetes v1.1.0-origin-1107-g4c8e6f4
etcd 2.1.2

[fedora@ip-172-18-15-226 sample-app]$ cat hpa.yaml 
apiVersion: extensions/v1beta1
kind: HorizontalPodAutoscaler
metadata:
  name: php-apache
spec:
  scaleRef:
    kind: DeploymentConfig
    name: php-apache
    subresource: scale
  minReplicas: 1
  maxReplicas: 10
  cpuUtilization:
    targetPercentage: 50
[fedora@ip-172-18-15-226 sample-app]$ oadm new-project dma2
Created project dma2
[fedora@ip-172-18-15-226 sample-app]$ oc create -f hpa.yaml -n dma2
horizontalpodautoscaler "php-apache" created
[fedora@ip-172-18-15-226 sample-app]$ oc get hpa -n dma2
NAME         REFERENCE                           TARGET    CURRENT     MINPODS   MAXPODS   AGE
php-apache   DeploymentConfig/php-apache/scale   50%       <waiting>   1         10        6s


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