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

bug when running 2 provisioners (certs + k8s) with the guest mode #10

Closed
hoatle opened this issue Nov 8, 2018 · 4 comments
Closed

bug when running 2 provisioners (certs + k8s) with the guest mode #10

hoatle opened this issue Nov 8, 2018 · 4 comments

Comments

@hoatle
Copy link
Member

hoatle commented Nov 8, 2018

This bug happened when running both teracy-dev-certs and teracy-dev-k8s ansible in guest mode.

The workaround: run teracy-dev-k8s ansible in host mode instead.

@hoatle
Copy link
Member Author

hoatle commented Nov 8, 2018

error log:

==> k8s-01: Running provisioner: teracy-dev-k8s (ansible_local)...
Vagrant has automatically selected the compatibility mode '2.0'
according to the Ansible version installed (2.7.1).

Alternatively, the compatibility mode can be specified in your Vagrantfile:
https://www.vagrantup.com/docs/provisioning/ansible_common.html#compatibility_mode

==> k8s-01: Vagrant has detected a host range pattern in the `groups` option.
==> k8s-01: Vagrant doesn't fully check the validity of these parameters!
==> k8s-01: 
==> k8s-01: Please check https://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups
==> k8s-01: for more information.
    k8s-01: Running ansible-playbook...
cd /vagrant && PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_CONFIG='extensions/kubespray/ansible.cfg' ansible-playbook --limit="all" --inventory-file=/tmp/vagrant-ansible/inventory --become -v --forks=1 --flush-cache extensions/kubespray/cluster.yml
Using /vagrant/extensions/kubespray/ansible.cfg as config file
/tmp/vagrant-ansible/inventory/vagrant_ansible_local_inventory did not meet host_list requirements, check plugin documentation if this is unexpected
/tmp/vagrant-ansible/inventory/vagrant_ansible_local_inventory did not meet script requirements, check plugin documentation if this is unexpected
ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in '/vagrant/extensions/kubespray/roles/vault/handlers/main.yml': line 44, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: unseal vault
  ^ here

Ansible failed to complete successfully. Any error output should be
visible above. Please fix these errors and try again.
==> k8s-01: The previous process exited with exit code 1.

@hoatle
Copy link
Member Author

hoatle commented Nov 21, 2018

the root cause if the conflict of the generated inventory file which is shared between 2 ansible provisioners.

The current workaround: re-generate the inventory file for each provisioner run by using pip mode install and install the latest version.

The expected proper fix: don't re-install ansible every time, one-time installation of ansible is enough for guest mode.

@hoatle
Copy link
Member Author

hoatle commented Nov 21, 2018

I'm going to push the workaround first, @hieptranquoc needs to continue with the proper fix.

@hoatle hoatle assigned hoatle and unassigned hieptranquoc Nov 21, 2018
hoatle added a commit to hoatle/teracy-dev-entry-k8s that referenced this issue Nov 21, 2018
@hoatle
Copy link
Member Author

hoatle commented Nov 21, 2018

the current workaround:

  • pip install mode for both ansible provisioners
  • set latest version for the latter provisioner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants