Bug 1910067 - UPI: openstacksdk fails on "server group list"
Summary: UPI: openstacksdk fails on "server group list"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.8.0
Assignee: Pierre Prinetti
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-22 14:33 UTC by Pierre Prinetti
Modified: 2021-07-27 22:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Dealing with soft-anti-affinity requires the client to set a minimum Nova microversion; most versions of the Ansible os_server module does not do that automatically. Consequence: "soft-anti-affinity" commands are likely to fail. Fix: use python-openstackclient to set a Nova microversion when dealing with soft-anti-affinity Result: No more errors when listing, creating, deleting server groups with soft-anti-affinity policy
Clone Of:
Environment:
Last Closed: 2021-07-27 22:35:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 4375 0 None open Bug 1910067: openstack UPI: Set the API microversion when operating openstack server groups 2021-02-17 16:20:36 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:36:03 UTC

Description Pierre Prinetti 2020-12-22 14:33:52 UTC
Originally reported by https://github.com/gyohuangxin on https://github.com/openshift/installer/issues/4374

---

UPI on Openstack Stein (api version: 2.72)

If it's the second time to do Openstack UPI on an Openstack which OS_COMPUTE_API_VERSION=2.72, server group error will occur as below.

```
The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-ecc9a588-fe38-4ac2-89da-88ccd48bb045)
```

Failed to re-run `openstack server group list -f json -c ID -c Name`, because the previous record has the key policies. Hence, we used `openstack --os-compute-api-version=2.15 server group list -f json -c ID -c Name`.

Comment 2 weiwei jiang 2021-02-24 10:48:34 UTC
Moved to verified with the patch.

