Source: python-proton-core
Version: 0.7.0-1
Severity: important
Justification: fails autopkgtest on Debian CI infrastructure
Tags: forky sid
User: [email protected]
Usertags: lxc

Hi,

Debian CI is switching away from lxc containers in favor of incus Containers.
This is motivated by security concerns from us; incus is based on lxc, but
orchestrates containers substantially different: containers are not privileged
(so root in the container is not uid 0 outside of it), and incus imposes a
stricter isolation from the host system).

python-proton-core passes its tests under lxc, but fails under incus.
The relevant part of the failure is (hopefully):

> ^^^^^^^^^^^^^^^^^^^^^^
> /usr/lib/python3/dist-packages/proton/utils/metaclasses.py:25: in __call__
> cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> /usr/lib/python3/dist-packages/proton/utils/environment.py:38: in __init__
> self._setup_as_regular_user()
> /usr/lib/python3/dist-packages/proton/utils/environment.py:78: in 
> _setup_as_regular_user
> config_home, cache_home, runtime_dir = self._get_dir_paths()
> ^^^^^^^^^^^^^^^^^^^^^
> /usr/lib/python3/dist-packages/proton/utils/environment.py:91: in 
> _get_dir_paths
> runtime_dir = BaseDirectory.get_runtime_dir()
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> /usr/lib/python3/dist-packages/xdg/BaseDirectory.py:141: in get_runtime_dir
> return os.environ['XDG_RUNTIME_DIR']
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = environ({'MAIL': '/var/mail/test', 'USER': 'test', 
> 'PYBUILD_AUTOPKGTEST': '1', 'no_proxy': 'localhost', 'CCACHE_DIR': ... 
> 'PYTEST_VERSION': '9.1.1', 'PYTEST_CURRENT_TEST': 
> 'tests/test_api.py::TestModulus::test_modulus_verification (call)'})
> key = 'XDG_RUNTIME_DIR'
> 
> >   ???
> E   KeyError: 'XDG_RUNTIME_DIR'
> 
> <frozen os>:717: KeyError
> _ 
> test_raises_exception_when_creating_new_product_class_and_not_setting_product_class_property
>  _
> 
> def 
> test_raises_exception_when_creating_new_product_class_and_not_setting_product_class_property():
> class MockEnv(ProductExecutionEnvironment):
> ...
> 
> with pytest.raises(RuntimeError):
> >           MockEnv()
> 
> tests/test_environment.py:72: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/proton/utils/metaclasses.py:25: in __call__
> cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> /usr/lib/python3/dist-packages/proton/utils/environment.py:116: in __init__
> super().__init__()
> /usr/lib/python3/dist-packages/proton/utils/environment.py:38: in __init__
> self._setup_as_regular_user()
> /usr/lib/python3/dist-packages/proton/utils/environment.py:78: in 
> _setup_as_regular_user
> config_home, cache_home, runtime_dir = self._get_dir_paths()
> ^^^^^^^^^^^^^^^^^^^^^
> /usr/lib/python3/dist-packages/proton/utils/environment.py:91: in 
> _get_dir_paths
> runtime_dir = BaseDirectory.get_runtime_dir()
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> strict = True
> 
> def get_runtime_dir(strict=True):
> """Returns the value of $XDG_RUNTIME_DIR, a directory path.
> 
> This directory is intended for 'user-specific non-essential runtime files
> and other file objects (such as sockets, named pipes, ...)', and
> 'communication and synchronization purposes'.
> 
> As of late 2012, only quite new systems set $XDG_RUNTIME_DIR. If it is not
> set, with ``strict=True`` (the default), a KeyError is raised. With


The full autokpgtest logs are available at:
https://ci.debian.net/experiments/8/regressions/
(please beware of pagination)

Common types of failure and suggested fixes are being documented at:
https://wiki.debian.org/ContinuousIntegration/LxcToIncus

Note that for the time being, python-proton-core is still being tested under 
lxc to
avoid disturbing its testing migration test results.

If you decide to add the `isolation-machine` restriction to get this package
tested under qemu, please mention that explicitly when closing this bug (it's
fine to do that only in the package changelog entry that closes the bug) so
that we can configure your package for qemu on ci.debian.net.

Attachment: signature.asc
Description: PGP signature

Reply via email to