[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1057548: cloud-init: FTBFS: failing tests



Package: src:cloud-init
Version: 23.3.1-1
Severity: serious
Tags: ftbfs

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

--------------------------------------------------------------------------------
[...]
 debian/rules build
py3versions: no X-Python3-Version in control file, using supported versions
dh build --with python3 --buildsystem pybuild
   dh_update_autotools_config -O--buildsystem=pybuild
   dh_autoreconf -O--buildsystem=pybuild
   dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:310: python3.12 setup.py config
/<<PKGBUILDDIR>>/setup.py:184: SyntaxWarning: invalid escape sequence '\o'
  if cpe_data[1] == "\o":  # noqa: W605
/<<PKGBUILDDIR>>/tools/read-dependencies:46: SyntaxWarning: invalid escape sequence '\.'
  """
running config
I: pybuild base:310: python3.11 setup.py config
running config

[... snipped ...]

            ) from e
E           RuntimeError: Unable to lock user account 'foo_user'. No tools available.   Tried: ['passwd', 'usermod'].

cloudinit/distros/__init__.py:756: RuntimeError
----------------------------- Captured stdout call -----------------------------
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
DEBUG: Adding user foo_user
DEBUG: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,058 - __init__.py[DEBUG]: Adding user foo_user
------------------------------ Captured log call -------------------------------
2023-12-05 16:31:25 DEBUG     cloudinit.distros:__init__.py:616 Adding user foo_user
_____ TestCreateUser.test_create_user_with_ssh_redirect_user_no_cloud_keys _____

self = <abc.DummyConcreteDistro object at 0x7f73f042ca40>, name = 'foo_user'

    def lock_passwd(self, name):
        """
        Lock the password of a user, i.e., disable password logins
        """
        # passwd must use short '-l' due to SLES11 lacking long form '--lock'
        lock_tools = (["passwd", "-l", name], ["usermod", "--lock", name])
        try:
          cmd = next(tool for tool in lock_tools if subp.which(tool[0]))
E           StopIteration

cloudinit/distros/__init__.py:754: StopIteration

The above exception was the direct cause of the following exception:

self = <tests.unittests.distros.test_create_users.TestCreateUser object at 0x7f73f2f89ac0>
m_setup_user_keys = <MagicMock name='setup_user_keys' id='140135928887296'>
m_subp = <MagicMock name='subp' id='140135950145616'>
dist = <abc.DummyConcreteDistro object at 0x7f73f042ca40>
caplog = <_pytest.logging.LogCaptureFixture object at 0x7f73f042d070>

    @mock.patch("cloudinit.ssh_util.setup_user_keys")
    def test_create_user_with_ssh_redirect_user_no_cloud_keys(
        self, m_setup_user_keys, m_subp, dist, caplog
    ):
        """Log a warning when trying to redirect a user no cloud ssh keys."""
      dist.create_user(USER, ssh_redirect_user="someuser")

tests/unittests/distros/test_create_users.py:231:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cloudinit/distros/__init__.py:689: in create_user
    self.lock_passwd(name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <abc.DummyConcreteDistro object at 0x7f73f042ca40>, name = 'foo_user'

    def lock_passwd(self, name):
        """
        Lock the password of a user, i.e., disable password logins
        """
        # passwd must use short '-l' due to SLES11 lacking long form '--lock'
        lock_tools = (["passwd", "-l", name], ["usermod", "--lock", name])
        try:
            cmd = next(tool for tool in lock_tools if subp.which(tool[0]))
        except StopIteration as e:
          raise RuntimeError(
                "Unable to lock user account '%s'. No tools available. "
                "  Tried: %s." % (name, [c[0] for c in lock_tools])
            ) from e
E           RuntimeError: Unable to lock user account 'foo_user'. No tools available.   Tried: ['passwd', 'usermod'].

cloudinit/distros/__init__.py:756: RuntimeError
----------------------------- Captured stdout call -----------------------------
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
DEBUG: Adding user foo_user
DEBUG: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,083 - __init__.py[DEBUG]: Adding user foo_user
------------------------------ Captured log call -------------------------------
2023-12-05 16:31:25 DEBUG     cloudinit.distros:__init__.py:616 Adding user foo_user
____ TestCreateUser.test_create_user_with_ssh_redirect_user_with_cloud_keys ____

self = <abc.DummyConcreteDistro object at 0x7f73df51aa50>, name = 'foo_user'

    def lock_passwd(self, name):
        """
        Lock the password of a user, i.e., disable password logins
        """
        # passwd must use short '-l' due to SLES11 lacking long form '--lock'
        lock_tools = (["passwd", "-l", name], ["usermod", "--lock", name])
        try:
          cmd = next(tool for tool in lock_tools if subp.which(tool[0]))
E           StopIteration

cloudinit/distros/__init__.py:754: StopIteration

The above exception was the direct cause of the following exception:

self = <tests.unittests.distros.test_create_users.TestCreateUser object at 0x7f73f2f89e80>
m_setup_user_keys = <MagicMock name='setup_user_keys' id='140135644630288'>
m_subp = <MagicMock name='subp' id='140135632030176'>
dist = <abc.DummyConcreteDistro object at 0x7f73df51aa50>

    @mock.patch("cloudinit.ssh_util.setup_user_keys")
    def test_create_user_with_ssh_redirect_user_with_cloud_keys(
        self, m_setup_user_keys, m_subp, dist
    ):
        """Disable ssh when ssh_redirect_user and cloud ssh keys are set."""
      dist.create_user(
            USER, ssh_redirect_user="someuser", cloud_public_ssh_keys=["key1"]
        )

tests/unittests/distros/test_create_users.py:244:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cloudinit/distros/__init__.py:689: in create_user
    self.lock_passwd(name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <abc.DummyConcreteDistro object at 0x7f73df51aa50>, name = 'foo_user'

    def lock_passwd(self, name):
        """
        Lock the password of a user, i.e., disable password logins
        """
        # passwd must use short '-l' due to SLES11 lacking long form '--lock'
        lock_tools = (["passwd", "-l", name], ["usermod", "--lock", name])
        try:
            cmd = next(tool for tool in lock_tools if subp.which(tool[0]))
        except StopIteration as e:
          raise RuntimeError(
                "Unable to lock user account '%s'. No tools available. "
                "  Tried: %s." % (name, [c[0] for c in lock_tools])
            ) from e
E           RuntimeError: Unable to lock user account 'foo_user'. No tools available.   Tried: ['passwd', 'usermod'].

cloudinit/distros/__init__.py:756: RuntimeError
----------------------------- Captured stdout call -----------------------------
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
DEBUG: Adding user foo_user
DEBUG: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,108 - __init__.py[DEBUG]: Adding user foo_user
------------------------------ Captured log call -------------------------------
2023-12-05 16:31:25 DEBUG     cloudinit.distros:__init__.py:616 Adding user foo_user
_ TestCreateUser.test_create_user_with_ssh_redirect_user_does_not_disable_auth_keys _

self = <abc.DummyConcreteDistro object at 0x7f73f2746ff0>, name = 'foo_user'

    def lock_passwd(self, name):
        """
        Lock the password of a user, i.e., disable password logins
        """
        # passwd must use short '-l' due to SLES11 lacking long form '--lock'
        lock_tools = (["passwd", "-l", name], ["usermod", "--lock", name])
        try:
          cmd = next(tool for tool in lock_tools if subp.which(tool[0]))
E           StopIteration

cloudinit/distros/__init__.py:754: StopIteration

The above exception was the direct cause of the following exception:

self = <tests.unittests.distros.test_create_users.TestCreateUser object at 0x7f73f2f8a300>
m_setup_user_keys = <MagicMock name='setup_user_keys' id='140135965684704'>
m_subp = <MagicMock name='subp' id='140135824727344'>
dist = <abc.DummyConcreteDistro object at 0x7f73f2746ff0>

    @mock.patch("cloudinit.ssh_util.setup_user_keys")
    def test_create_user_with_ssh_redirect_user_does_not_disable_auth_keys(
        self, m_setup_user_keys, m_subp, dist
    ):
        """Do not disable ssh_authorized_keys when ssh_redirect_user is set."""
      dist.create_user(
            USER,
            ssh_authorized_keys="auth1",
            ssh_redirect_user="someuser",
            cloud_public_ssh_keys=["key1"],
        )

tests/unittests/distros/test_create_users.py:259:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cloudinit/distros/__init__.py:689: in create_user
    self.lock_passwd(name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <abc.DummyConcreteDistro object at 0x7f73f2746ff0>, name = 'foo_user'

    def lock_passwd(self, name):
        """
        Lock the password of a user, i.e., disable password logins
        """
        # passwd must use short '-l' due to SLES11 lacking long form '--lock'
        lock_tools = (["passwd", "-l", name], ["usermod", "--lock", name])
        try:
            cmd = next(tool for tool in lock_tools if subp.which(tool[0]))
        except StopIteration as e:
          raise RuntimeError(
                "Unable to lock user account '%s'. No tools available. "
                "  Tried: %s." % (name, [c[0] for c in lock_tools])
            ) from e
E           RuntimeError: Unable to lock user account 'foo_user'. No tools available.   Tried: ['passwd', 'usermod'].

cloudinit/distros/__init__.py:756: RuntimeError
----------------------------- Captured stdout call -----------------------------
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
FALLBACK: 2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
DEBUG: Adding user foo_user
DEBUG: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
2023-12-05 16:31:25,134 - __init__.py[DEBUG]: Adding user foo_user
------------------------------ Captured log call -------------------------------
2023-12-05 16:31:25 DEBUG     cloudinit.distros:__init__.py:616 Adding user foo_user
=============================== warnings summary ===============================
../../../usr/lib/python3/dist-packages/_pytest/config/__init__.py:1316
  /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1316: PytestRemovedIn8Warning: The --strict option is deprecated, use --strict-markers instead.
    self.issue_config_time_warning(

tests/unittests/helpers.py:527
  /<<PKGBUILDDIR>>/tests/unittests/helpers.py:527: DeprecationWarning: Accessing jsonschema.__version__ is deprecated and will be removed in a future release. Use importlib.metadata directly to query for jsonschema's version.
    int(part) for part in jsonschema.__version__.split(".")  # type: ignore

cloudinit/sources/DataSourceAzure.py:51
  /<<PKGBUILDDIR>>/cloudinit/sources/DataSourceAzure.py:51: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13
    import crypt

cloudinit/distros/parsers/sys_conf.py:7
  /<<PKGBUILDDIR>>/cloudinit/distros/parsers/sys_conf.py:7: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
    import pipes

tests/unittests/test_ds_identify.py::TestDsIdentify::test_ibmcloud_template_no_userdata_in_provisioning
  /usr/lib/python3.12/unittest/case.py:692: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestDsIdentify.test_ibmcloud_template_no_userdata_in_provisioning of <tests.unittests.test_ds_identify.TestDsIdentify testMethod=test_ibmcloud_template_no_userdata_in_provisioning>>)
    return self.run(*args, **kwds)

tests/unittests/test_ds_identify.py::TestDsIdentify::test_ibmcloud_template_userdata_in_provisioning
  /usr/lib/python3.12/unittest/case.py:692: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestDsIdentify.test_ibmcloud_template_userdata_in_provisioning of <tests.unittests.test_ds_identify.TestDsIdentify testMethod=test_ibmcloud_template_userdata_in_provisioning>>)
    return self.run(*args, **kwds)

tests/unittests/test_ds_identify.py::TestDsIdentify::test_vmware_on_vmware_open_vm_tools_64
  /usr/lib/python3.12/unittest/case.py:692: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestDsIdentify.test_vmware_on_vmware_open_vm_tools_64 of <tests.unittests.test_ds_identify.TestDsIdentify testMethod=test_vmware_on_vmware_open_vm_tools_64>>)
    return self.run(*args, **kwds)

tests/unittests/test_ds_identify.py::TestDsIdentify::test_vmware_on_vmware_open_vm_tools_aarch64_linux_gnu
  /usr/lib/python3.12/unittest/case.py:692: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestDsIdentify.test_vmware_on_vmware_open_vm_tools_aarch64_linux_gnu of <tests.unittests.test_ds_identify.TestDsIdentify testMethod=test_vmware_on_vmware_open_vm_tools_aarch64_linux_gnu>>)
    return self.run(*args, **kwds)

tests/unittests/test_ds_identify.py::TestDsIdentify::test_vmware_on_vmware_open_vm_tools_i386_linux_gnu
  /usr/lib/python3.12/unittest/case.py:692: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestDsIdentify.test_vmware_on_vmware_open_vm_tools_i386_linux_gnu of <tests.unittests.test_ds_identify.TestDsIdentify testMethod=test_vmware_on_vmware_open_vm_tools_i386_linux_gnu>>)
    return self.run(*args, **kwds)

tests/unittests/test_ds_identify.py::TestDsIdentify::test_vmware_on_vmware_open_vm_tools_x86_64_linux_gnu
  /usr/lib/python3.12/unittest/case.py:692: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestDsIdentify.test_vmware_on_vmware_open_vm_tools_x86_64_linux_gnu of <tests.unittests.test_ds_identify.TestDsIdentify testMethod=test_vmware_on_vmware_open_vm_tools_x86_64_linux_gnu>>)
    return self.run(*args, **kwds)

tests/unittests/test_log.py::TestCloudInitLogger::test_logger_uses_gmtime
  /<<PKGBUILDDIR>>/tests/unittests/test_log.py:45: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    utc_before = datetime.datetime.utcnow() - datetime.timedelta(0, 0.5)

tests/unittests/test_log.py::TestCloudInitLogger::test_logger_uses_gmtime
  /<<PKGBUILDDIR>>/tests/unittests/test_log.py:47: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    utc_after = datetime.datetime.utcnow() + datetime.timedelta(0, 0.5)

tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_boot_invalid_distro
tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_container_no_ci_log_line
tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_container_ci_log_line
  /<<PKGBUILDDIR>>/cloudinit/analyze/__main__.py:131: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    kernel_start_timestamp = datetime.utcfromtimestamp(kernel_start)

tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_boot_invalid_distro
tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_container_no_ci_log_line
tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_container_ci_log_line
  /<<PKGBUILDDIR>>/cloudinit/analyze/__main__.py:132: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    kernel_end_timestamp = datetime.utcfromtimestamp(kernel_end)

tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_boot_invalid_distro
tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_container_no_ci_log_line
tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_container_ci_log_line
  /<<PKGBUILDDIR>>/cloudinit/analyze/__main__.py:133: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    ci_sysd_start_timestamp = datetime.utcfromtimestamp(ci_sysd_start)

tests/unittests/analyze/test_boot.py::TestAnalyzeBoot::test_container_ci_log_line
  /<<PKGBUILDDIR>>/cloudinit/analyze/__main__.py:141: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    ci_start = datetime.utcfromtimestamp(last_init_local["timestamp"])

tests/unittests/cmd/test_main.py: 8 warnings
tests/unittests/config/test_cc_apt_pipelining.py: 4 warnings
tests/unittests/config/test_cc_bootcmd.py: 1 warning
tests/unittests/config/test_cc_growpart.py: 1 warning
tests/unittests/config/test_cc_grub_dpkg.py: 1 warning
tests/unittests/config/test_cc_mcollective.py: 2 warnings
tests/unittests/config/test_cc_mounts.py: 12 warnings
tests/unittests/config/test_cc_power_state_change.py: 5 warnings
tests/unittests/config/test_cc_runcmd.py: 9 warnings
tests/unittests/config/test_cc_scripts_vendor.py: 2 warnings
tests/unittests/config/test_cc_set_passwords.py: 3 warnings
tests/unittests/config/test_cc_snap.py: 3 warnings
tests/unittests/config/test_cc_update_etc_hosts.py: 3 warnings
tests/unittests/config/test_cc_users_groups.py: 28 warnings
tests/unittests/config/test_schema.py: 166 warnings
tests/unittests/reporting/test_reporting.py: 19 warnings
  /<<PKGBUILDDIR>>/cloudinit/config/schema.py:453: DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release. Call validator.evolve(schema=new_schema).iter_errors(...) instead.
    return next(errors, None) is None

tests/unittests/cmd/devel/test_logs.py::TestCollectLogs::test_collect_logs_creates_tarfile
  /<<PKGBUILDDIR>>/tests/unittests/cmd/devel/test_logs.py:55: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    date = datetime.utcnow().date().strftime("%Y-%m-%d")

tests/unittests/cmd/devel/test_logs.py::TestCollectLogs::test_collect_logs_creates_tarfile
tests/unittests/cmd/devel/test_logs.py::TestCollectLogs::test_collect_logs_includes_optional_userdata
  /<<PKGBUILDDIR>>/cloudinit/cmd/devel/logs.py:213: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    log_dir = datetime.utcnow().date().strftime("cloud-init-logs-%Y-%m-%d")

tests/unittests/cmd/devel/test_logs.py::TestCollectLogs::test_collect_logs_includes_optional_userdata
  /<<PKGBUILDDIR>>/tests/unittests/cmd/devel/test_logs.py:159: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    date = datetime.utcnow().date().strftime("%Y-%m-%d")

tests/unittests/reporting/test_reporting_hyperv.py: 31 warnings
  /<<PKGBUILDDIR>>/cloudinit/reporting/handlers.py:376: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    datetime.utcfromtimestamp(event.timestamp).isoformat() + "Z"

tests/unittests/reporting/test_reporting_hyperv.py::TextKvpReporter::test_get_boot_telemetry
  /<<PKGBUILDDIR>>/cloudinit/sources/helpers/azure.py:136: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    datetime.utcfromtimestamp(kernel_start).isoformat() + "Z",

tests/unittests/reporting/test_reporting_hyperv.py::TextKvpReporter::test_get_boot_telemetry
  /<<PKGBUILDDIR>>/cloudinit/sources/helpers/azure.py:137: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    datetime.utcfromtimestamp(user_start).isoformat() + "Z",

tests/unittests/reporting/test_reporting_hyperv.py::TextKvpReporter::test_get_boot_telemetry
  /<<PKGBUILDDIR>>/cloudinit/sources/helpers/azure.py:138: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    datetime.utcfromtimestamp(cloudinit_activation).isoformat() + "Z",

tests/unittests/sources/test_azure.py: 65 warnings
tests/unittests/sources/test_azure_helper.py: 17 warnings
  /<<PKGBUILDDIR>>/cloudinit/sources/helpers/azure.py:1094: DeprecationWarning: Testing an element's truth value will raise an exception in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
    if not root.find("./wa:ProvisioningSection", cls.NAMESPACES):

tests/unittests/sources/test_azure.py: 49 warnings
tests/unittests/sources/azure/test_kvp.py: 1 warning
  /<<PKGBUILDDIR>>/cloudinit/sources/azure/kvp.py:52: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    f"timestamp={datetime.utcnow().isoformat()}",

tests/unittests/sources/test_azure.py: 50 warnings
tests/unittests/sources/test_azure_helper.py: 4 warnings
tests/unittests/sources/azure/test_errors.py: 9 warnings
tests/unittests/sources/azure/test_kvp.py: 2 warnings
  /<<PKGBUILDDIR>>/cloudinit/sources/azure/errors.py:54: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    self.timestamp = datetime.utcnow()

tests/unittests/sources/test_gce.py::TestDataSourceGCE::test_has_expired
tests/unittests/sources/test_gce.py::TestDataSourceGCE::test_has_expired
  /<<PKGBUILDDIR>>/cloudinit/sources/DataSourceGCE.py:238: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    return datetime.datetime.utcnow() > expire_time

tests/unittests/sources/azure/test_errors.py: 48 warnings
  /<<PKGBUILDDIR>>/tests/unittests/sources/azure/test_errors.py:22: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    timestamp = datetime.datetime.utcnow()

tests/unittests/sources/azure/test_kvp.py::TestReportSuccessToHost::test_report_success_to_host
  /<<PKGBUILDDIR>>/tests/unittests/sources/azure/test_kvp.py:14: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    timestamp = datetime.utcnow()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_options[basic]
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_options[no_home]
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_options[system_user]
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_options[explicit_no_home_false]
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_options[set_password]
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_group_added
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_only_new_group_added
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_groups_with_whitespace_string
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_groups_with_dict_deprecated
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_groups_with_list
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_explicit_sudo_false
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_explicit_sudo_none
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_setup_ssh_authorized_keys_with_string
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_setup_ssh_authorized_keys_with_list
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_setup_ssh_authorized_keys_with_integer
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_user_with_ssh_redirect_user_no_cloud_keys
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_user_with_ssh_redirect_user_with_cloud_keys
FAILED tests/unittests/distros/test_create_users.py::TestCreateUser::test_create_user_with_ssh_redirect_user_does_not_disable_auth_keys
===== 18 failed, 4847 passed, 5 skipped, 1 xfailed, 575 warnings in 50.15s =====
make[1]: *** [debian/rules:11: override_dh_auto_test] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:7: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

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

About the archive rebuild: The build was made using virtual machines
from AWS, with enough memory, enough disk, and either one or two
CPUs, using a reduced chroot with only build-essential packages.

If you could not 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 affects, so that this is still visible in the BTS web
page for this package.

Thanks.


Reply to: