ddutt / cloud-native-data-center-networking

Code repository for the O'Reilly book 'Cloud Native Data Center Networking'
GNU General Public License v2.0
167 stars 42 forks source link

Unclear playbook messages #1

Closed SPYFF closed 4 years ago

SPYFF commented 4 years ago

Hi! I'm very excited to experiment with this setup but unfortunately I faced with an ansible error at the very beginning. The vagrant up command works well and even the dummy.yml playbook run well on all host. I wanted to work with a subset of nodes (leafs+spines+servers, no edges, internet or firewall). Then the ansible-playbook -b deploy.yml at the evpn folder give me the output below:

 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] **********************************************************************************************************************************************

TASK [Check that the scenario is a valid one] *****************************************************************************************************************
ok: [localhost] => {
    "changed": false,
    "msg": "All assertions passed"
}

PLAY [all] ****************************************************************************************************************************************************
skipping: no hosts matched
 [WARNING]: Could not match supplied host pattern, ignoring: network

PLAY [network] ************************************************************************************************************************************************
skipping: no hosts matched
 [WARNING]: Could not match supplied host pattern, ignoring: servers

PLAY [servers] ************************************************************************************************************************************************
skipping: no hosts matched

After that, if I ssh into leaf01 for example, there are no working FRR daemon, vtysh fails to open. I got the following logs:

vagrant@leaf01:~$ sudo cat /var/log/frr/frr.log 
2019-12-25T21:29:45.050478+00:00 cumulus frr[1979]: Loading capability module if not yet done.
2019-12-25T21:29:45.081096+00:00 cumulus frr[1979]: Starting Frr daemons (prio:10):.
2019-12-25T21:29:45.457553+00:00 cumulus frr[1979]: Exiting: failed to connect to any daemons.
2019-12-25T21:29:45.464037+00:00 cumulus frr[1979]: Exiting from the script
2019-12-25T21:29:45.521550+00:00 cumulus frr[2001]: Stopping Frr monitor daemon: (watchfrr).
2019-12-25T21:29:45.585789+00:00 cumulus frr[2001]: Stopping Frr daemons (prio:0): (zebra) (bgpd) (ripd) (ripngd) (ospfd) (ospf6d) (isisd) (babeld) (pimd) (ldpd) (nhrpd) (eigrpd) (sharpd) (pbrd) (vrrpd).
2019-12-25T21:29:45.608464+00:00 cumulus frr[2001]: Stopping other frr daemons..
2019-12-25T21:29:45.613493+00:00 cumulus frr[2001]: Removing remaining .vty files.
2019-12-25T21:29:45.613992+00:00 cumulus frr[2001]: Removing all routes made by FRR.
2019-12-25T21:29:45.665313+00:00 cumulus frr[2001]: Exiting from the script

I'm not sure if I did something wrong or there are some misconfiguration in my setup. I use Ubuntu 19.10, Vagrant and KVM libvirt installed from the Ubuntu repos.

SPYFF commented 4 years ago

Sorry it was my mistake, apologize. I started the vagrant up with sudo therefore the ansible inventory .vagrant/provisioners/ansible/inventory created with root access only. The ansible try to open the file, but instead of permission error, it finds the file empty and skip all running hosts.

The simple solution was run the ansible with sudo.