#1149108 python-os-collect-config: FTBFS: stale oslo_config.CONF.cachedir leaks across tests

#1149108#5
Date:
2026-09-26 16:33:40 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202609/

Notes:

* The failing tests are these two:

FAIL: os_collect_config.tests.test_collect.TestConf.test_setup_conf
FAIL: os_collect_config.tests.test_ec2.TestEc2.test_collect_ec2_collected

but it may be the case that not always both of them fail.


* I can reproduce the issue on machines with 1 CPU and 2 CPUs,
but the failure rate is a lot higher (around 100%) on machines with 1 CPU.


* I asked DeepSeek V4 Flash about the reason for these failures, and
apparently the problem is that there is not enough cleanup between one test
and the next one.

It offered me the attached patch, which I tried and it seems to work.

The usual caveats apply. My recommendation is that you forward
the issue upstream to begin with. The patch may not be perfect
but the fact that it seems to work is a very good hint about
the nature of the problem.


About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:python-os-collect-config, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]

os_collect_config.tests.test_request.TestRequestSoftwareConfig.test_collect_request ... ok
{
  "tmpz7d0lrnm": {
   "localstrA": "A",
   "localint9": 9,
   "localmap_xy": {
    "x": 42,
    "y": "foo"
   }
  }
}
{}
{}

======================================================================
FAIL: os_collect_config.tests.test_collect.TestConf.test_setup_conf
os_collect_config.tests.test_collect.TestConf.test_setup_conf
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
   File "/<<PKGBUILDDIR>>/os_collect_config/tests/test_collect.py", line 558, in test_setup_conf
     self.assertEqual('/var/lib/os-collect-config', cfg.CONF.cachedir)
     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 513, in assertEqual
     self.assertThat(observed, matcher, message)
     ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 704, in assertThat
     raise mismatch_error
