[ansible-project] Re: OpenStack Dynamic Inventory Question

2016-03-18 Thread Monty Taylor
There are two things you should try to help us track down the problem, if 
you don't mind.

First of all:

openstack server list

(python-openstackclient also uses occ, so that should let us know that the 
config is working right)

If that works and you see the servers, my _hunch_ is that ansible cannot 
figure out the interface_ip of your server, which means our introspection 
code is making an assumption. So if you can try making a copy of 
openstack.py and editing it - find this:

if 'interface_ip' not in server:
continue

and delete it

If openstack.py --list _works_ at that point, I'd really love if you'd be 
kind enough to send me a copy of the output of at least one of the servers 
so I can see what's going on with your addresses list. (there should be 
nothing in the output that would be compromosing, but you migth want to 
scan it - feel free to send the entire output or just one server. OR - if 
you don't want to do that, I can cook up some more code snippets for you to 
try to diagnose further.

thanks!

On Wednesday, March 9, 2016 at 2:27:33 PM UTC-6, Mike Albert wrote:
>
> Hi,
>
> I'm trying to configure OpenStack dynamic inventory with Ansible, but I 
> keep getting the following error:
>
> mikealbert@rmbp lab (master) $ ./openstack.py --list
> Error fetching server list on envvars:Region1:
>
> I've defined the variables below in my .bash_profile and I've confirmed 
> that "nova list" returns results
>
> OS_REGION_NAME
> OS_PASSWORD
> OS_AUTH_URL
> OS_USERNAME
> OS_TENANT_NAME
>
> Not sure if it makes a difference but I'm running Ansible 2.0.1.0.
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ed1849c4-a9eb-4986-a300-778c8d51f502%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: os_volume 404 error

2015-09-20 Thread Monty Taylor
Everything Shrews says is correct - I would love an account - and we can 
add a metacloud profile to os-client-config too. I'm sure you're not doing 
anything too crazy - it turns out that the number of ways all this can 
combine are large - we have all sorts of logic already to handle "normal" 
behavior. I'm sure we'll just find another nugger of normal :)

On Sunday, September 20, 2015 at 7:32:22 PM UTC-4, David Shrewsbury wrote:
>
> Accounts would be most helpful and appreciated. Myself and Monty Taylor do 
> most of the Ansible and
> shade development, so if we could both get access, that would go a long 
> way to improving the modules
> for you. Please email me off-list to let me know what you need from us to 
> make that happen.
>
> -Dave
>
>
> On Friday, September 18, 2015 at 5:26:44 PM UTC-4, vallard wrote:
>>
>> Ah, thanks for the info on the security group stuff.  I'll try that out.  
>> I'm happy to let someone have a metacloud account to test things with.  
>>
>> On Fri, Sep 18, 2015 at 10:23 AM, David Shrewsbury <shrewsb...@gmail.com> 
>> wrote:
>>
>>> Sorry you're having issues. Sounds like metacloud is doing something we 
>>> don't expect with
>>> their endpoints since you are having the same problem. This is difficult 
>>> to debug without a
>>> metacloud account.
>>>
>>> Your solution to the image service problem was to add code to remove the 
>>> "/v1". Does that
>>> solution also fix the problem with the volume service?
>>>
>>> As for security groups, in your clouds.yaml (which I assume you are 
>>> using?), you will need
>>> to set 'secgroup_source' to 'nova'. It defaults to using neutron.
>>>
>>> -Dave
>>>
>>>
>>> On Friday, September 18, 2015 at 9:51:24 AM UTC-4, vallard wrote:
>>>>
>>>> Having the same problem with os_volume that I had with glance images 
>>>> where I get a 404 error.  
>>>>
>>>> - Ansible 2.0 playbook: 
>>>>
>>>>  - name: ensure there is a volume for storing data. 
>>>> os_volume: 
>>>>   size: 40
>>>>   display_name: lab_volume
>>>> register: vol 
>>>>
>>>> Error message: 
>>>> fatal: [localhost]: FAILED! => {"changed": false, "failed": true, 
>>>> "msg": "Error fetching volume list: Not Found (HTTP 404)"}
>>>>
>>>> When I got an error like this with glance, I had to go in and modify 
>>>> some code in the shade library.  I made sure I put the shade library back 
>>>> to what it was before so it shouldn't be the issue here.  
>>>>
>>>> My OpenStack (metacloud) uses v1 APIs of cinder.  
>>>>
>>>> The other issue, somewhat related is using the security_groups found in 
>>>> 2.0.  Those don't work with my openstack environment either because they 
>>>> require neutron.  No neutron in my environment.  
>>>>
>>> -- 
>>> 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/FwZthkNjlWA/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to 
>>> ansible-proje...@googlegroups.com.
>>> To post to this group, send email to ansible...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/ansible-project/b1f2f593-bf38-4979-809c-f3d3d33fa9c6%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/ansible-project/b1f2f593-bf38-4979-809c-f3d3d33fa9c6%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>> Vallard
>> http://benincosa.com
>>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/870fddfb-bdc9-4eb2-8115-d34330664c94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: Ansible 2.0 os_server 404 image not found

