[Bug 1996181] Re: FTBFS with gnocchiclient json vs ujson conflict

Launchpad Bug Tracker 1996181 at bugs.launchpad.net
Fri Nov 11 16:33:57 UTC 2022


This bug was fixed in the package rally-openstack - 2.2.0-2ubuntu1

---------------
rally-openstack (2.2.0-2ubuntu1) lunar; urgency=medium

  * d/rules: plugin loading workaround, to fix "test_plugins_loaded"
  * d/p/fix-ftbfs-gnocchiclient-ujson.patch: Fix FTBFS (LP: #1996181)

 -- Lukas Märdian <slyon at ubuntu.com>  Thu, 10 Nov 2022 14:07:28 +0100

** Changed in: rally-openstack (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-gnocchiclient in Ubuntu.
https://bugs.launchpad.net/bugs/1996181

Title:
  FTBFS with gnocchiclient json vs ujson conflict

Status in python-gnocchiclient package in Ubuntu:
  New
Status in rally-openstack package in Ubuntu:
  Fix Released

Bug description:
  rally-openstack FTBFS (fails some tests) when Ubuntu's
  python3-gnocchiclient package is installed. gnocchiclient contains a
  patch/delta vs Debian, which switches from the "ujson" module to the
  "json" module, for MIR reasons, which leads to this issue.

  =================================== FAILURES ===================================
  __________________ PluginsLoadingTestCase.test_plugins_loaded __________________
  'NoneType' object is not iterable

  During handling of the above exception, another exception occurred:
  NOTE: Incompatible Exception Representation, displaying natively:

  testtools.testresult.real._StringException: Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/tests/unit/test_plugins.py", line 23, in test_plugins_loaded
      subprocess.check_output(
    File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "/usr/lib/python3.10/subprocess.py", line 524, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['rally', '--debug', 'plugin', 'show', 'Dummy.openstack']' returned non-zero exit status 211.

  ----------------------------- Captured stderr call -----------------------------
  2022-04-14 07:50:53.163 13561 RALLYDEBUG rally.api [-] INFO logs from urllib3 and requests module are hide.
  2022-04-14 07:50:53.163 13561 RALLYDEBUG rally.api [-] urllib3 insecure warnings are hidden.
  2022-04-14 07:50:53.163 13561 RALLYDEBUG rally.api [-] ERROR log from boto module is hide.
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover [-] 	 Failed to load plugins from module 'rally_openstack' (package: 'rally-openstack 2.2.0'): pkg_resources.DistributionNotFound: The 'json' distribution was not found and is required by gnocchiclient
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover Traceback (most recent call last):
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover   File "/usr/lib/python3/dist-packages/rally/common/plugin/discover.py", line 104, in import_modules_by_entry_point
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover     m = ep.load()
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2464, in load
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover     self.require(*args, **kwargs)
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2487, in require
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover     items = working_set.resolve(reqs, env, installer, extras=self.extras)
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover   File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 777, in resolve
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover     raise DistributionNotFound(req, requirers)
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover pkg_resources.DistributionNotFound: The 'json' distribution was not found and is required by gnocchiclient
  2022-04-14 07:50:53.307 13561 ERROR rally.common.plugin.discover 
  ___________________ TaskSampleTestCase.test_schema_is_valid ____________________
  'NoneType' object is not iterable

  During handling of the above exception, another exception occurred:
  NOTE: Incompatible Exception Representation, displaying natively:

  testtools.testresult.real._StringException: Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/tests/unit/doc/test_task_samples.py", line 93, in test_schema_is_valid
      eng.validate(only_syntax=True)
    File "/usr/lib/python3/dist-packages/rally/common/logging.py", line 248, in wrapper
      result = f(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 395, in validate
      self._validate_config_syntax(self.config)
    File "/usr/lib/python3/dist-packages/rally/common/logging.py", line 248, in wrapper
      result = f(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 339, in _validate_config_syntax
      self._validate_workload(workload, vtype="syntax")
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 262, in _validate_workload
      raise exceptions.InvalidTaskConfig(
  rally.exceptions.InvalidTaskConfig: Input task is invalid!

  Subtask Dummy.openstack[0] has wrong configuration
  Subtask configuration:
  {"version": 2, "title": "A cropped version of a bigger task.", "description": "Auto-generated task from a single workload", "subtasks": [{"title": "Dummy.openstack", "description": "", "scenario": {"Dummy.openstack": {"sleep": 0.1}}, "contexts": {"quotas": {"manila": {"shares": -1, "gigabytes": -1, "share_networks": -1}}, "users": {"tenants": 1, "users_per_tenant": 1}, "manila_share_networks": {"use_share_networks": true}, "manila_shares": {"shares_per_tenant": 1, "share_proto": "NFS", "size": 1, "share_type": "dhss_true"}}, "runner": {"constant": {"times": 4, "concurrency": 2}}, "hooks": [], "sla": {"failure_rate": {"max": 0}}}]}

  Reason(s):
   There is no Scenario plugin `Dummy.openstack` in any platform.

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/tests/unit/doc/test_task_samples.py", line 96, in test_schema_is_valid
      self.fail("Invalid task file: %s" % path)
    File "/usr/lib/python3.10/unittest/case.py", line 675, in fail
      raise self.failureException(msg)
  AssertionError: Invalid task file: /<<PKGBUILDDIR>>/samples/tasks/contexts/manila-shares.json

  ----------------------------- Captured stdout call -----------------------------
  Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/tests/unit/doc/test_task_samples.py", line 93, in test_schema_is_valid
      eng.validate(only_syntax=True)
    File "/usr/lib/python3/dist-packages/rally/common/logging.py", line 248, in wrapper
      result = f(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 395, in validate
      self._validate_config_syntax(self.config)
    File "/usr/lib/python3/dist-packages/rally/common/logging.py", line 248, in wrapper
      result = f(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 339, in _validate_config_syntax
      self._validate_workload(workload, vtype="syntax")
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 262, in _validate_workload
      raise exceptions.InvalidTaskConfig(
  rally.exceptions.InvalidTaskConfig: Input task is invalid!

  Subtask Dummy.openstack[0] has wrong configuration
  Subtask configuration:
  {"version": 2, "title": "A cropped version of a bigger task.", "description": "Auto-generated task from a single workload", "subtasks": [{"title": "Dummy.openstack", "description": "", "scenario": {"Dummy.openstack": {"sleep": 0.1}}, "contexts": {"quotas": {"manila": {"shares": -1, "gigabytes": -1, "share_networks": -1}}, "users": {"tenants": 1, "users_per_tenant": 1}, "manila_share_networks": {"use_share_networks": true}, "manila_shares": {"shares_per_tenant": 1, "share_proto": "NFS", "size": 1, "share_type": "dhss_true"}}, "runner": {"constant": {"times": 4, "concurrency": 2}}, "hooks": [], "sla": {"failure_rate": {"max": 0}}}]}

  Reason(s):
   There is no Scenario plugin `Dummy.openstack` in any platform.

  ----------------------------- Captured stderr call -----------------------------
  2022-04-14 07:51:03.086 13560 INFO rally.task.engine [-] Task <MagicMock name='mock.__getitem__()' id='139823253283136'> | Starting:  Task validation.
  2022-04-14 07:51:03.086 13560 INFO rally.task.engine [-] Task <MagicMock name='mock.__getitem__()' id='139823253283136'> | Starting:  Task validation of syntax.
  ____________________ RallyJobsTestCase.test_schema_is_valid ____________________
  'NoneType' object is not iterable

  During handling of the above exception, another exception occurred:
  NOTE: Incompatible Exception Representation, displaying natively:

  testtools.testresult.real._StringException: Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/tests/unit/rally_jobs/test_jobs.py", line 87, in test_schema_is_valid
      eng.validate(only_syntax=True)
    File "/usr/lib/python3/dist-packages/rally/common/logging.py", line 248, in wrapper
      result = f(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 395, in validate
      self._validate_config_syntax(self.config)
    File "/usr/lib/python3/dist-packages/rally/common/logging.py", line 248, in wrapper
      result = f(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 339, in _validate_config_syntax
      self._validate_workload(workload, vtype="syntax")
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 262, in _validate_workload
      raise exceptions.InvalidTaskConfig(
  rally.exceptions.InvalidTaskConfig: Input task is invalid!

  Subtask Dummy.openstack[0] has wrong configuration
  Subtask configuration:
  {"version": 2, "title": "A cropped version of a bigger task.", "description": "Auto-generated task from a single workload", "subtasks": [{"title": "Dummy.openstack", "description": "", "scenario": {"Dummy.openstack": {}}, "contexts": {"users": {"tenants": 1, "users_per_tenant": 1}, "quotas": {"manila": {"shares": -1, "gigabytes": -1, "snapshots": -1, "snapshot_gigabytes": -1, "share_networks": -1}}}, "runner": {"constant": {"times": 1, "concurrency": 1}}, "hooks": [], "sla": {"failure_rate": {"max": 0}}}]}

  Reason(s):
   There is no Scenario plugin `Dummy.openstack` in any platform.

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/tests/unit/rally_jobs/test_jobs.py", line 90, in test_schema_is_valid
      self.fail("Wrong task input file: %s" % full_path)
    File "/usr/lib/python3.10/unittest/case.py", line 675, in fail
      raise self.failureException(msg)
  AssertionError: Wrong task input file: /<<PKGBUILDDIR>>/rally_openstack/../rally-jobs/manila-no-ss.yaml

  ----------------------------- Captured stdout call -----------------------------
  Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/tests/unit/rally_jobs/test_jobs.py", line 87, in test_schema_is_valid
      eng.validate(only_syntax=True)
    File "/usr/lib/python3/dist-packages/rally/common/logging.py", line 248, in wrapper
      result = f(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 395, in validate
      self._validate_config_syntax(self.config)
    File "/usr/lib/python3/dist-packages/rally/common/logging.py", line 248, in wrapper
      result = f(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 339, in _validate_config_syntax
      self._validate_workload(workload, vtype="syntax")
    File "/usr/lib/python3/dist-packages/rally/task/engine.py", line 262, in _validate_workload
      raise exceptions.InvalidTaskConfig(
  rally.exceptions.InvalidTaskConfig: Input task is invalid!

  Subtask Dummy.openstack[0] has wrong configuration
  Subtask configuration:
  {"version": 2, "title": "A cropped version of a bigger task.", "description": "Auto-generated task from a single workload", "subtasks": [{"title": "Dummy.openstack", "description": "", "scenario": {"Dummy.openstack": {}}, "contexts": {"users": {"tenants": 1, "users_per_tenant": 1}, "quotas": {"manila": {"shares": -1, "gigabytes": -1, "snapshots": -1, "snapshot_gigabytes": -1, "share_networks": -1}}}, "runner": {"constant": {"times": 1, "concurrency": 1}}, "hooks": [], "sla": {"failure_rate": {"max": 0}}}]}

  Reason(s):
   There is no Scenario plugin `Dummy.openstack` in any platform.

  [...]
  ------------------------------ Captured log call -------------------------------
  INFO     rally.common.plugin.discover:logging.py:99 Loading plugins from directories /<<PKGBUILDDIR>>/rally_openstack/../rally-jobs/plugins/*
  INFO     rally.common.plugin.discover:logging.py:99 	Loading plugins from file /<<PKGBUILDDIR>>/rally_openstack/../rally-jobs/plugins/__init__.py
  INFO     rally.common.plugin.discover:logging.py:99 	 Loaded module with plugins: __init__
  INFO     rally.common.plugin.discover:logging.py:99 	Loading plugins from file /<<PKGBUILDDIR>>/rally_openstack/../rally-jobs/plugins/rally_profile.py
  INFO     rally.common.plugin.discover:logging.py:99 	 Loaded module with plugins: rally_profile
  INFO     rally.common.plugin.discover:logging.py:99 	Loading plugins from file /<<PKGBUILDDIR>>/rally_openstack/../rally-jobs/plugins/fake_plugin.py
  INFO     rally.common.plugin.discover:logging.py:99 	 Loaded module with plugins: fake_plugin
  INFO     rally.common.plugin.discover:logging.py:99 	Loading plugins from file /<<PKGBUILDDIR>>/rally_openstack/../rally-jobs/plugins/test_relative_import/__init__.py
  INFO     rally.common.plugin.discover:logging.py:99 	 Loaded module with plugins: __init__
  INFO     rally.common.plugin.discover:logging.py:99 	Loading plugins from file /<<PKGBUILDDIR>>/rally_openstack/../rally-jobs/plugins/test_relative_import/zzz.py
  INFO     rally.common.plugin.discover:logging.py:99 	 Loaded module with plugins: zzz
  =========================== short test summary info ============================
  FAILED tests/unit/test_plugins.py::PluginsLoadingTestCase::test_plugins_loaded
  FAILED tests/unit/doc/test_task_samples.py::TaskSampleTestCase::test_schema_is_valid
  FAILED tests/unit/rally_jobs/test_jobs.py::RallyJobsTestCase::test_schema_is_valid
  ======================= 3 failed, 2178 passed in 30.08s ========================
  make[1]: *** [debian/rules:27: override_dh_auto_install] Error 1
  make[1]: Leaving directory '/<<PKGBUILDDIR>>'
  make: *** [debian/rules:6: binary] Error 2
  dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-gnocchiclient/+bug/1996181/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list