Bug 1866743 - MCO API should inspect Accept Header instead of User Agent
Summary: MCO API should inspect Accept Header instead of User Agent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Machine Config Operator
Version: 4.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.6.0
Assignee: Christian Glombek
QA Contact: Michael Nguyen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-06 09:02 UTC by Christian Glombek
Modified: 2020-10-27 16:25 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:25:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 1960 0 None closed Bug 1866743: api: Detect spec version to serve from Accept header 2020-08-10 20:25:29 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:25:45 UTC

Description Christian Glombek 2020-08-06 09:02:36 UTC
Description of problem:
MCO API should inspect Accept Header instead of User Agent

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Micah Abbott 2020-08-11 20:17:48 UTC
Verified with 4.6.0-0.nightly-2020-08-11-151449

```
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-08-11-151449   True        False         35m     Cluster version is 4.6.0-0.nightly-2020-08-11-151449

$ oc get nodes
NAME                           STATUS   ROLES    AGE   VERSION
ip-10-0-147-70.ec2.internal    Ready    worker   40m   v1.19.0-rc.2+9932f63-dirty
ip-10-0-152-139.ec2.internal   Ready    master   50m   v1.19.0-rc.2+9932f63-dirty
ip-10-0-169-132.ec2.internal   Ready    worker   40m   v1.19.0-rc.2+9932f63-dirty
ip-10-0-187-236.ec2.internal   Ready    master   50m   v1.19.0-rc.2+9932f63-dirty
ip-10-0-230-245.ec2.internal   Ready    master   54m   v1.19.0-rc.2+9932f63-dirty
ip-10-0-244-45.ec2.internal    Ready    worker   40m   v1.19.0-rc.2+9932f63-dirty

$ oc debugStarting pod/ip-10-0-147-70ec2internal-debug ...                                                                                                                                                                     
To use host binaries, run `chroot /host`                                                                                                                                                                             
Pod IP: 10.0.147.70                                                                                                                                                                                                  
If you don't see a command prompt, try pressing enter.                                                                                                                                                               
sh-4.2# chroot /host                                                                                                                                                                                                 
sh-4.4# /sbin/iptables -D OPENSHIFT-BLOCK-OUTPUT 1  node/ip-10-0-147-70.ec2.internal

sh-4.4# curl -k https://api-int.ci-ln-1ly6g0k-d5d6b.origin-ci-int-aws.dev.rhcloud.com:22623/config/worker | jq .ignition.version                                                                                     
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                                                                                                                      
                                 Dload  Upload   Total   Spent    Left  Speed                                                                                                                                        
100  166k  100  166k    0     0  1790k      0 --:--:-- --:--:-- --:--:-- 1790k                                                                                                                                       
"2.2.0"                                                                                                                                                                                                              
sh-4.4# curl -H "Accept: application/vnd.coreos.ignition+json; version=2.4.0" -k https://api-int.ci-ln-1ly6g0k-d5d6b.origin-ci-int-aws.dev.rhcloud.com:22623/config/worker | jq .ignition.version                    
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                                                                                                                      
                                 Dload  Upload   Total   Spent    Left  Speed                                                                                                                                        
100  166k  100  166k    0     0  1261k      0 --:--:-- --:--:-- --:--:-- 1261k                                                                                                                                       
"2.2.0"                                                                                                                                                                                                              
sh-4.4# curl -H "Accept: application/vnd.coreos.ignition+json; version=3.1.0" -k https://api-int.ci-ln-1ly6g0k-d5d6b.origin-ci-int-aws.dev.rhcloud.com:22623/config/worker | jq .ignition.version                    
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                                                                                                                      
                                 Dload  Upload   Total   Spent    Left  Speed                                                                                                                                        
100  166k  100  166k    0     0  1766k      0 --:--:-- --:--:-- --:--:-- 1766k                                                                                                                                       
"3.1.0"                                                                                                                                                                                                              
sh-4.4# curl -H "Accept: application/vnd.coreos.ignition+json; version=2.2.0" -k https://api-int.ci-ln-1ly6g0k-d5d6b.origin-ci-int-aws.dev.rhcloud.com:22623/config/worker | jq .ignition.version
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  166k  100  166k    0     0  1699k      0 --:--:-- --:--:-- --:--:-- 1699k
"2.2.0"
sh-4.4# curl -H "Accept: application/vnd.coreos.ignition+json; version=3.2.0" -k https://api-int.ci-ln-1ly6g0k-d5d6b.origin-ci-int-aws.dev.rhcloud.com:22623/config/worker | jq .ignition.version
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  166k  100  166k    0     0  1865k      0 --:--:-- --:--:-- --:--:-- 1865k
"3.1.0"

sh-4.4# curl -I -H "Accept: application/vnd.coreos.ignition+json; version=1.0.0" -k https://api-int.ci-ln-1ly6g0k-d5d6b.origin-ci-int-aws.dev.rhcloud.com:22623/config/worker
HTTP/2 400 
content-length: 0
date: Tue, 11 Aug 2020 20:14:32 GMT

sh-4.4# curl -I -H "Accept: application/vnd.coreos.ignition+json; version=5.0.0" -k https://api-int.ci-ln-1ly6g0k-d5d6b.origin-ci-int-aws.dev.rhcloud.com:22623/config/worker
HTTP/2 400                                                                                                
content-length: 0                                
date: Tue, 11 Aug 2020 20:15:18 GMT                                                                                                                                                                                  
```

Comment 6 errata-xmlrpc 2020-10-27 16:25:22 UTC
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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196


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