Bug 1452021
| Summary: | HPA API wrongly uses v2alpha1 rather than v1 | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Xingxing Xia <xxia> |
| Component: | Node | Assignee: | Solly Ross <sross> |
| Status: | CLOSED ERRATA | QA Contact: | Xingxing Xia <xxia> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 3.6.0 | CC: | aos-bugs, chezhang, decarr, jokerman, mmccomas, smunilla |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-10 05:24:06 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
Xingxing Xia
2017-05-18 07:45:28 UTC
apiVersion is v1 in upstream, but is v2alpha1 in OCP3.6 as below.
$ oc create -f rc-hello-hpa.yaml
replicationcontroller "hello-hpa" created
$ oc autoscale rc hello-hpa --min=2 --max=10
replicationcontroller "hello-hpa" autoscaled
$ oc get hpa
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
hello-hpa ReplicationController/hello-hpa <unknown> / 80% 2 10 0 4s
$ oc get hpa -o yaml
apiVersion: v1
items:
- apiVersion: autoscaling/v2alpha1
kind: HorizontalPodAutoscaler
metadata:
creationTimestamp: 2017-05-19T03:12:07Z
name: hello-hpa
namespace: test
resourceVersion: "2267"
selfLink: /apis/autoscaling/v2alpha1/namespaces/test/horizontalpodautoscalers/hello-hpa
uid: f0eb6de5-3c40-11e7-a2b9-0e631526fd50
spec:
maxReplicas: 10
metrics:
- resource:
name: cpu
targetAverageUtilization: 80
type: Resource
minReplicas: 2
scaleTargetRef:
apiVersion: v1
kind: ReplicationController
name: hello-hpa
status:
currentMetrics: null
currentReplicas: 0
desiredReplicas: 0
kind: List
metadata: {}
resourceVersion: ""
selfLink: ""
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/59eac282082e8547b97a414586e629a99cadc848 UPSTREAM: 45741: Fix discovery version for autoscaling to be v1 The order of the storage setup blocks in the setup for the autoscaling API group was accidentally inverted, meaning that if the v2alpha1 API group was turned on, it would be set to the preferred API group-version for discovery. This was unintentional; the latest stable version should (v1) should be preferred instead. Fixes bug 1452021 (https://bugzilla.redhat.com/show_bug.cgi?id=1452021) Verified in OCP openshift/oc v3.6.94. HPA created from CLI or web both show correct api version autoscaling/v1: $ oc get hpa -o yaml apiVersion: autoscaling/v1 (BTW, however, another issue - bug 1458663 is reported) 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/RHEA-2017:1716 |