osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tripleo][openstack-ansible] Integrating ansible-role-collect-logs in OSA


On Fri, 2019-06-28 at 16:30 +0530, Chandan kumar wrote:
> With os_tempest project, TripleO and Openstack Ansible projects
> started collaborating together to reuse the tools
> developed by each other to avoid duplicates and enable more
> collaboration.

... And that's amazing!

> In TripleO, we have ansible-role-collect-logs[1.] role for the same
> and in OSA we have logs_collect.sh[2.] script for
> the same. But once the logs gets collected at each other projects, It
> is very hard to navigate and find out where
> is the respective files.

Agreed.

> By Keeping the same structure at all places
> It would be easier.

Agreed again

> So moving ahead what we are going to do:
> * Refactor collect-logs role to pass defaults list of files at one
> place

It seems the role is doing a lot of things, but things can be
conditionally triggered. Wondering if this role shouldn't be split into
multiple roles... But that's a different story.

> * Pass the list of different logs files based on deployment tools

I think this doesn't need to be in the role. Make the role the simplest
as possible, and flexible enough to get passed the list of things to
log/not log, and the destination. OSA can pass a list of files it wants
to gather. But isn't that what the role already does? Or did I
misunderstood? 

> * Put system/containers related commands at one place

Can we simply rely on ansible inventory, and running a play with the
role (targetting all) would gather logs for all systems (aio,
multinodes, containers), each system
could go into their own directory (log folder would be <something>/{{
inventory_hostname }}/...) for example: 

aio1/<files gathered>
aio1-nova/<files gathered>
machine2/<files gathered>

It simple enough. But I am happy to see a different approach.

> * Replace the collect_logs.sh script with playbook in OSA and replace
> it.

:thumbsup:

> Thanks for reading, We are looking for the comments on the above
> suggestion.

Thanks for tackling that up!
I am looking forward a simple common file gathering :)

If you need to do changes in the role (to implement new features),
maybe it can help you if I give you a prio list :)

What I am _generally_ looking for in the logs:
- The ara reports
- The tempest report
- The /etc/openstack_deploy/
- The /var/log/ for containers/hosts

What I am _sometimes_ looking for in the logs (so less important/more
contextual for me):
- ram/disk usage per host
- NICs details
- cpu features (but I am not sure we really need this anymore)
- host details (generally zuul does that for me, so no need to
implement something there)

Regards,
Jean-Philippe Evrard (evrardjp)