oc status reporting error with hpa attempting to scale an object that doesn't exist when the object, in fact, exists and the HPA is working as intended.
Command
oc status
returns:
" * hpa/caasdemo is attempting to scale Deployment/caasdemo, which doesn't exist"
When in fact that the deployment/caasdemo does exist and the HPA is currently functioning as expected:
[root@MASTER01 ~]# oc get all 2>&1 | egrep "deploy"
deploy/caasdemo 3 3 3 3 3d
[root@MASTER01 ~]# oc describe hpa/caasdemo
Name: caasdemo
Namespace: tutorial-1-stateless
Labels: app=caasdemo
Annotations: <none>
CreationTimestamp: Mon, 29 Jan 2018 13:32:05 +0000
Reference: Deployment/caasdemo
Metrics: ( current / target )
resource cpu on pods (as a percentage of request): 0% (0) / 2%
Min replicas: 3
Max replicas: 20
Conditions:
Type Status Reason Message
---- ------ ------ -------
AbleToScale True ReadyForNewScale the last scale time was sufficiently old as to warrant a new scale
ScalingActive True ValidMetricFound the HPA was able to succesfully calculate a replica count from cpu resource utilization (percentage of request)
ScalingLimited True TooFewReplicas the desired replica count was zero
Events: <none>
Version
[root@MASTER01 ~]# oc version
oc v3.7.0+7ed6862
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://osmaster.DOMAINNAME:443
openshift v3.7.0+7ed6862
kubernetes v1.7.6+a08f5eeb62
Steps To Reproduce
- Create project 'cassdemo'
- Import deployment yaml to project with 'oc create -f'
- Import HPA yaml with 'oc create -f' which indicates Kind: deployment Name: caasdemo in the scaleTargetRef
- Give the system several minutes to pull metrics and determine the status of the HPA
- run 'oc status'
Current Result
'oc status' reports that HPA target does not exist as an error
Expected Result
'oc status' does not report that the HPA target does not exist as an error
Additional Information
'oc status' against a project with the scaleTargetRef of DeploymentConfig within the same environment does not return an error.
Also corresponding bugzilla opened: https://bugzilla.redhat.com/show_bug.cgi?id=1539876
I've been directed to: https://github.com/openshift/origin/pull/18344.
This issue can probably be closed once this makes it to release-3.7.
Thanks! --Miranda
/assign @juanvallejo /kind bug /priority P2
3.7 backport: https://github.com/openshift/origin/pull/18371
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen.
If this issue is safe to close now please do so with /close.
/lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen.
Mark the issue as fresh by commenting /remove-lifecycle rotten.
Exclude this issue from closing again by commenting /lifecycle frozen.
/close