Zun

Zun Compute fails on protobuf

Bug #1982924 reported by Radosław Piliszek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Released
Undecided
Unassigned

Bug Description

The error message is:

2022-07-27 07:31:36.771 7 CRITICAL zun [-] Unhandled error: TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
2022-07-27 07:31:36.771 7 ERROR zun Traceback (most recent call last):
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/bin/zun-compute", line 8, in <module>
2022-07-27 07:31:36.771 7 ERROR zun sys.exit(main())
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/zun/cmd/compute.py", line 43, in main
2022-07-27 07:31:36.771 7 ERROR zun compute_manager.Manager(),
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/zun/compute/manager.py", line 53, in __init__
2022-07-27 07:31:36.771 7 ERROR zun self.capsule_driver = driver_module.load_capsule_driver()
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/zun/container/driver.py", line 87, in load_capsule_driver
2022-07-27 07:31:36.771 7 ERROR zun driver = stevedore_driver.DriverManager(
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/stevedore/driver.py", line 54, in __init__
2022-07-27 07:31:36.771 7 ERROR zun super(DriverManager, self).__init__(
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/stevedore/named.py", line 78, in __init__
2022-07-27 07:31:36.771 7 ERROR zun extensions = self._load_plugins(invoke_on_load,
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/stevedore/extension.py", line 233, in _load_plugins
2022-07-27 07:31:36.771 7 ERROR zun self._on_load_failure_callback(self, ep, err)
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/stevedore/extension.py", line 221, in _load_plugins
2022-07-27 07:31:36.771 7 ERROR zun ext = self._load_one_plugin(ep,
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/stevedore/named.py", line 156, in _load_one_plugin
2022-07-27 07:31:36.771 7 ERROR zun return super(NamedExtensionManager, self)._load_one_plugin(
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/stevedore/extension.py", line 255, in _load_one_plugin
2022-07-27 07:31:36.771 7 ERROR zun plugin = ep.load()
2022-07-27 07:31:36.771 7 ERROR zun File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
2022-07-27 07:31:36.771 7 ERROR zun module = import_module(match.group('module'))
2022-07-27 07:31:36.771 7 ERROR zun File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
2022-07-27 07:31:36.771 7 ERROR zun return _bootstrap._gcd_import(name[level:], package, level)
2022-07-27 07:31:36.771 7 ERROR zun File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
2022-07-27 07:31:36.771 7 ERROR zun File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
2022-07-27 07:31:36.771 7 ERROR zun File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
2022-07-27 07:31:36.771 7 ERROR zun File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
2022-07-27 07:31:36.771 7 ERROR zun File "<frozen importlib._bootstrap_external>", line 790, in exec_module
2022-07-27 07:31:36.771 7 ERROR zun File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/zun/container/cri/driver.py", line 25, in <module>
2022-07-27 07:31:36.771 7 ERROR zun from zun.criapi import api_pb2
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/zun/criapi/api_pb2.py", line 29, in <module>
2022-07-27 07:31:36.771 7 ERROR zun from zun.criapi import gogo_pb2 as zun_dot_criapi_dot_gogo__pb2
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/zun/criapi/gogo_pb2.py", line 42, in <module>
2022-07-27 07:31:36.771 7 ERROR zun goproto_enum_prefix = _descriptor.FieldDescriptor(
2022-07-27 07:31:36.771 7 ERROR zun File "/var/lib/kolla/venv/lib/python3.9/site-packages/google/protobuf/descriptor.py", line 560, in __new__
2022-07-27 07:31:36.771 7 ERROR zun _message.Message._CheckCalledFromGeneratedFile()
2022-07-27 07:31:36.771 7 ERROR zun TypeError: Descriptors cannot not be created directly.
2022-07-27 07:31:36.771 7 ERROR zun If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
2022-07-27 07:31:36.771 7 ERROR zun If you cannot immediately regenerate your protos, some other possible workarounds are:
2022-07-27 07:31:36.771 7 ERROR zun 1. Downgrade the protobuf package to 3.20.x or lower.
2022-07-27 07:31:36.771 7 ERROR zun 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
2022-07-27 07:31:36.771 7 ERROR zun
2022-07-27 07:31:36.771 7 ERROR zun More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
2022-07-27 07:31:36.771 7 ERROR zun

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/zun/+/851196

Changed in zun:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun (master)

Reviewed: https://review.opendev.org/c/openstack/zun/+/851196
Committed: https://opendev.org/openstack/zun/commit/40dd541bb1dfcaf69d058054f35c8fc1e7cee19b
Submitter: "Zuul (22348)"
Branch: master

commit 40dd541bb1dfcaf69d058054f35c8fc1e7cee19b
Author: Radosław Piliszek <email address hidden>
Date: Wed Jul 27 10:43:56 2022 +0200

    Regenerate protobuf files

    tools/gen-criapi was used with the latest protobuf dependencies
    to generate compatible files. This makes Zun Compute work again
    with the current implementation of protobuf.

    In addition, fix two issues that causes gate failure.

    Depends-On: https://review.opendev.org/c/openstack/kuryr-libnetwork/+/851549
    Closes-Bug: #1982924
    Change-Id: Id1032709f6e3b11b718b3df6a6ac3531a9c99824

Changed in zun:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/zun 10.0.0.0rc1

This issue was fixed in the openstack/zun 10.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.