Skip to content

update 0004_start_test.py - postart script executable

Cirrus CI / Use prebuilt packages failed Nov 18, 2024 in 12m 14s

Task Summary

Instruction test failed in 11:07

Details

⚠️ Not enough compute credits to prioritize tasks!

✅ 00:03 clone
✅ 00:01 create_pool
✅ 00:01 prepare_pkg
✅ 00:06 pkg
✅ 00:27 install_pkgs
✅ 00:02 configure_python
✅ 00:01 enable_routing
✅ 00:13 install_python_packages
✅ 00:01 env_setup
✅ 00:00 Upload 'pkg' cache
✅ 00:01 install_iocage
✅ 00:01 ifconfig
❌ 11:07 test

PASSED tests/functional_tests/0019_list_snapshot_test.py::test_02_list_snapshots_of_template_jail
PASSED tests/functional_tests/0019_list_snapshot_test.py::test_03_list_snapshots_of_jail_with_long_flag
PASSED tests/functional_tests/0019_list_snapshot_test.py::test_04_list_snapshots_of_all_jails
PASSED tests/functional_tests/0019_list_snapshot_test.py::test_05_list_snapshots_of_all_jails_with_long_flag
PASSED tests/functional_tests/0020_remove_snapshot_test.py::test_01_remove_snapshot
PASSED tests/functional_tests/0020_remove_snapshot_test.py::test_02_remove_snapshot_of_all_jails
PASSED tests/functional_tests/0020_remove_snapshot_test.py::test_05_remove_all_snapshots_all_jails
PASSED tests/functional_tests/0021_list_test.py::test_01_list_default
PASSED tests/functional_tests/0021_list_test.py::test_02_list_default_sort_flags
PASSED tests/functional_tests/0021_list_test.py::test_03_list_releases_flag
PASSED tests/functional_tests/0021_list_test.py::test_04_list_base_jails_with_sorting_flags
PASSED tests/functional_tests/0021_list_test.py::test_05_list_template_jails_with_sorting_flags
PASSED tests/functional_tests/0021_list_test.py::test_06_list_jails_with_quick_flag
PASSED tests/functional_tests/0021_list_test.py::test_07_list_remote_releases
PASSED tests/functional_tests/0021_list_test.py::test_08_list_jails_with_full_flag_and_sort
PASSED tests/functional_tests/0098_destroy_test.py::test_01_destroy_jail
PASSED tests/functional_tests/0098_destroy_test.py::test_02_destroy_jails
PASSED tests/functional_tests/9999_ioc_clean_test.py::test_clean
SKIPPED [1] tests/conftest.py:116: Need --dhcp option to run
SKIPPED [2] tests/conftest.py:148: Need either --dhcp or --jail_ip  or --nat option to run, not all
SKIPPED [1] tests/conftest.py:130: Need --jail_ip option to run
SKIPPED [3] tests/conftest.py:119: Need --nat option to run
SKIPPED [3] tests/conftest.py:349: Skipped
FAILED tests/functional_tests/0004_start_test.py::test_03_create_and_start_nobridge_vnet_jail - AssertionError:   + Executing exec_poststart FAILED
  ERROR:
  Script is not executable!
  
  Refusing to start nobridge_jail: exec_poststart failed
  
assert 1 == 0
 +  where 1 = CompletedProcess(args=['iocage', 'create', '-r', '14.1-RELEASE', '-n', 'nobridge_jail', 'ip4_addr=lo0|192.168.2.2', 'boot=on', 'vnet=on', 'interfaces=vnet0:none', 'vnet_default_interface=none', 'ip6_addr=vnet0|fe80::2/64', 'defaultrouter6=none', 'defaultrouter=none', 'exec_poststart="/tmp/tmppsj51bj3 nobridge_jail"'], returncode=1, stdout=b'nobridge_jail successfully created!\n* Starting nobridge_jail\n  + Started OK\n  + Using devfs_ruleset: 1012 (iocage generated default)\n  + Configuring VNET OK\n  + Using IP options: vnet\n  + Starting services OK\n', stderr=b'  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n').returncode
