Bug 2004380

Summary: No error is returned when creating an ARM cluster with user_managed_networking: false
Product: OpenShift Container Platform Reporter: Udi Kalifon <ukalifon>
Component: assisted-installerAssignee: Daniel Erez <derez>
assisted-installer sub component: assisted-service QA Contact: Udi Kalifon <ukalifon>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: aos-bugs, derez, yobshans
Version: 4.9Keywords: Triaged
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AI-Team-Core
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 06:24:16 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 Udi Kalifon 2021-09-15 07:25:07 UTC
Description of problem:
I created a cluster with "cpu_architecture": "arm64" and "user_managed_networking": false. The cluster was created, and set the user_managed_networking to "true" to enforce the requirement that all ARM clusters will be none-platform.

According to MGMT-7484 and PR 2502, I should have gotten an error:
"disabling User Managed Networking is not allowed for clusters with non-x86_64 CPU architecture"


Version-Release number of selected component (if applicable):
Integration environment Sep. 15th


How reproducible:
100%


Steps to Reproduce:
1. Create a cluster with "cpu_architecture": "arm64" and "user_managed_networking": false


Actual results:
No error. Cluster was created, but the user_managed_networking was "fixed" for you to "true".


Expected results:
Error

Comment 1 Daniel Erez 2021-09-30 07:37:06 UTC
Hi Udi,

Can you please attach the full request for cluster creation?

If 'high_availability_mode' was set to 'None', then it's an expected behaviour.
As it implies enabled 'user_managed_networking' (regardless of architecture):
https://github.com/openshift/assisted-service/blob/967ff04c03836a50afe36ffac7035ff7cc140181/internal/bminventory/inventory.go#L447

So when only 'user_managed_networking' is set to false, the following error should be returned:
"Non x86_64 CPU architectures are supported only with User Managed Networking"

Comment 2 Udi Kalifon 2021-10-04 08:21:03 UTC
The request body was:

{
    "base_dns_domain": "qe.lab.redhat.com",
    "cpu_architecture": "arm64",
    "feature_usage": "{\"SNO\":{\"name\":\"SNO\"}}",
    "high_availability_mode": "None",
    "kind": "Cluster",
    "name": "arm-cluster",
    "ocp_release_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.9.0-rc.4/rhcos-4.9.0-rc.4-x86_64-live.x86_64.iso",
    "openshift_version": "4.9",
    "user_managed_networking": false,
    "vip_dhcp_allocation": false,
    "pull_secret": "..."
}

If I don't specify "high_availability_mode: None", I get: "Non x86_64 CPU architectures are supported only with User Managed Networking"

I propose also returning a descriptive error when the user sets both "high_availability_mode: None" and "user_managed_networking": false. The error should indicate that these setting contradict.

Comment 5 Udi Kalifon 2021-10-20 07:07:19 UTC
Daniel, I still don't get an error when I set both "high_availability_mode: None" and "user_managed_networking: false". Do we not want to report that the two settings contradict?

Comment 8 Udi Kalifon 2021-10-27 08:40:22 UTC
No error is returned, so I'm marking this bug back as "assigned".

Comment 10 Daniel Erez 2021-11-03 09:25:50 UTC
(In reply to Udi Kalifon from comment #5)
> Daniel, I still don't get an error when I set both "high_availability_mode:
> None" and "user_managed_networking: false". Do we not want to report that
> the two settings contradict?

You should get the following error in this scenario: "User Managed Networking must be enabled on single node OpenShift"
The fix is available in integ, so moving to MODIFIED for verifying in the upcoming build.

Comment 12 Udi Kalifon 2021-11-09 11:06:31 UTC
Verified:

{
    "code": "400",
    "href": "",
    "id": 400,
    "kind": "Error",
    "reason": "Non x86_64 CPU architectures are supported only with User Managed Networking"
}

Comment 15 errata-xmlrpc 2021-11-16 06:24:16 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.9.7 bug fix update), 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-2021:4579