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

Running docs/vagrant.md example no longer populates the inventory/my_lab/artifacts folder #8682

Closed
oboudry opened this issue Apr 4, 2022 · 5 comments · Fixed by #8697
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@oboudry
Copy link

oboudry commented Apr 4, 2022

Not 100% sure but according to timing this may be a side effect of #8680 also I don't really understand how that fix could have this impact. I raised #8673 for which #8680 was created. Since then the vagrant build as per /docs/Vagrant.md no longer fails, but it is very short and some playbooks are not executed. The inventory/my_lab/artifacts folder is not created, and in the ansible output, the following playbooks are flagged as not running

[WARNING]: Could not match supplied host pattern, ignoring: kube-master

PLAY [Add kube-master nodes to kube_control_plane] *****************************
skipping: no hosts matched
[WARNING]: Could not match supplied host pattern, ignoring: kube-node

PLAY [Add kube-node nodes to kube_node] ****************************************
skipping: no hosts matched
[WARNING]: Could not match supplied host pattern, ignoring: k8s-cluster

PLAY [Add k8s-cluster nodes to k8s_cluster] ************************************
skipping: no hosts matched
[WARNING]: Could not match supplied host pattern, ignoring: calico-rr

PLAY [Add calico-rr nodes to calico_rr] ****************************************
skipping: no hosts matched
[WARNING]: Could not match supplied host pattern, ignoring: no-floating

PLAY [Add no-floating nodes to no_floating] ************************************
skipping: no hosts matched
[WARNING]: Could not match supplied host pattern, ignoring: bastion

PLAY [bastion[0]] **************************************************************
skipping: no hosts matched

Environment:

  • Cloud provider or hardware configuration:

  • Vagrant running in the exact same conditions as docs/vagrant.md example

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
    Linux 5.4.0-107-generic x86_64
    NAME="Ubuntu"
    VERSION="20.04.4 LTS (Focal Fossa)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 20.04.4 LTS"
    VERSION_ID="20.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=focal
    UBUNTU_CODENAME=focal

  • Version of Ansible (ansible --version):
    ansible [core 2.12.3]
    config file = /home/olivier/Documents/kubespray/ansible.cfg
    configured module search path = ['/home/olivier/Documents/kubespray/library']
    ansible python module location = /home/olivier/Documents/kubespray/venv/lib/python3.8/site-packages/ansible
    ansible collection location = /home/olivier/.ansible/collections:/usr/share/ansible/collections
    executable location = /home/olivier/Documents/kubespray/venv/bin/ansible
    python version = 3.8.5 (default, Sep 4 2020, 07:30:14) [GCC 7.3.0]
    jinja version = 2.11.3
    libyaml = True

  • Version of Python (python --version):
    Python 3.8.5

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

Network plugin used:
flannel

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

Command used to invoke ansible:
vagrant provision

Output of ansible run:

https://gist.github.com/oboudry/388b9a22acd2a403589ba48a0b9b5abe

Anything else do we need to know:

@oboudry oboudry added the kind/bug Categorizes issue or PR as related to a bug. label Apr 4, 2022
@cristicalin
Copy link
Contributor

This was broken more or less on purpose a while back since the vagrantfile was triggering a full deployment and causing our vagrant CI jobs to take too long. Now a vagrant up only calls ansible-playbook --limit all,localhost cluster.yml --tags facts instead of running the full deployment. The changes was #8434 and I'm not quite sure if we should bring it back seeing as the vagrant part is more a support of CI testing and not part of the main functionality of kubespray, this means it has to be fast in CI.

This prevents any artifacts from being created.

@oboudry
Copy link
Author

oboudry commented Apr 5, 2022

Ok, sorry then, I tried version 2.17.1 which created the artifacts and took it for granted that all version would do.

What I would suggest instead of bring it back is to mention it at the end of the doc and suggest to run the provisionning with full scope, I assume with the following command ?:

ansible-playbook -vvv -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory cluster.yml

@cristicalin
Copy link
Contributor

Yes, that should be the command executed, you may also include --limit all,localhost to emulate how vagrant calls the provisioner.

@oboudry
Copy link
Author

oboudry commented Apr 5, 2022

Closing, as it's expected behavior.

@oboudry oboudry closed this as completed Apr 5, 2022
@oomichi
Copy link
Contributor

oomichi commented Apr 5, 2022

I think it would be better to make the deployment succeed if running vagrant up on usual machines as users expect, and good to keep CI just gather facts without actual deployment to make CI stable.

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.

3 participants