Bug 1788634 - Kuryr detecting Octavia version incorrectly
Summary: Kuryr detecting Octavia version incorrectly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.4.0
Assignee: Michał Dulko
QA Contact: Jon Uriarte
URL:
Whiteboard:
Depends On:
Blocks: 1788635
TreeView+ depends on / blocked
 
Reported: 2020-01-07 16:39 UTC by Luis Tomas Bolivar
Modified: 2020-05-04 11:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1788635 (view as bug list)
Environment:
Last Closed: 2020-05-04 11:23:07 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift kuryr-kubernetes pull 130 None closed Bug 1788634: Fix Octavia version detection 2020-04-17 14:34:13 UTC
Launchpad 1857023 None None None 2020-01-07 16:39:00 UTC
OpenStack gerrit 700019 None MERGED Fix Octavia version detection 2020-04-17 14:34:14 UTC
Red Hat Product Errata RHBA-2020:0581 None None None 2020-05-04 11:23:40 UTC

Description Luis Tomas Bolivar 2020-01-07 16:39:00 UTC
We're relying on keystoneauth's get_api_major_version() method to fetch Octavia API version. Seems like it's broken, at least with recent openstacksdk's:

Python 2.7.5 (default, Jun 11 2019, 14:33:56)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import openstack
>>> c = openstack.connect(cloud='envvars')
>>> c.load_balancer.get_api_major_version()
(2, 0)
>>> c.load_balancer.get_all_version_data()
{u'regionOne': {u'public': {u'load-balancer': [{'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.0', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.1', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.2', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.3', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.4', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.5', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.6', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.7', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.8', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.9', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.10', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.11', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'SUPPORTED', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.12', 'raw_status': u'SUPPORTED', 'not_before': None}, {'status': u'CURRENT', 'min_microversion': None, 'url': u'http://10.0.0.101:9876/v2', 'max_microversion': None, 'collection': None, 'next_min_version': None, 'version': '2.13', 'raw_status': u'CURRENT', 'not_before': None}]}}}

We should use get_all_version_data() instead and parse it on our own.

Comment 2 Jon Uriarte 2020-01-27 11:11:20 UTC
Verified in 4.4.0-0.nightly-2020-01-24-141203 build on top of OSP 16 RHOS_TRUNK-16.0-RHEL-8-20191224.n.0 puddle.

The OCP installer finishes successfully:

 $ oc get clusterversion
 NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
 version   4.4.0-0.nightly-2020-01-24-141203   True        False         8m21s   Cluster version is 4.4.0-0.nightly-2020-01-24-141203

Now octavia version is detected from tags, instead of the load balancer description, which means the correct octavia version is
detected by kuryr-controller and tags are being used instead of the description when they are supported in OSP.

$ openstack loadbalancer show ostest-6zrpb-kuryr-api-loadbalancer
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| admin_state_up      | True                                 |
| created_at          | 2020-01-27T10:04:07                  |
| description         |                                      |
| flavor_id           | None                                 |
| id                  | 28844b85-cceb-4154-9adb-a9af8bb04f16 |
| listeners           | 3dc2763f-ac5f-4b67-9235-e6a497ebef25 |
| name                | ostest-6zrpb-kuryr-api-loadbalancer  |
| operating_status    | DEGRADED                             |
| pools               | 39138a8b-6892-4005-b495-43e40892d1ec |
| project_id          | 968cd882ee5145d4a3e30b9612b0cae0     |
| provider            | amphora                              |
| provisioning_status | ACTIVE                               |
| updated_at          | 2020-01-27T10:08:34                  |
| vip_address         | 172.30.0.1                           |
| vip_network_id      | 231907e2-57dd-462f-8922-dc10f664d108 |
| vip_port_id         | 75ed8aba-3c13-4747-a042-80f19962bf81 |
| vip_qos_policy_id   | None                                 |
| vip_subnet_id       | bc02b7dd-2174-43dc-a89d-5be631251dde |
+---------------------+--------------------------------------+

Description field does not contain tags any more.

Comment 4 errata-xmlrpc 2020-05-04 11:23:07 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, 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:0581


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