testtools.matchers._impl.MismatchError: '/var/lib/os-collect-config' != '/tmp/tmpk_b13l7l'
---------------------------------------------------------------------- Ran 93 tests in 1.048s FAILED (failures=1) + echo ======> STESTR TEST SUITE FAILED FOR python3.14: displaying pip3 freeze output... ======> STESTR TEST SUITE FAILED FOR python3.14: displaying pip3 freeze output... + [ -x /usr/bin/pip3 ] + pip3 freeze WARNING: The directory '/sbuild-nonexistent/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. alabaster==1.0.0 attrs==26.1.0 autocommand==2.2.2 autopage==0.6.0 babel==2.18.0 bcrypt==5.0.0 blinker==1.9.0 certifi==2026.7.22 chardet==5.2.0 charset-normalizer==3.4.7 cliff==4.16.0 cmd2==4.2.0+ds coverage==7.16.1 cryptography==49.0.0 debtcollector==3.1.0 decorator==5.3.1 defusedxml==0.7.1 deprecation==2.1.0 docutils==0.23 dogpile.cache==1.5.0 fixtures==4.3.0 flake8==7.3.0 hacking==8.1.0 idna==3.19 imagesize==2.0.1 iso8601==2.1.0 jaraco.context==6.0.1 jaraco.functools==4.1.0 Jinja2==3.1.6 jmespath==1.0.1 jsonpatch==1.33 jsonpointer==2.4 jsonschema==4.26.0 jsonschema-specifications==2025.9.1 keystoneauth1==5.17.0 linkify-it-py==2.1.0 lxml==6.1.3 Mako==1.3.10.dev0 markdown-it-py==4.2.0 MarkupSafe==3.0.3 mccabe==0.7.0 mdurl==0.1.2 more-itertools==11.1.0 msgpack==1.2.1 netaddr==1.3.0 oauthlib==3.3.1 openstacksdk==4.20.0 os-collect-config==14.0.1 os-service-types==1.9.0 osc-lib==4.7.0 oslo.config==10.7.0 oslo.context==6.5.0 oslo.i18n==6.9.0 oslo.log==8.3.2 oslo.serialization==5.11.0 oslo.utils==10.2.0 packaging==26.2 pbr==7.1.1 platformdirs==4.11.9 prettytable==3.17.0 prompt_toolkit==3.0.53 psutil==7.2.2 pycodestyle==2.14.0 pyflakes==3.4.0 Pygments==2.20.0 PyJWT==2.14.0 pyparsing==3.3.2 pyperclip==1.11.0 python-dateutil==2.9.0 python-heatclient==5.3.0 python-keystoneclient==6.0.0 python-subunit==1.4.6 python-swiftclient==4.11.0 python-zaqarclient==4.7.0 PyYAML==6.0.3 referencing==0.37.0 requests==2.34.2 rfc3986==2.0.0 rich==15.0.0 rich-argparse==1.8.0 roman-numerals==4.1.0 rpds-py==0.30.0 setuptools==84.0.0 snowballstemmer==3.1.1 Sphinx==9.1.0 stestr==4.2.1 stevedore==5.9.1 testtools==2.9.1 tomlkit==0.13.3 typing_extensions==4.16.0 uc-micro-py==2.0.0 urllib3==2.8.0 voluptuous==0.16.0 wcwidth==0.8.3 wheel==0.47.0 wrapt==2.3.0 zipp==3.23.0 + exit 1 make[1]: *** [debian/rules:22: override_dh_auto_install] Error 1 make[1]: Leaving directory '/<<PKGBUILDDIR>>' make: *** [debian/rules:7: binary] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2 --------------------------------------------------------------------------------
#1149108#10
Date:
2026-09-27 14:34:22 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-os-collect-config, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1149108@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Thomas Goirand <zigo@debian.org> (supplier of updated python-os-collect-config package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 27 Sep 2026 15:33:07 +0200
Source: python-os-collect-config
Architecture: source
Version: 14.0.1-2
Distribution: unstable
Urgency: medium
Maintainer: Debian OpenStack <team+openstack@tracker.debian.org>
Changed-By: Thomas Goirand <zigo@debian.org>
Closes: 1149108
Changes:
 python-os-collect-config (14.0.1-2) unstable; urgency=medium
 .
   * Fix FTBFS: stale oslo_config.CONF.cachedir leaks across tests
     (Closes: #1149108):
     - fix-test-isolation.patch
Checksums-Sha1:
 2b502531c986f909684539c100f0378251d85277 2506 python-os-collect-config_14.0.1-2.dsc
 f3492363e421b352f3b2ebc259b50d5218e56231 3688 python-os-collect-config_14.0.1-2.debian.tar.xz
 69e1568e253ea415eefcd701bca47ec31e5d5231 10498 python-os-collect-config_14.0.1-2_amd64.buildinfo
Checksums-Sha256:
 e54c9f7eaf193e04e618cf4388b7410c73717706270edd224e755fa3b36124e8 2506 python-os-collect-config_14.0.1-2.dsc
 c6704efe2c9685b87aff7d8b52d24a07125dd1b9f002eaca58b98fc4cb5931d5 3688 python-os-collect-config_14.0.1-2.debian.tar.xz
 cfb6e1b5b5a13b7e52ecfcc3b5ee658300faac40da2697f068905627bf059b90 10498 python-os-collect-config_14.0.1-2_amd64.buildinfo
Files:
 83d43c465d33ab54bc369bb168fc1640 2506 python optional python-os-collect-config_14.0.1-2.dsc
 a3020427d9957219d97849e44e277fdf 3688 python optional python-os-collect-config_14.0.1-2.debian.tar.xz
 ee4691ae9910270b37fdb6807f65230d 10498 python optional python-os-collect-config_14.0.1-2_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEoLGp81CJVhMOekJc1BatFaxrQ/4FAmq5HgkACgkQ1BatFaxr
Q/5/ew/+P5ylajc6KG8WmhC4hwn59eWIJUYH6KHQmLQsVZlk7M6zuF3ugZkI9whA
lI1h3j16Zhc7tfISU6PToYuH5mW6oYKvk+Hk8va9hAdpgZ/++FyV48bqJPTwbUQP
4gIWtxXx7yD2sDmexqnqxIEDwpsO68gewnoKpiVXJK4mtyZNKaKpGAtGELBHiCKT
oRgnRQ6OC7Yy0QW5yNegQJ1xp3vDM5BfuHSrtIAxFsAybTHK7hnYwcZd9owJjBZA
xx44JrZBrc3MreolmW+ud7ebIY9YDGPVEG/jsK0Rl1VyqSkk79vGKTLqMMwsIofY
jn4rTRGl8I7cQTRJNoeyGQYGr38engCQgpmOKj+kKRXpyZW0tPHJgeiHyu2tHiMj
oris7U3OWpFnkwHCBTo+BkI92PUAtHrwkwt18t+0sXMtK5WSZaSwwxr6QEHrVLRs
Z9jgbkKdX4js+V+o9LAaHsbra/06memL9qQJWT3K2iPh5f20Zav7qRDlJesF9Ces
FgkmVIL8Xl8s30nsGXSqTAjkwZzJvqI6t2cqkzSxZdKBq8N1nJCTr2mvztqqalDL
XQaewxev7ip30L6lif1c8Vws81kjs4cjKE0/qhehi+4JWo0Ow6bqSzhNGOs4gFn1
HMvn0mEhhQp2vFo8dL8MxJxE7oh3DhUlU+zYs9ngpBEZTNRqO+Y=
=4QCs
-----END PGP SIGNATURE-----