fix flake8 errors in Kubespray CI - tox-inventory-builder (#6910)
* fix flake8 errors in Kubespray CI - tox-inventory-builder * Invalidate CRI-O kubic repo's cache Signed-off-by: Victor Morales <v.morales@samsung.com> * add support to configure pkg install retries and use in CI job tf-ovh_ubuntu18-calico (due to it failing often) * Switch Calico, Cilium and MetalLB image repos to Quay.io Co-authored-by: Victor Morales <v.morales@samsung.com> Co-authored-by: Barry Melbourne <9964974+bmelbourne@users.noreply.github.com>pull/6923/head
parent
0f7341bdde
commit
ee23b947aa
|
@ -51,7 +51,7 @@ class TestInventory(unittest.TestCase):
|
|||
groups = ['group1', 'group2']
|
||||
self.inv.ensure_required_groups(groups)
|
||||
for group in groups:
|
||||
self.assertTrue(group in self.inv.yaml_config['all']['children'])
|
||||
self.assertIn(group, self.inv.yaml_config['all']['children'])
|
||||
|
||||
def test_get_host_id(self):
|
||||
hostnames = ['node99', 'no99de01', '01node01', 'node1.domain',
|
||||
|
@ -209,8 +209,8 @@ class TestInventory(unittest.TestCase):
|
|||
('doesnotbelong2', {'whateveropts=ilike'})])
|
||||
self.inv.yaml_config['all']['hosts'] = existing_hosts
|
||||
self.inv.purge_invalid_hosts(proper_hostnames)
|
||||
self.assertTrue(
|
||||
bad_host not in self.inv.yaml_config['all']['hosts'].keys())
|
||||
self.assertNotIn(
|
||||
bad_host, self.inv.yaml_config['all']['hosts'].keys())
|
||||
|
||||
def test_add_host_to_group(self):
|
||||
group = 'etcd'
|
||||
|
@ -227,8 +227,8 @@ class TestInventory(unittest.TestCase):
|
|||
host = 'node1'
|
||||
|
||||
self.inv.set_kube_master([host])
|
||||
self.assertTrue(
|
||||
host in self.inv.yaml_config['all']['children'][group]['hosts'])
|
||||
self.assertIn(
|
||||
host, self.inv.yaml_config['all']['children'][group]['hosts'])
|
||||
|
||||
def test_set_all(self):
|
||||
hosts = OrderedDict([
|
||||
|
@ -246,8 +246,8 @@ class TestInventory(unittest.TestCase):
|
|||
|
||||
self.inv.set_k8s_cluster()
|
||||
for host in expected_hosts:
|
||||
self.assertTrue(
|
||||
host in
|
||||
self.assertIn(
|
||||
host,
|
||||
self.inv.yaml_config['all']['children'][group]['children'])
|
||||
|
||||
def test_set_kube_node(self):
|
||||
|
@ -255,16 +255,16 @@ class TestInventory(unittest.TestCase):
|
|||
host = 'node1'
|
||||
|
||||
self.inv.set_kube_node([host])
|
||||
self.assertTrue(
|
||||
host in self.inv.yaml_config['all']['children'][group]['hosts'])
|
||||
self.assertIn(
|
||||
host, self.inv.yaml_config['all']['children'][group]['hosts'])
|
||||
|
||||
def test_set_etcd(self):
|
||||
group = 'etcd'
|
||||
host = 'node1'
|
||||
|
||||
self.inv.set_etcd([host])
|
||||
self.assertTrue(
|
||||
host in self.inv.yaml_config['all']['children'][group]['hosts'])
|
||||
self.assertIn(
|
||||
host, self.inv.yaml_config['all']['children'][group]['hosts'])
|
||||
|
||||
def test_scale_scenario_one(self):
|
||||
num_nodes = 50
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
baseurl: http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_$releasever/
|
||||
gpgcheck: yes
|
||||
gpgkey: http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_$releasever/repodata/repomd.xml.key
|
||||
keepcache: false
|
||||
when: ansible_distribution in ["CentOS"]
|
||||
|
||||
- name: Add CRI-O kubic yum repo
|
||||
|
|
|
@ -420,13 +420,13 @@ etcd_image_repo: "{{ quay_image_repo }}/coreos/etcd"
|
|||
etcd_image_tag: "{{ etcd_version }}{%- if image_arch != 'amd64' -%}-{{ image_arch }}{%- endif -%}"
|
||||
flannel_image_repo: "{{ quay_image_repo }}/coreos/flannel"
|
||||
flannel_image_tag: "{{ flannel_version }}"
|
||||
calico_node_image_repo: "{{ docker_image_repo }}/calico/node"
|
||||
calico_node_image_repo: "{{ quay_image_repo }}/calico/node"
|
||||
calico_node_image_tag: "{{ calico_version }}"
|
||||
calico_cni_image_repo: "{{ docker_image_repo }}/calico/cni"
|
||||
calico_cni_image_repo: "{{ quay_image_repo }}/calico/cni"
|
||||
calico_cni_image_tag: "{{ calico_cni_version }}"
|
||||
calico_policy_image_repo: "{{ docker_image_repo }}/calico/kube-controllers"
|
||||
calico_policy_image_repo: "{{ quay_image_repo }}/calico/kube-controllers"
|
||||
calico_policy_image_tag: "{{ calico_policy_version }}"
|
||||
calico_typha_image_repo: "{{ docker_image_repo }}/calico/typha"
|
||||
calico_typha_image_repo: "{{ quay_image_repo }}/calico/typha"
|
||||
calico_typha_image_tag: "{{ calico_typha_version }}"
|
||||
pod_infra_image_repo: "{{ kube_image_repo }}/pause"
|
||||
pod_infra_image_tag: "{{ pod_infra_version }}"
|
||||
|
@ -451,11 +451,11 @@ contiv_etcd_init_image_repo: "{{ docker_image_repo }}/ferest/etcd-initer"
|
|||
contiv_etcd_init_image_tag: latest
|
||||
contiv_ovs_image_repo: "{{ docker_image_repo }}/contiv/ovs"
|
||||
contiv_ovs_image_tag: "latest"
|
||||
cilium_image_repo: "{{ docker_image_repo }}/cilium/cilium"
|
||||
cilium_image_repo: "{{ quay_image_repo }}/cilium/cilium"
|
||||
cilium_image_tag: "{{ cilium_version }}"
|
||||
cilium_init_image_repo: "{{ docker_image_repo }}/cilium/cilium-init"
|
||||
cilium_init_image_repo: "{{ quay_image_repo }}/cilium/cilium-init"
|
||||
cilium_init_image_tag: "2019-04-05"
|
||||
cilium_operator_image_repo: "{{ docker_image_repo }}/cilium/operator"
|
||||
cilium_operator_image_repo: "{{ quay_image_repo }}/cilium/operator"
|
||||
cilium_operator_image_tag: "{{ cilium_version }}"
|
||||
kube_ovn_container_image_repo: "{{ docker_image_repo }}/kubeovn/kube-ovn"
|
||||
kube_ovn_container_image_tag: "{{ kube_ovn_version }}"
|
||||
|
@ -581,8 +581,8 @@ image_pull_command_on_localhost: "{{ docker_bin_dir }}/docker pull"
|
|||
image_save_command_on_localhost: "{{ docker_bin_dir }}/docker save {{ image_reponame }} | gzip -{{ download_compress }} > {{ image_path_cached }}"
|
||||
image_info_command_on_localhost: "{{ docker_bin_dir }}/docker images"
|
||||
|
||||
metallb_speaker_image_repo: "{{ docker_image_repo }}/metallb/speaker"
|
||||
metallb_controller_image_repo: "{{ docker_image_repo }}/metallb/controller"
|
||||
metallb_speaker_image_repo: "{{ quay_image_repo }}/metallb/speaker"
|
||||
metallb_controller_image_repo: "{{ quay_image_repo }}/metallb/controller"
|
||||
|
||||
downloads:
|
||||
netcheck_server:
|
||||
|
|
|
@ -53,3 +53,6 @@ minimal_node_memory_mb: 1024
|
|||
minimal_master_memory_mb: 1500
|
||||
|
||||
yum_repo_dir: /etc/yum.repos.d
|
||||
|
||||
# number of times package install task should be retried
|
||||
pkg_install_retries: 4
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
state: latest
|
||||
register: pkgs_task_result
|
||||
until: pkgs_task_result is succeeded
|
||||
retries: 4
|
||||
retries: "{{ pkg_install_retries }}"
|
||||
delay: "{{ retry_stagger | random + 3 }}"
|
||||
when: not (ansible_os_family in ["Flatcar Container Linux by Kinvolk", "ClearLinux"] or is_fedora_coreos)
|
||||
tags:
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
dns_min_replicas: 1
|
||||
deploy_netchecker: true
|
||||
sonobuoy_enabled: true
|
||||
pkg_install_retries: 10
|
||||
retry_stagger: 10
|
||||
|
||||
# Ignore ping errors
|
||||
ignore_assert_errors: true
|
||||
|
|
Loading…
Reference in New Issue