origin icon indicating copy to clipboard operation
origin copied to clipboard

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.

Open mshutt opened this issue 8 years ago • 6 comments

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
  1. Create project 'cassdemo'
  2. Import deployment yaml to project with 'oc create -f'
  3. Import HPA yaml with 'oc create -f' which indicates Kind: deployment Name: caasdemo in the scaleTargetRef
  4. Give the system several minutes to pull metrics and determine the status of the HPA
  5. 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

mshutt avatar Jan 29 '18 18:01 mshutt

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

mshutt avatar Jan 30 '18 14:01 mshutt

/assign @juanvallejo /kind bug /priority P2

jwforres avatar Jan 30 '18 18:01 jwforres

3.7 backport: https://github.com/openshift/origin/pull/18371

juanvallejo avatar Jan 31 '18 15:01 juanvallejo

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

openshift-bot avatar May 01 '18 17:05 openshift-bot

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

openshift-bot avatar May 31 '18 18:05 openshift-bot

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

openshift-bot avatar Jun 30 '18 18:06 openshift-bot