02-24 16:52:05  TASK [List the Server groups] **************************************************
02-24 16:52:05  task path: /home/jenkins/ws/workspace/ocp-common/Flexy-install/flexy/private-templates/functionality-testing/aos-4_8/hosts/upi_on_openstack-scripts/04_control-plane.yaml:46
02-24 16:52:05  <localhost> ESTABLISH LOCAL CONNECTION FOR USER: default
02-24 16:52:05  <localhost> EXEC /bin/sh -c 'echo ~default && sleep 0'
02-24 16:52:05  <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/jenkins/.ansible/tmp `"&& mkdir "` echo /home/jenkins/.ansible/tmp/ansible-tmp-1614156725.7144482-3128-127435114165892 `" && echo ansible-tmp-1614156725.7144482-3128-127435114165892="` echo /home/jenkins/.ansible/tmp/ansible-tmp-1614156725.7144482-3128-127435114165892 `" ) && sleep 0'
02-24 16:52:05  Using module file /home/jenkins/venv/lib64/python3.6/site-packages/ansible/modules/commands/command.py
02-24 16:52:05  <localhost> PUT /home/jenkins/.ansible/tmp/ansible-local-29282etj4dkz/tmp5gutlacm TO /home/jenkins/.ansible/tmp/ansible-tmp-1614156725.7144482-3128-127435114165892/AnsiballZ_command.py
02-24 16:52:05  <localhost> EXEC /bin/sh -c 'chmod u+x /home/jenkins/.ansible/tmp/ansible-tmp-1614156725.7144482-3128-127435114165892/ /home/jenkins/.ansible/tmp/ansible-tmp-1614156725.7144482-3128-127435114165892/AnsiballZ_command.py && sleep 0'
02-24 16:52:05  <localhost> EXEC /bin/sh -c '/home/jenkins/venv/bin/python3 /home/jenkins/.ansible/tmp/ansible-tmp-1614156725.7144482-3128-127435114165892/AnsiballZ_command.py && sleep 0'

02-24 16:52:09  <localhost> EXEC /bin/sh -c 'rm -f -r /home/jenkins/.ansible/tmp/ansible-tmp-1614156725.7144482-3128-127435114165892/ > /dev/null 2>&1 && sleep 0'
02-24 16:52:09  changed: [localhost] => {
02-24 16:52:09      "changed": true,
02-24 16:52:09      "cmd": [
02-24 16:52:09          "openstack",
02-24 16:52:09          "--os-compute-api-version=2.15",
02-24 16:52:09          "server",
02-24 16:52:09          "group",
02-24 16:52:09          "list",
02-24 16:52:09          "-f",
02-24 16:52:09          "json",
02-24 16:52:09          "-c",
02-24 16:52:09          "ID",
02-24 16:52:09          "-c",
02-24 16:52:09          "Name"
02-24 16:52:09      ],
02-24 16:52:09      "delta": "0:00:02.936827",
02-24 16:52:09      "end": "2021-02-24 08:52:09.018152",
02-24 16:52:09      "invocation": {
02-24 16:52:09          "module_args": {
02-24 16:52:09              "_raw_params": "openstack --os-compute-api-version=2.15 server group list -f json -c ID -c Name",
02-24 16:52:09              "_uses_shell": false,
02-24 16:52:09              "argv": null,
02-24 16:52:09              "chdir": null,
02-24 16:52:09              "creates": null,
02-24 16:52:09              "executable": null,
02-24 16:52:09              "removes": null,
02-24 16:52:09              "stdin": null,
02-24 16:52:09              "stdin_add_newline": true,
02-24 16:52:09              "strip_empty_ends": true,
02-24 16:52:09              "warn": true
02-24 16:52:09          }
02-24 16:52:09      },
02-24 16:52:09      "rc": 0,
02-24 16:52:09      "start": "2021-02-24 08:52:06.081325",
02-24 16:52:09      "stderr": "",
02-24 16:52:09      "stderr_lines": [],
02-24 16:52:09      "stdout": "[\n  {\n    \"ID\": \"0d1f9449-af50-4cf5-b8a6-08dd51fca1c5\",\n    \"Name\": \"zhsunbug\"\n  },\n  {\n    \"ID\": \"be8d24b8-2424-448f-9c6d-463d3d34042d\",\n    \"Name\": \"jawed-dc-jkb4t-master\"\n  },\n  {\n    \"ID\": \"9ee9547e-7255-4273-a0a9-256b8cc0ad5b\",\n    \"Name\": \"qeci-15041-bjqrh-master\"\n  },\n  {\n    \"ID\": \"def36b97-435f-4bda-adf3-37b3abd64eb0\",\n    \"Name\": \"qeci-15071-chpn4-master\"\n  },\n  {\n    \"ID\": \"8277e086-db46-4004-a1ff-a9d7a2ace584\",\n    \"Name\": \"qeci-15104-dt4sp-master\"\n  },\n  {\n    \"ID\": \"f16d788d-38a5-46d0-b974-9a5d0668aed4\",\n    \"Name\": \"amitppsi1-9vfjb-master\"\n  },\n  {\n    \"ID\": \"b80cbe99-9d96-46d6-bdc9-819b1372dee8\",\n    \"Name\": \"ugd0508533114-lhjsf-master\"\n  },\n  {\n    \"ID\": \"b98da2ba-e182-4b63-bfb4-ada0f6cd40bb\",\n    \"Name\": \"ugd-11386-qd6rf-master\"\n  },\n  {\n    \"ID\": \"c8807ea6-4452-46c3-bf44-8c7933234e15\",\n    \"Name\": \"wj47ios219ap-48qsl-master\"\n  },\n  {\n    \"ID\": \"87bfa52f-0579-4bd4-865e-6e9b459689c1\",\n    \"Name\": \"ugd-11794-d7mtt-master\"\n  },\n  {\n    \"ID\": \"d2e2fd95-01ad-4fba-8da7-07a7d13f627f\",\n    \"Name\": \"amit7psi-v7jf5-master\"\n  },\n  {\n    \"ID\": \"8ece0415-5805-49ca-9315-cc89e64948d3\",\n    \"Name\": \"amit2psi-jlwj5-master\"\n  },\n  {\n    \"ID\": \"d8536077-c013-4669-bca9-d1bcefc79387\",\n    \"Name\": \"qeci-16531-bfvph-master\"\n  },\n  {\n    \"ID\": \"78826ee2-68e7-460c-b8ec-5bbe5b016844\",\n    \"Name\": \"qeci-16543-2qllv-master\"\n  },\n  {\n    \"ID\": \"63b7c509-8816-4d3c-83d7-50b15e4888e6\",\n    \"Name\": \"qeci-16547-mxnf5-master\"\n  },\n  {\n    \"ID\": \"4b46c673-aef1-4d68-a6cb-7d137f29850c\",\n    \"Name\": \"qeci-16550-dl67l-master\"\n  },\n  {\n    \"ID\": \"9fe8774b-40da-4edc-8f23-5bc686f7b93a\",\n    \"Name\": \"kewang2471-79gfd-master\"\n  },\n  {\n    \"ID\": \"b9837058-32f0-4933-9baf-39e8af763bcb\",\n    \"Name\": \"wduan-0224a-7stv8-master\"\n  },\n  {\n    \"ID\": \"4e2f4e4d-5f42-49ed-87e6-9500eac621e4\",\n    \"Name\": \"qeci-16554-62cwc-master\"\n  },\n  {\n    \"ID\": \"1e94cb9d-98a9-4a45-9f7a-5af657f9e972\",\n    \"Name\": \"wduan-0224b-nvx72-master\"\n  },\n  {\n    \"ID\": \"5781823a-b4cb-4fd6-acee-c571af829d1b\",\n    \"Name\": \"yapei24-kj4gb-master\"\n  },\n  {\n    \"ID\": \"3499f1da-25f1-402d-b3de-ce966ad0dffa\",\n    \"Name\": \"qeci-16573-twxmb-master\"\n  }\n]",

Comment 6 errata-xmlrpc 2021-07-27 22:35:34 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security 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/RHSA-2021:2438


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