osism / issues

This repository is used for bug reports that are cross-project or not bound to a specific repository (or to an unknown repository).
https://www.osism.tech
1 stars 1 forks source link

osism.commons: fix failed Ubuntu 24.04 tests #1002

Open berendt opened 2 months ago

berendt commented 2 months ago

Related to osism/issues#946

berendt commented 2 months ago

Looks like there is no more resovlconf service in Ubuntu 24.04 that can be disabled.

self = <testinfra.host.Host ansible://molecule-resolvconf>
command = 'systemctl is-enabled %s', args = ('resolvconf',), kwargs = {}

    def run_test(
        self, command: str, *args: str, **kwargs: Any
    ) -> testinfra.backend.base.CommandResult:
        """Run command and check it return an exit status of 0 or 1

        :raises: AssertionError
        """
>       return self.run_expect([0, 1], command, *args, **kwargs)
E       AssertionError: Unexpected exit code 4 for CommandResult(backend=<testinfra.backend.local.LocalBackend object at 0x7caa94109a30>, exit_status=4, command=b'systemctl is-enabled resolvconf', _stdout=b'not-found\n', _stderr=b'')
E       assert 4 in [0, 1]
E        +  where 4 = CommandResult(backend=<testinfra.backend.local.LocalBackend object at 0x7caa94109a30>, exit_status=4, command=b'systemctl is-enabled resolvconf', _stdout=b'not-found\n', _stderr=b'').rc
berendt commented 2 months ago

systohc:

TASK [systohc : Sync hardware clock] *******************************************
fatal: [molecule-systohc]: FAILED! => {"changed": false, "cmd": "hwclock --systohc", "msg": "[Errno 2] No such file or directory: b'hwclock'", "rc": 2, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
berendt commented 2 months ago

Trivy probably does not yet have a noble repository. Not important for the moment.

TASK [trivy : Add repository] **************************************************
fatal: [molecule-trivy]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository 'https://aquasecurity.github.io/trivy-repo/deb noble Release' does not have a Release file."}