[openstack-dev] [olso] olso incubator logging issues

Daniel P. Berrange berrange at redhat.com
Wed Jul 9 11:47:38 UTC 2014


On Mon, Jun 30, 2014 at 09:00:52AM -0400, Sean Dague wrote:
> Every time I crack open a nova logs in detail, at least 2 new olso
> incubator log issues have been introduced.
> 
> The current ones is clearly someone is over exploding arrays, as we're
> getting things like:
> 2014-06-29 13:36:41.403 19459 DEBUG nova.openstack.common.processutils
> [-] Running cmd (subprocess): [ ' e n v ' ,   ' L C _ A L L = C ' ,   '
> L A N G = C ' ,   ' q e m u - i m g ' ,   ' i n f o ' ,   ' / o p t / s
> t a c k / d a t a / n o v a / i n s t a n c e s / e f f 7 3 1 3 a - 1 1
> b 2 - 4 0 2 b - 9 c c d - 6 5 7 8 c b 8 7 9 2 d b / d i s k ' ] execute
> /opt/stack/new/nova/nova/openstack/common/processutils.py:160
> 
> (yes all those spaces are in there, which now effectively inhibits search).

Yeah, I saw that last week and already sent a fix to oslo for that which
is merged, so projects need to re-sync to oslo, or cherry pick this:

  commit 33afb20cc0e6790ae82e1bfe211d47f34c22ff91
  Author: Daniel P. Berrange <berrange at redhat.com>
  Date:   Mon Jun 30 16:25:01 2014 +0100

    Fix broken formatting of processutils.execute log statement
    
    The processutils.execute function will log a message about
    each command it runs which looks like this:
    
       Running cmd (subprocess): /bin/echo hello world
    
    In the following commit:
    
      commit cdcc19c1d78a4a88daabfb64b27abd4924aa442d
      Author: Brad Pokorny <bpokorny at us.ibm.com>
      Date:   Sun May 18 18:26:33 2014 +0000
    
        Mask passwords that are included in commands
    
    The command is passthrough through logging.mask_password
    first. Unfortunately this method expects a string as its
    parameter, but is given a list of strings instead. This
    causes it to stringify the list object. The result is that
    the log message ends up being mangled to look like this:
    
       Running cmd (subprocess): [ ' / b i n / e c h o ' ,
       ' h e l l o   w o r l d ' ]
    
    The execute method should have been masking the password
    after turning the list of strings into a single string,
    instead of before.
    
    Change-Id: I994a3449a6a88e7ba1dd24b1e65183c018e4c3a3

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



More information about the OpenStack-dev mailing list