FAILED tests/functional_tests/0008_exec_test.py::test_03_exec_host_user_on_jail - AssertionError:   + Executing exec_poststart FAILED
  ERROR:
  Script is not executable!
  
  Refusing to start nobridge_jail: exec_poststart failed
  
assert 1 == 0
 +  where 1 = CompletedProcess(args=['iocage', 'exec', '-f', '-u', 'nobody', 'nobridge_jail', 'whoami'], returncode=1, stdout=b'* Starting nobridge_jail\n  + Started OK\n  + Using devfs_ruleset: 1002 (iocage generated default)\n  + Configuring VNET OK\n  + Using IP options: vnet\n  + Starting services OK\n', stderr=b'  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n').returncode
FAILED tests/functional_tests/0016_restart_test.py::test_02_soft_restart_jail - AssertionError:   + Executing exec_poststart FAILED
  ERROR:
  Script is not executable!
  
  Refusing to start nobridge_jail: exec_poststart failed
  
assert 1 == 0
 +  where 1 = CompletedProcess(args=['iocage', 'start', 'nobridge_jail'], returncode=1, stdout=b'* Starting nobridge_jail\n  + Started OK\n  + Using devfs_ruleset: 1002 (iocage generated default)\n  + Configuring VNET OK\n  + Using IP options: vnet\n  + Starting services OK\n', stderr=b'  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n').returncode
FAILED tests/functional_tests/0016_restart_test.py::test_04_soft_restart_all_jails - AssertionError:   + Executing exec_poststart FAILED
  ERROR:
  Script is not executable!
  
  Refusing to start nobridge_jail: exec_poststart failed
  
assert 1 == 0
 +  where 1 = CompletedProcess(args=['iocage', 'start', 'nobridge_jail'], returncode=1, stdout=b'* Starting nobridge_jail\n  + Started OK\n  + Using devfs_ruleset: 1002 (iocage generated default)\n  + Configuring VNET OK\n  + Using IP options: vnet\n  + Starting services OK\n', stderr=b'  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n').returncode
============= 4 failed, 73 passed, 10 skipped in 665.61s (0:11:05) =============

Annotations

Check failure on line 81 in tests/functional_tests/0004_start_test.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Use prebuilt packages

tests/functional_tests/0004_start_test.py#L81

tests.functional_tests.0004_start_test.test_03_create_and_start_nobridge_vnet_jail
Raw output
release = '14.1-RELEASE', jail = nobridge_jail
invoke_cli = <function invoke_cli.<locals>.invoke at 0x15f6820484a0>
nobridge_jail_ip = '192.168.2.2'

    @require_root
    @require_zpool
    @require_nobridge_jail_ip
    def test_03_create_and_start_nobridge_vnet_jail(release, jail, invoke_cli, nobridge_jail_ip):
        jail = jail('nobridge_jail')
    
        fd, path = tempfile.mkstemp()
    
        try:
            with os.fdopen(fd, 'w') as tmp:
                tmp.write(inspect.cleandoc("""
                    #!/bin/sh
                    jailname=ioc-$1
                    jid=jls -j $jailname jid
                    iface=vnet0.$jid
                    ifconfig $iface inet6 fe80::1/64
                """))
            os.chmod(path, 0o755)
    
>           invoke_cli([
                'create', '-r', release, '-n', jail.name,
                f'ip4_addr=lo0|{nobridge_jail_ip}', 'boot=on', 'vnet=on',
                'interfaces=vnet0:none', 'vnet_default_interface=none',
                'ip6_addr=vnet0|fe80::2/64', 'defaultrouter6=none',
                'defaultrouter=none',
                f'exec_poststart="{path} {jail.name}"'
            ])

tests/functional_tests/0004_start_test.py:81: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = ['iocage', 'create', '-r', '14.1-RELEASE', '-n', 'nobridge_jail', ...]
reason = '  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n'
assert_returncode = True

    def invoke(cmd, reason=None, assert_returncode=True):
        cmd.insert(0, 'iocage')
        cmd = [str(c) for c in cmd]
    
        result = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
        )
        reason = f'{reason}: {result.stderr}' if reason else result.stderr
    
        if assert_returncode:
            # Empty or Template jails that should not be started/stopped but
            # sometimes make it in due to a race
            try:
                reason = reason.decode()
            except AttributeError:
                pass
    
            if 'execvp: /bin/sh: No such' not in reason:
