Bug 1866743

Summary: MCO API should inspect Accept Header instead of User Agent
Product: OpenShift Container Platform Reporter: Christian Glombek <cglombek>
Component: Machine Config OperatorAssignee: Christian Glombek <cglombek>
Status: CLOSED ERRATA QA Contact: Michael Nguyen <mnguyen>
Severity: high Docs Contact:
Priority: high    
Version: 4.6CC: miabbott
Target Milestone: ---   
Target Release: 4.6.0   
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: 2020-10-27 16:25:22 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 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