kubespray / kubespray-cli

Easy to use command line tool for kubernetes deployment with kubespray
GNU General Public License v3.0
253 stars 65 forks source link

kargo openstack fails when setting a cluster-name #64

Open pcm32 opened 7 years ago

pcm32 commented 7 years ago

Invoking

kargo openstack --nodes 3 --cluster-name k8s-phenomenal

fails trying to use a security group name that doesn't exist:

CLONING KARGO GIT REPO *********************************************************
Cloning into '/home/ubuntu/.kargo'...
kargo repo cloned
Create 3 instances on openstack ? [Y/n] Y

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

TASK [Create security group] ***************************************************
changed: [localhost]

TASK [Add security rules] ******************************************************
changed: [localhost] => (item=tcp)
changed: [localhost] => (item=udp)
changed: [localhost] => (item=icmp)

TASK [Create nodes network ports] **********************************************
failed: [localhost] (item=k8s-phenomenal-ootp8f) => {"failed": true, "item": "k8s-phenomenal-ootp8f", "msg": "Security group: k8s-phenomenal-69k17f, was not found"}
failed: [localhost] (item=k8s-phenomenal-ystmto) => {"failed": true, "item": "k8s-phenomenal-ystmto", "msg": "Security group: k8s-phenomenal-69k17f, was not found"}
failed: [localhost] (item=k8s-phenomenal-k2f8sf) => {"failed": true, "item": "k8s-phenomenal-k2f8sf", "msg": "Security group: k8s-phenomenal-69k17f, was not found"}

NO MORE HOSTS LEFT *************************************************************
    to retry, use: --limit @/home/ubuntu/.kargo/local.retry

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

When running without --cluster-name it works fine.

jianzj commented 6 years ago

I did some code change for this issue , feel free to let me know anything that I could improve . https://github.com/kubespray/kubespray-cli/pull/104

jianzj commented 6 years ago

As PR is merge, I think this issue should be fixed . Feel free to test and check