ClickHouse/tests/integration/helpers
Azat Khuzhin e9b7a84aa1 Fix network manager for integration tests
Sometimes you may get:

    >           raise subprocess.CalledProcessError(exit_code, cmd)
    E           subprocess.CalledProcessError: Command '['iptables', '--wait', '-D', 'DOCKER-USER', '-p', 'tcp', '-s', '172.16.2.3', '-d', '172.16.2.2', '-j', 'DROP']' returned non-zero exit status 137.

And only sometimes you may get the reason:

    OCI runtime exec failed: exec failed: cannot exec in a stopped container: unknown

So this means that container for iptables does not exists anymore, and
the reason is the timeout. And the fact that container_exit_timeout was
equal to container_expire_timeout and was 120.

From the docker logs:

    time="2023-07-16T15:46:52.513673446Z" level=debug msg="form data: {\"AttachStderr\":false,\"AttachStdin\":false,\"AttachStdout\":false,\"Cmd\":[\"sleep\",\"120\"],\"HostConfig\":{\"AutoRemove\":true,\"NetworkMode\":\"host\"},\"Image\":\"clickhouse/integration-helper:latest\",\"NetworkDisabled\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Tty\":false}"
    time="2023-07-16T15:48:57.611857183Z" level=debug msg="form data: {\"AttachStderr\":false,\"AttachStdin\":false,\"AttachStdout\":false,\"Cmd\":[\"sleep\",\"120\"],\"HostConfig\":{\"AutoRemove\":true,\"NetworkMode\":\"host\"},\"Image\":\"clickhouse/integration-helper:latest\",\"NetworkDisabled\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Tty\":false}"

And then pytest will try to execute the iptables command:

    time="2023-07-16T15:50:57.698705244Z" level=debug msg="starting exec command 860920ab2aa07e8d285050f200ac92423a3cf8ec3fb2f57683541e62cf6bc20e in container 66d6c96671b5e987345290ddd260727d96b99789b512d40f333f6263f42fd2f1"

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-18 12:17:26 +02:00
..
dictonaries
s3_mocks do not call finalize after exception 2023-06-13 10:48:31 +02:00
__init__.py
0_common_enable_analyzer.xml Add integration test check with enabled analyzer 2023-06-13 13:09:39 +00:00
0_common_enable_dictionaries.xml Remove one line from XML, because we do not care 2022-08-28 02:44:02 +02:00
0_common_instance_config.xml orphaned role - expiration_time => expiration_time_seconds 2023-03-21 08:44:08 +01:00
0_common_instance_users.xml
client.py do not call finalize after exception 2023-06-13 10:48:31 +02:00
cluster.py Merge pull request #51945 from arenadata/ADQM-950-B 2023-07-14 18:54:27 +02:00
config_cluster.py black check formatted 2022-04-05 12:46:54 -04:00
corrupt_part_data_on_disk.py Review fixes 2022-06-12 01:15:10 +02:00
dictionary.py Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
external_sources.py Fix style 2023-04-26 20:10:10 +00:00
fake_cert.pem
hdfs_api.py Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
http_server.py Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
keeper_config1.xml fix configs 2022-04-22 15:37:14 +02:00
keeper_config2.xml fix configs 2022-04-22 15:37:14 +02:00
keeper_config3.xml fix configs 2022-04-22 15:37:14 +02:00
keeper_utils.py fix style 2022-11-16 12:51:51 +08:00
mock_servers.py reuse s3_mocks, rewrite test test_paranoid_check_in_logs 2023-06-01 01:29:37 +02:00
mongo_cert.pem Fix mongodb test with new cert 2022-04-12 11:47:22 +02:00
mongo_secure.conf
network.py Fix network manager for integration tests 2023-07-18 12:17:26 +02:00
postgres_utility.py replace NO DELAY with SYNC in tests 2023-05-03 20:08:49 +02:00
pytest_xdist_logging_to_separate_files.py Update black version, run it for the repository 2023-03-24 11:54:38 +01:00
s3_tools.py Better 2023-03-29 20:01:21 +02:00
ssl_context.py test_grpc_protocol_ssl test_ssl_cert_authentication test_tlsv1_3 don't use fixed IP for instances 2022-08-09 12:01:15 +02:00
test_tools.py Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
uclient.py Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
uexpect.py Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
utility.py Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
wait_for_helpers.py test when merge canceled with s3 2023-05-03 10:39:03 +02:00
zookeeper_config.xml fix configs 2022-04-22 15:37:14 +02:00
zookeeper_secure_config.xml fix configs 2022-04-22 15:37:14 +02:00