2015-09-04 Thread Monty Taylor
Sorry for your troubles. The problem is almost certianly in the v1/v2 
version detection. I think we can do better for you here. However, in the 
mean time - would you mind trying something to test a hypothesis?

Make a ~/.config/openstack/clouds.yaml with:

clouds:
  metacloud:
auth:
  username: your-user
  password: your-password
  project_name: your-project-name
  auth_url: your-auth-url
image_api_version: '1'

And then put "cloud: metacloud" in your playbook and see if it works?

Figuring out v1 vs. v2 in glance is _hard_ and complex and very prone to 
breaking, which is why it's one of the tings we put in known-cloud profiles 
in os-client-config.

Now - if that works, awesome. It still sucks as a user experience for you - 
so I think we need to make sure we can plumb api version overrides through 
sanely in playbooks. Also - I'm going to go poke the metacloud folks about 
getting me a metacloud so that I can add a metacloud profile to occ.

Also - I'll see if I can reproduce and find another workaround/detection in 
case all of the above don't work.

  

On Friday, September 4, 2015 at 12:10:39 PM UTC-4, V Benincosa wrote:
>
> I've done some more debugging on this and it looks like shade is putting 
> an extra v1 in the URL so it looks like: 
>
> http://some.client.metacloud.net:9292/v1/v1/images/detail?limit=20
>
> I ended up changing the glanceclient/v1/images.py by removing all the v1s. 
>  This solved the ansible problem, but now the command line doesn't work 
> even though ansible does (e.g: glance image-list doesn't work).  I'll start 
> digging into the shade implementation to see where this extra v1 is being 
> added.  Would love any help.  
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b8dfacbf-970a-4ddd-8a0f-9f17dbd70b02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: os_server module

2015-08-28 Thread Monty Taylor
Yeah - if you're v3 passing in domain is important. When you add 
user_domain_id and project_domain_id - what error do you get? (you have to 
pass in both)

On Friday, August 28, 2015 at 12:19:16 AM UTC-7, Antoine Voiry wrote:

 All,
 I am facing something strange with the OS_SERVER module.
 Also I was not able to specify the domain in auth.
 Below is the code snipet
 - os_server:
   state: present
   auth:
  auth_url: https:///v3.0/
  username: 
  password: 
  project_name: 
   name: test_instance
   availability_zone: AZ0
   image: Ubuntu 14.04 trusty 64
   key_name: workstation
   timeout: 200
   flavor: m1.medium
   security_groups: default
   validate_certs: no
   auto_floating_ip: yes


 fatal: [localhost]: FAILED! = {changed: false, extra_data: null, 
 failed:true, msg: Error fetching server list: Error getting compute 
 endpoint: The resource could not be found. (HTTP 404)}


-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9e6ab74d-46af-49d1-8db4-c7ead8019803%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.