Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MetalLB] playbook failed with msg: metallb_ip_range is mandatory to be specified for MetalLB #10003

Closed
eugene-marchanka opened this issue Apr 19, 2023 · 0 comments · Fixed by #10004 or #9995
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@eugene-marchanka
Copy link
Contributor

Environment:

  • Cloud provider or hardware configuration:
    bare-metal cluster. ESXi v8 + vSphere v8

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
    CentOS 8

  • Version of Ansible (ansible --version):

ansible [core 2.12.5]
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  ansible collection location = /home/test/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.8.10 (default, Mar 13 2023, 10:26:41) [GCC 9.4.0]
  jinja version = 2.11.3
  libyaml = True
  • Version of Python (python --version):
    python version = 3.8.10 (default, Mar 13 2023, 10:26:41) [GCC 9.4.0]

Kubespray version (commit) (git rev-parse --short HEAD):

$ git rev-parse --short HEAD
b3ed25ee3

Network plugin used:
calico

Full inventory with variables (ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"):

hosts.yaml:

all:
  hosts:
    test00-00:
      ansible_host: 172.16.200.10
      ip: 172.16.200.10
      access_ip: 172.16.200.10
    test00-01:
      ansible_host: 172.16.200.11
      ip: 172.16.200.11
      access_ip: 172.16.200.11
    test00-02:
      ansible_host: 172.16.200.12
      ip: 172.16.200.12
      access_ip: 172.16.200.12
    test00-03:
      ansible_host: 172.16.200.13
      ip: 172.16.200.13
      access_ip: 172.16.200.13
    test00-04:
      ansible_host: 172.16.200.14
      ip: 172.16.200.14
      access_ip: 172.16.200.14
  children:
    kube_control_plane:
      hosts:
        test00-00:
          ha_role: MASTER
        test00-01:
          ha_role: BACKUP
        test00-02:
          ha_role: BACKUP
    kube_node:
      hosts:
        test00-00:
        test00-01:
        test00-02:
        test00-03:
        test00-04:
    etcd:
      hosts:
        test00-00:
        test00-01:
        test00-02:
    k8s_cluster:
      children:
        kube_control_plane:
        kube_node:
    calico_rr:
      hosts: {}

vars.yml:

cluster_name: test.x.x.io

apiserver_loadbalancer_domain_name: test-lb.x.x.io
loadbalancer_apiserver:
  address: 172.16.200.240
  port: 8381
loadbalancer_apiserver_localhost: false

# MetalLB Config
metallb_enabled: true
kube_proxy_strict_arp: true
metallb_speaker_enabled: false
metallb_avoid_buggy_ips: true
metallb_config:
  address_pools:
    primary:
      ip_range:
      - 172.17.128.0/24
      auto_assign: true
  layer2:
  - primary
calico_advertise_service_loadbalancer_ips: "{{ metallb_config.address_pools.primary.ip_range }}"

Command used to invoke ansible:
ansible-playbook kubespray/cluster.yml -i ../../hosts.yaml --extra-vars "@../../vars.yml"

Output of ansible run:

TASK [kubernetes-apps/metallb : Kubernetes Apps | Check cluster settings for MetalLB] *****************************************************************************************************
fatal: [test00-00]: FAILED! => changed=false 
  msg: metallb_ip_range is mandatory to be specified for MetalLB
skipping: [test00-01]
skipping: [test00-02]

Anything else do we need to know:

  • Follow README.md on how to use MetalLB
  • Playbook fails with error described above

I have not found any mentions of metallb_ip_range variable in playbooks except this and this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
1 participant