Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-2921

MismatchError error in osp-rpm-py39 / OSP 18

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • ?
    • No
    • Moderate

      Hello,

      we observe a failure in RPM job executed as part of Component CI for OSP 18

      ```
      keystone.tests.unit.test_policy.GeneratePolicyFileTestCase.test_policy_generator_from_command_line
      --------------------------------------------------------------------------------------------------

      Captured traceback:
      ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):

      File "/home/zuul/src/code.engineering.redhat.com/keystone/keystone/tests/unit/test_policy.py", line 246, in test_policy_generator_from_command_line
      self.assertEqual(ret_val.returncode, 0, output)

      File "/usr/lib/python3.9/site-packages/testtools/testcase.py", line 393, in assertEqual
      self.assertThat(observed, matcher, message)

      File "/usr/lib/python3.9/site-packages/testtools/testcase.py", line 480, in assertThat
      raise mismatch_error

      testtools.matchers._impl.MismatchError: 1 != 0: (b'', b'WARNING:stevedore.named:Could not load keystone\nTraceback (most recent call last):\n File "/usr/bin/oslopolicy-policy-generator", line 10, in <module>\n sys.exit(generate_policy())\n File "/usr/lib/python3.9/site-packages/oslo_policy/generator.py", line 560, in generate_policy\n _generate_policy(conf.namespace, conf.output_file,\n File "/usr/lib/python3.9/site-packages/oslo_policy/generator.py", line 350, in _generate_policy\n enforcer = _get_enforcer(namespace)\n File "/usr/lib/python3.9/site-packages/oslo_policy/generator.py", line 108, in _get_enforcer\n raise KeyError(\'Namespace "%s" not found.\' % namespace)\nKeyError: \'Namespace "keystone" not found.\'\n')
      ```

      What we do in the job, is:
      – we fetch the spec file and install the RPM dependencies listed there,
      – we install some missing RPMs identified (that should be in spec file probably, but they are not),
      – we run the tests defined in tox.

      The additional RPMs we install are listed here:
      https://github.com/RedHatCRE/znoyder/blob/6e728306f860ed90054144fefa454d5cd90cc4d0/znoyder/config.d/43-override-OSP-18.yml#L121

      So, in essence, this is a tox job but with truncated requirement.txt and site-packages enabled.

      You can use this change for debugging the issue.
      https://code.engineering.redhat.com/gerrit/c/keystone/+/446897

      Yours,
      Szymon

              Unassigned Unassigned
              jira-bugzilla-migration RH Bugzilla Integration
              rhos-dfg-security
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: