You specify a different endpoint type when deleting the network (internal)
for
some reason. Try removing that. I don't know what cloud provider you are
using
so I'm not sure how they have their endpoints setup.
Also, have you tried simplifying the issue with a smaller playbook? Try one
that simply creates a network then immediately deletes it.
On Monday, January 11, 2016 at 3:38:18 PM UTC-5, R Melton wrote:
>
> My playbook will create an OpenStack (Kilo) compute node and then run a
> minimal self test on the new compute node. The os_network error is
> happening in the 'os_test' role in the playbook. The self test will
> 1. create neutron network and subnet
> 2. start new VM instance
> 3. list running VMs
> 4. remove/delete the VM
> 5.delete the subnet and network
>
> attachments:
> 1. i set ANSIBLE_KEEP_REMOTE_FILES=1 and the os_network script was saved
> on the target. I
> have attached the os_network script which was generated by ansible. I
> notice that when I run this script
> manually on the target, it seems to complete correctly and the openstack
> network is deleted.
> Here is the output when i run the os_network manually:
> ./os_network
> {"invocation": {"auth_type": null, "timeout": 200, "name": "mynetwork",
> "admin_state_up": true, "verify": true, "api_timeout": null, "state":
> "absent", "auth": {"username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
> "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "auth_url":
> "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "user_domain_id":
> "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "project_domain_id":
> "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER"}, "cacert": null, "cert": null,
> "endpoint_type": "internal", "external": false, "key": null,
> "availability_zone": null, "shared": false, "wait": true, "cloud": null,
> "region_name": null}, "changed": true}
>
>
>
> 2. i attached the playbook 'compute_playbook.yml'; the error is happening
> in the 'os_test' role.
>
> 3. i attached the main.yml task list for the os_test role. The error is
> happening on the 'remove network task' within this task list. Just focus on
> what is happening in this task list and don't worry about the whole
> playbook.
>
>
> If you could help me know why the os_network script is failing (see red
> error msg above) to delete
> the network, that would be great.
>
> Thanks,
> Rod
>
>
>
> On Tue, Jan 5, 2016 at 11:06 AM, David Shrewsbury <[email protected]
> <javascript:>> wrote:
>
>> Hi Rod,
>>
>> On Monday, January 4, 2016 at 12:35:42 PM UTC-5, R Melton wrote:
>>>
>>>
>>> I am using Ansible version ansible 2.1.0 (devel 0c013f592a) last updated
>>> 2015/12/21 14:26:10 (GMT -700)
>>> I am using Ubuntu on 14.04 on the target system with OpenStack *Kilo *
>>> release.
>>> i am using the Ansible os_network module which is described here:
>>> http://goo.gl/UhzIWl
>>>
>>> I can create openstack network (using os_network), subnet and start
>>> virtual machine using Ansible os_ modules.
>>> I can delete the virtual machine (using os_server) and subnet using
>>> os_network but when I try to delete the network
>>> with os_network, I get 'service catalog is empty' error. Here is the
>>> task and error message:
>>> - name: remove network
>>> become: no
>>> os_network:
>>> name: mynetwork
>>> state: absent
>>> endpoint_type: internal
>>> timeout: 200
>>> wait: yes
>>> auth:
>>> auth_url: "{{ os_auth_url }}"
>>> project_domain_id: "{{ os_project_domain_id }}"
>>> user_domain_id: "{{ os_user_domain_id }}"
>>> username: "{{ os_username }}"
>>> password: "{{ os_password }}"
>>> register: mynet_results
>>>
>>> TASK [os_test : remove network]
>>> ************************************************
>>> fatal: [3.0.0.10]: FAILED! => {"changed": false, "failed": true, "msg":
>>> "Error fetching network list: The service catalog is empty."}
>>>
>>
>>
>> That is a REALLY strange error. I honestly cannot imagine a scenario that
>> would cause that.
>>
>>
>>
>>>
>>> I can create and delete networks using openstack CLI (or Horizon) and it
>>> works correctly.
>>> I have tried various values for the os_network endpoint_type and get
>>> same error.
>>> All OpenStack neutron commands work correctly at the command line.
>>> Any idea *why I cannot delete the OpenStack network* (with os_network)
>>> which I have just created?
>>>
>>> thanks,
>>> Rod
>>>
>>
>>
>> I have no idea what could cause that problem. Can you provide some more
>> details that might
>> help us debug this? Can we see the playbook that reproduces this (this
>> simpler the better)?
>> What cloud provider are you using?
>>
>> -Dave
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Ansible Project" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/ansible-project/TE80AyaO1Vc/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/40b55510-ad9a-4356-8819-80e2b7b26a51%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/ansible-project/40b55510-ad9a-4356-8819-80e2b7b26a51%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5cc0047c-b464-444b-ba83-2dd702cec610%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.