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

Scaling cluster failed #11815

Open
0ekk opened this issue Dec 19, 2024 · 8 comments · May be fixed by #11817
Open

Scaling cluster failed #11815

0ekk opened this issue Dec 19, 2024 · 8 comments · May be fixed by #11817
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@0ekk
Copy link
Member

0ekk commented Dec 19, 2024

What happened?

After #11598 and #11693 merged, our scaling cluster task failed.

The error message is

fatal: [node2]: FAILED! => {
    "assertion": "uncached_hosts | intersect(excluded_hosts) == []",
    "changed": false,
    "evaluated_to": false,
    "msg": "Kubespray does not support '--limit' without a populated facts cache for the excluded hosts.\nPlease run the facts.yml playbook first without '--limit'.\nThe following excluded hosts are not cached: ['localhost']\n"
}

Should the localhost be exclude from the assertion?

What did you expect to happen?

scaling successful

How can we reproduce it (as minimally and precisely as possible)?

ansible-playbook playbooks/facts.yml -i xxx.yml
ansible-playbook scale.yml -i xxx.yml --limit node2

OS

Linux 3.10.0-1160.el7.x86_64 x86_64
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.17.10
PRETTY_NAME="Alpine Linux v3.17"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Version of Ansible

ansible [core 2.16.14]
  config file = /kubespray/ansible.cfg
  configured module search path = ['/kubespray/library']
  ansible python module location = /usr/lib/python3.10/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.15 (main, Sep 11 2024, 09:20:18) [GCC 12.2.1 20220924] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True

Version of Python

Python 3.10.15

Version of Kubespray (commit)

98807ff

Network plugin used

calico

Full inventory with variables

all:
  hosts:
    node1:
      ip: 172.30.41.71
      access_ip: 172.30.41.71
      ansible_host: 172.30.41.71
    node2:
      ip: 172.30.41.72
      access_ip: 172.30.41.72
      ansible_host: 172.30.41.72
  children:
    kube_control_plane:
      hosts:
        node1:
    kube_node:
      hosts:
        node1:
        node2:
    etcd:
      hosts:
        node1:
    k8s_cluster:
      children:
        kube_control_plane:
        kube_node:
    calico_rr:
      hosts: {}

Command used to invoke ansible

See above

Output of ansible run

See above

Anything else we need to know

No response

@0ekk 0ekk added the kind/bug Categorizes issue or PR as related to a bug. label Dec 19, 2024
@0ekk
Copy link
Member Author

0ekk commented Dec 19, 2024

/cc @VannTen

@VannTen
Copy link
Contributor

VannTen commented Dec 19, 2024 via email

@0ekk
Copy link
Member Author

0ekk commented Dec 19, 2024

Hum, I assume you also used a --limit in your command ? The scale.yml does not make much sense without it AFAIK.

Oh, right. --limit is used in scale.yml

@VannTen
Copy link
Contributor

VannTen commented Dec 19, 2024

Oh I hadn't seen the localhost in your error message.

Yeah, seems likely.

I'll try to send a quickfix and then adding the scale with --limit to CI (not the first time this breaks)

@VannTen
Copy link
Contributor

VannTen commented Dec 19, 2024

(you can probably workaround that by running setup on localhost with fact caching enabled, I think)

@0ekk
Copy link
Member Author

0ekk commented Dec 19, 2024

Oh I hadn't seen the localhost in your error message.

Yeah, seems likely.

I'll try to send a quickfix and then adding the scale with --limit to CI (not the first time this breaks)

localhost at end of the err message.

Thanks for your upcoming quickfix :-)

@VannTen
Copy link
Contributor

VannTen commented Dec 19, 2024

Could you check if the linked PR works with your case ?

@0ekk
Copy link
Member Author

0ekk commented Dec 19, 2024

Could you check if the linked PR works with your case ?

The patch works fine.

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
Development

Successfully merging a pull request may close this issue.

2 participants