Project

General

Profile

Actions

Bug #52722

closed

TestCheckHost.test_container_engine fails at cephadm:5834: Error cephadm.Error: No time synchronization is active

Added by Brad Hubbard over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Category:
test_orchestrator
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

=================================== FAILURES ===================================
_____________________ TestCheckHost.test_container_engine ______________________

self = <tests.test_cephadm.TestCheckHost object at 0x7f196fa47df0>
find_executable = <MagicMock name='find_executable' id='139747226058128'>

    @mock.patch('cephadm.find_executable', return_value='foo')
    def test_container_engine(self, find_executable):
        ctx = cd.CephadmContext()
····
        ctx.container_engine = None
        err = r'No container engine binary found'
        with pytest.raises(cd.Error, match=err):
            cd.command_check_host(ctx)
····
        ctx.container_engine = mock_podman()
>       cd.command_check_host(ctx)

tests/test_cephadm.py:1496:·
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _·

ctx = <cephadm.CephadmContext object at 0x7f196fd15f40>

    def command_check_host(ctx: CephadmContext) -> None:
        errors = []
        commands = ['systemctl', 'lvcreate']
····
        try:
            engine = check_container_engine(ctx)
            logger.info(f'{engine} is present')
        except Error as e:
            errors.append(str(e))
····
        for command in commands:
            try:
                find_program(command)
                logger.info('%s is present' % command)
            except ValueError:
                errors.append('%s binary does not appear to be installed' % command)
····
        # check for configured+running chronyd or ntp 
        if not check_time_sync(ctx):
            errors.append('No time synchronization is active')
····
        if 'expect_hostname' in ctx and ctx.expect_hostname:
            if get_hostname().lower() != ctx.expect_hostname.lower():
                errors.append('hostname "%s" does not match expected hostname "%s"' % (
                    get_hostname(), ctx.expect_hostname))
            logger.info('Hostname "%s" matches what is expected.',
                        ctx.expect_hostname)
····
        if errors:
>           raise Error('\nERROR: '.join(errors))
E           cephadm.Error: No time synchronization is active

cephadm:5834: Error

There is, of course, no chrony or ntp active in most containers so perhaps we need to find a way to skip this when running in containers?


Files

run-tox-cephadm.output (13.9 KB) run-tox-cephadm.output Brad Hubbard, 09/23/2021 10:44 PM
Actions #1

Updated by Brad Hubbard over 2 years ago

Attaching full output.

Actions #2

Updated by Sebastian Wagner over 2 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Sebastian Wagner
  • Pull request ID set to 43298
Actions #3

Updated by Sebastian Wagner over 2 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF