mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
On clusters configured with dual-stack network the IPv4 and IPv6 addresses can be added to the main interface at different time, which results in the openshift node addresses not containing the IPv6 address. This commit fixes the issue by including `ip=dhcp,dhcp6` to the kernel args of masters and works, which sets `required-timeout` to an value that the IP configuration will be tried before succeeds. This configuration is valid for day1 dual-stack clusters only.
34 lines
1.1 KiB
Python
Executable File
34 lines
1.1 KiB
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import unittest
|
|
import xmlrunner
|
|
|
|
import os
|
|
import sys
|
|
import glob
|
|
import yaml
|
|
|
|
ASSETS_DIR = ""
|
|
|
|
class GenerateMachineConfig(unittest.TestCase):
|
|
def setUp(self):
|
|
self.machine_configs = []
|
|
for machine_config_path in glob.glob(
|
|
f'{ASSETS_DIR}/openshift/99_openshift-machineconfig_99-dual-stack-*.yaml'
|
|
):
|
|
with open(machine_config_path) as f:
|
|
self.machine_configs.append(yaml.load(f, Loader=yaml.FullLoader))
|
|
|
|
def test_kernel_args(self):
|
|
"""Assert there are machine configs configuring the kernel args for masters and workers"""
|
|
for machine_config in self.machine_configs:
|
|
kernel_args = machine_config["spec"]["kernelArguments"]
|
|
self.assertIn("ip=dhcp,dhcp6", kernel_args)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
ASSETS_DIR = sys.argv.pop()
|
|
with open(os.environ.get('JUNIT_FILE', '/dev/null'), 'wb') as output:
|
|
unittest.main(testRunner=xmlrunner.XMLTestRunner(output=output), failfast=False, buffer=False, catchbreak=False, verbosity=2)
|