>               assert result.returncode == 0, reason
E               AssertionError:   + Executing exec_poststart FAILED
E                 ERROR:
E                 Script is not executable!
E                 
E                 Refusing to start nobridge_jail: exec_poststart failed
E                 
E               assert 1 == 0
E                +  where 1 = CompletedProcess(args=['iocage', 'create', '-r', '14.1-RELEASE', '-n', 'nobridge_jail', 'ip4_addr=lo0|192.168.2.2', 'boot=on', 'vnet=on', 'interfaces=vnet0:none', 'vnet_default_interface=none', 'ip6_addr=vnet0|fe80::2/64', 'defaultrouter6=none', 'defaultrouter=none', 'exec_poststart="/tmp/tmppsj51bj3 nobridge_jail"'], returncode=1, stdout=b'nobridge_jail successfully created!\n* Starting nobridge_jail\n  + Started OK\n  + Using devfs_ruleset: 1012 (iocage generated default)\n  + Configuring VNET OK\n  + Using IP options: vnet\n  + Starting services OK\n', stderr=b'  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n').returncode

tests/conftest.py:293: AssertionError

Check failure on line 82 in tests/functional_tests/0008_exec_test.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Use prebuilt packages

tests/functional_tests/0008_exec_test.py#L82

tests.functional_tests.0008_exec_test.test_03_exec_host_user_on_jail
Raw output
resource_selector = <tests.data_classes.ResourceSelector object at 0x15f6818fa810>
skip_test = <function skip_test.<locals>.skip at 0x15f68204a840>
invoke_cli = <function invoke_cli.<locals>.invoke at 0x15f68204a8e0>

    @require_root
    @require_zpool
    def test_03_exec_host_user_on_jail(resource_selector, skip_test, invoke_cli):
        jails = resource_selector.startable_jails_and_not_running
        skip_test(not jails)
    
        jail = jails[0]
>       result = invoke_cli(
            ['exec', '-f', '-u', 'nobody', jail.name, 'whoami']
        )

tests/functional_tests/0008_exec_test.py:82: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = ['iocage', 'exec', '-f', '-u', 'nobody', 'nobridge_jail', ...]
reason = '  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n'
assert_returncode = True

    def invoke(cmd, reason=None, assert_returncode=True):
        cmd.insert(0, 'iocage')
        cmd = [str(c) for c in cmd]
    
        result = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
        )
        reason = f'{reason}: {result.stderr}' if reason else result.stderr
    
        if assert_returncode:
            # Empty or Template jails that should not be started/stopped but
            # sometimes make it in due to a race
            try:
                reason = reason.decode()
            except AttributeError:
                pass
    
            if 'execvp: /bin/sh: No such' not in reason:
>               assert result.returncode == 0, reason
E               AssertionError:   + Executing exec_poststart FAILED
E                 ERROR:
E                 Script is not executable!
E                 
E                 Refusing to start nobridge_jail: exec_poststart failed
E                 
E               assert 1 == 0
E                +  where 1 = CompletedProcess(args=['iocage', 'exec', '-f', '-u', 'nobody', 'nobridge_jail', 'whoami'], returncode=1, stdout=b'* Starting nobridge_jail\n  + Started OK\n  + Using devfs_ruleset: 1002 (iocage generated default)\n  + Configuring VNET OK\n  + Using IP options: vnet\n  + Starting services OK\n', stderr=b'  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n').returncode

tests/conftest.py:293: AssertionError

Check failure on line 130 in tests/functional_tests/0016_restart_test.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Use prebuilt packages

tests/functional_tests/0016_restart_test.py#L130

tests.functional_tests.0016_restart_test.test_02_soft_restart_jail
Raw output
invoke_cli = <function invoke_cli.<locals>.invoke at 0x15f68204bec0>
resource_selector = <tests.data_classes.ResourceSelector object at 0x15f682313810>
skip_test = <function skip_test.<locals>.skip at 0x15f6820f8040>
write_file = <function write_file.<locals>.write_to_file at 0x15f6820f80e0>

    @require_root
    @require_zpool
    def test_02_soft_restart_jail(invoke_cli, resource_selector, skip_test, write_file):
