infraly / k8s-on-openstack

An opinionated way to deploy a Kubernetes cluster on top of an OpenStack cloud.
Apache License 2.0
112 stars 48 forks source link

Name of external network should not be hardcoded. #17

Closed armaan closed 6 years ago

armaan commented 6 years ago

In my environment, name of external network is ext-net.

 ansible-playbook site.yaml
[DEPRECATION WARNING]: [defaults]hostfile option, The key is misleading as it can also be a list of hosts, a directory or a list of paths . This feature will be removed in version 2.8. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
 [WARNING]: Could not match supplied host pattern, ignoring: all

 [WARNING]: provided hosts list is empty, only localhost is available

PLAY [Launch k8s master] ***********************************************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************************************************
Wednesday 21 March 2018  12:48:17 +0000 (0:00:00.035)       0:00:00.035 *******
ok: [localhost]

TASK [create network] **************************************************************************************************************************************************************************************
Wednesday 21 March 2018  12:48:17 +0000 (0:00:00.412)       0:00:00.448 *******
changed: [localhost]

TASK [create subnet] ***************************************************************************************************************************************************************************************
Wednesday 21 March 2018  12:48:23 +0000 (0:00:05.892)       0:00:06.340 *******
changed: [localhost]

TASK [create router] ***************************************************************************************************************************************************************************************
Wednesday 21 March 2018  12:48:35 +0000 (0:00:12.273)       0:00:18.614 *******
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "network public not found"}
    to retry, use: --limit @/root/k8s-on-openstack/site.retry

PLAY RECAP *************************************************************************************************************************************************************************************************
localhost                  : ok=3    changed=2    unreachable=0    failed=1

Wednesday 21 March 2018  12:48:38 +0000 (0:00:02.501)       0:00:21.115 *******
===============================================================================
create subnet -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 12.27s
create network -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 5.89s
create router --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 2.50s
Gathering Facts ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.41s
ctrlaltdel commented 6 years ago

The latest version now supports a new EXTERNAL_NETWORK environnement variable which will allow other network names. Please tell me how it goes?

armaan commented 6 years ago

Thank you for the fix! I will provide the feedback after trying this again next week. Cheers!