diff mbox

[OSSTEST,v11,18/20] ts-logs-capture: Capture OpenStack logs

Message ID 20170616175704.7832-19-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anthony PERARD June 16, 2017, 5:57 p.m. UTC
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 ts-logs-capture | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Ian Jackson June 23, 2017, 1:49 p.m. UTC | #1
Anthony PERARD writes ("[OSSTEST PATCH v11 18/20] ts-logs-capture: Capture OpenStack logs"):
> +                  /var/log/openstack/*.log
> +                  /etc/nova/*
> +                  /etc/neutron/*
> +                  /etc/cinder/*

This is fine:

> +                  /home/osstest/build.*.test-*-devstack/tempest/etc/tempest.conf

This is not fine.  If a build host is shared, it will collect all the
logs from all of the builds.

I think build ts-* scripts ought to collect their own logs.

Ian.
Anthony PERARD June 23, 2017, 3:31 p.m. UTC | #2
On Fri, Jun 23, 2017 at 02:49:11PM +0100, Ian Jackson wrote:
> Anthony PERARD writes ("[OSSTEST PATCH v11 18/20] ts-logs-capture: Capture OpenStack logs"):
> > +                  /var/log/openstack/*.log
> > +                  /etc/nova/*
> > +                  /etc/neutron/*
> > +                  /etc/cinder/*
> 
> This is fine:
> 
> > +                  /home/osstest/build.*.test-*-devstack/tempest/etc/tempest.conf
> 
> This is not fine.  If a build host is shared, it will collect all the
> logs from all of the builds.

This file should not exist on a build host, as it would be created by
ts-openstack-deploy which I hope is not run on a build host.

We are only using using target_jobdir() to have a directory to clone all
the OpenStack repo and run ./devstack.

But I can find a way to copy this file somewhere else.

> I think build ts-* scripts ought to collect their own logs.

Do you mean I can capture logs like ts-logs-capture would do, but before
it is been run?

ts-openstack-deploy could collect all the configuration file then, like
/etc/nova/*.
Ian Jackson June 23, 2017, 3:42 p.m. UTC | #3
Anthony PERARD writes ("Re: [OSSTEST PATCH v11 18/20] ts-logs-capture: Capture OpenStack logs"):
> On Fri, Jun 23, 2017 at 02:49:11PM +0100, Ian Jackson wrote:
> > This is not fine.  If a build host is shared, it will collect all the
> > logs from all of the builds.
> 
> This file should not exist on a build host, as it would be created by
> ts-openstack-deploy which I hope is not run on a build host.

Ah.  Sorry.  I think I got confused.

In the future even test hosts might be shared sequentially by
different jobs but I think given what your ts-openstack-deploy does,
we can't make that true for these jobs.

> We are only using using target_jobdir() to have a directory to clone all
> the OpenStack repo and run ./devstack.

Aha.

> But I can find a way to copy this file somewhere else.

I now see that you have an openstack-tempest-test-specific filename so
it is fine to try to collect this file in all jobs.

> > I think build ts-* scripts ought to collect their own logs.
> 
> Do you mean I can capture logs like ts-logs-capture would do, but before
> it is been run?
> 
> ts-openstack-deploy could collect all the configuration file then, like
> /etc/nova/*.

I'm sorry, forget what I said about build ts-* scripts.


So, the upshot is:

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

and sorry for not paying proper attention.

Ian.
diff mbox

Patch

diff --git a/ts-logs-capture b/ts-logs-capture
index 061a118..0e3d267 100755
--- a/ts-logs-capture
+++ b/ts-logs-capture
@@ -171,6 +171,12 @@  sub fetch_logs_host () {
 
                   /var/core/*.core
 
+                  /var/log/openstack/*.log
+                  /etc/nova/*
+                  /etc/neutron/*
+                  /etc/cinder/*
+                  /home/osstest/build.*.test-*-devstack/tempest/etc/tempest.conf
+
                   )];
     if (!try_fetch_logs($ho, $logs)) {
         logm("log fetching failed, trying hard host reboot...");