>       common_restart_jail(
            invoke_cli, resource_selector, skip_test,
            ['restart', '-s'], write_file
        )

tests/functional_tests/0016_restart_test.py:130: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/functional_tests/0016_restart_test.py:63: in common_restart_jail
    invoke_cli(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = ['iocage', 'start', 'nobridge_jail']
reason = '  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n'
assert_returncode = True

    def invoke(cmd, reason=None, assert_returncode=True):
        cmd.insert(0, 'iocage')
        cmd = [str(c) for c in cmd]
    
        result = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
        )
        reason = f'{reason}: {result.stderr}' if reason else result.stderr
    
        if assert_returncode:
            # Empty or Template jails that should not be started/stopped but
            # sometimes make it in due to a race
            try:
                reason = reason.decode()
            except AttributeError:
                pass
    
            if 'execvp: /bin/sh: No such' not in reason:
>               assert result.returncode == 0, reason
E               AssertionError:   + Executing exec_poststart FAILED
E                 ERROR:
E                 Script is not executable!
E                 
E                 Refusing to start nobridge_jail: exec_poststart failed
E                 
E               assert 1 == 0
E                +  where 1 = CompletedProcess(args=['iocage', 'start', 'nobridge_jail'], returncode=1, stdout=b'* Starting nobridge_jail\n  + Started OK\n  + Using devfs_ruleset: 1002 (iocage generated default)\n  + Configuring VNET OK\n  + Using IP options: vnet\n  + Starting services OK\n', stderr=b'  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n').returncode

tests/conftest.py:293: AssertionError

Check failure on line 147 in tests/functional_tests/0016_restart_test.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Use prebuilt packages

tests/functional_tests/0016_restart_test.py#L147

tests.functional_tests.0016_restart_test.test_04_soft_restart_all_jails
Raw output
invoke_cli = <function invoke_cli.<locals>.invoke at 0x15f6820f8360>
resource_selector = <tests.data_classes.ResourceSelector object at 0x15f68214fd90>
skip_test = <function skip_test.<locals>.skip at 0x15f6820f82c0>

    @require_root
    @require_zpool
    def test_04_soft_restart_all_jails(invoke_cli, resource_selector, skip_test):
>       common_restart_all_jails(
            invoke_cli, resource_selector, skip_test, ['restart', '-s']
        )

tests/functional_tests/0016_restart_test.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/functional_tests/0016_restart_test.py:84: in common_restart_all_jails
    invoke_cli(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cmd = ['iocage', 'start', 'nobridge_jail']
reason = '  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n'
assert_returncode = True

    def invoke(cmd, reason=None, assert_returncode=True):
        cmd.insert(0, 'iocage')
        cmd = [str(c) for c in cmd]
    
        result = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE
        )
        reason = f'{reason}: {result.stderr}' if reason else result.stderr
    
        if assert_returncode:
            # Empty or Template jails that should not be started/stopped but
            # sometimes make it in due to a race
            try:
                reason = reason.decode()
            except AttributeError:
                pass
    
            if 'execvp: /bin/sh: No such' not in reason:
>               assert result.returncode == 0, reason
E               AssertionError:   + Executing exec_poststart FAILED
E                 ERROR:
E                 Script is not executable!
E                 
E                 Refusing to start nobridge_jail: exec_poststart failed
E                 
E               assert 1 == 0
E                +  where 1 = CompletedProcess(args=['iocage', 'start', 'nobridge_jail'], returncode=1, stdout=b'* Starting nobridge_jail\n  + Started OK\n  + Using devfs_ruleset: 1002 (iocage generated default)\n  + Configuring VNET OK\n  + Using IP options: vnet\n  + Starting services OK\n', stderr=b'  + Executing exec_poststart FAILED\nERROR:\nScript is not executable!\n\nRefusing to start nobridge_jail: exec_poststart failed\n').returncode

tests/conftest.py:293: AssertionError