Description of problem: A response from POST /add_hosts_clusters endpoint returns host_networks and hosts as null which is not consistent with POST /clusters which always returns an array. UI uses default function parameters to initialize hosts as [] but this fails due to hosts being set to null. According to swagger a response from POST /add_hosts_clusters is either undefined or Host array. Current POST /add_hosts_clusters response: { "api_vip_dns_name": "api.jtomasek.redhat.com", "controller_logs_collected_at": "0001-01-01T00:00:00.000Z", "controller_logs_started_at": "0001-01-01T00:00:00.000Z", "created_at": "2021-03-24T15:50:04.034Z", "email_domain": "redhat.com", "host_networks": null, "hosts": null, "href": "/api/assisted-install/v1/clusters/bfb5dc2b-a007-4908-9837-c84cd916e2dc", "id": "bfb5dc2b-a007-4908-9837-c84cd916e2dc", "image_info": { "created_at": "0001-01-01T00:00:00.000Z", "expires_at": "0001-01-01T00:00:00.000Z" }, "install_completed_at": "2000-01-01T00:00:00.000Z", "install_started_at": "2000-01-01T00:00:00.000Z", "kind": "AddHostsCluster", "name": "scale-up-bfb5dc2b-a007-4908-9837-c84cd916e2dc", "openshift_version": "4.7", "org_id": "10920204", "progress": { "progress_updated_at": "0001-01-01T00:00:00.000Z" }, "status": "adding-hosts", "status_info": "cluster is adding hosts to existing OCP cluster", "status_updated_at": "2021-03-24T15:50:04.019Z", "updated_at": "2021-03-24T15:50:04.034Z", "user_name": "jtomasek" } Expected POST /add_hosts_clusters response: { "api_vip_dns_name": "api.jtomasek.redhat.com", "controller_logs_collected_at": "0001-01-01T00:00:00.000Z", "controller_logs_started_at": "0001-01-01T00:00:00.000Z", "created_at": "2021-03-24T15:50:04.034Z", "email_domain": "redhat.com", "host_networks": [], "hosts": [], "href": "/api/assisted-install/v1/clusters/bfb5dc2b-a007-4908-9837-c84cd916e2dc", "id": "bfb5dc2b-a007-4908-9837-c84cd916e2dc", "image_info": { "created_at": "0001-01-01T00:00:00.000Z", "expires_at": "0001-01-01T00:00:00.000Z" }, "install_completed_at": "2000-01-01T00:00:00.000Z", "install_started_at": "2000-01-01T00:00:00.000Z", "kind": "AddHostsCluster", "name": "scale-up-bfb5dc2b-a007-4908-9837-c84cd916e2dc", "openshift_version": "4.7", "org_id": "10920204", "progress": { "progress_updated_at": "0001-01-01T00:00:00.000Z" }, "status": "adding-hosts", "status_info": "cluster is adding hosts to existing OCP cluster", "status_updated_at": "2021-03-24T15:50:04.019Z", "updated_at": "2021-03-24T15:50:04.034Z", "user_name": "jtomasek" } UI can fix this by avoiding using default parameters to initialize hosts as [] but it would be better to align the API endpoints response.
UI bug: https://bugzilla.redhat.com/show_bug.cgi?id=1938357
Verified on stage environment, assisted service: v1.0.18.1
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.7.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:1149