Re: [Linux-ha-dev] incorrect diff of sysinfo.txt

2010-09-22 Thread Dejan Muhamedagic
Hi,

On Wed, Sep 22, 2010 at 12:50:53PM +0200, Raoul Bhatia [IPAX] wrote:
 running debian 5.0.6 and cluster-glue 1.0.6-1~bpo50+1, hb_report's
 analysis.txt shows:
 
  Diff sysinfo.txt... --- /root/move_ftp_group/wc01/sysinfo.txt   
  2010-09-22 12:17:21.0 +0200
  +++ /root/move_ftp_group/wc02/sysinfo.txt   2010-09-22 12:17:21.0 
  +0200
  @@ -2,7 +2,7 @@
   cluster-glue: 1.0.6 (1c87a0c58c59fc384b93ec11476cefdbb6ddc1e1)
   resource-agents: # Build version: 5ae70412eec8099b25e352110596dd279d267a8a
   CRM Version: 1.0.9 (74392a28b7f31d7ddc86689598bd23114f58978b)
  - 1.0.9.1+hg15626-1~bpo50+1   1.2.1-1~bpo50+1 1.0.6-1~bpo50+1  
  1:3.0.3-2~bpo50+1  1:3.0.3-2~bpo50+1   2.02.39-8Platform: Linux
  + 1.0.9.1+hg15626-1~bpo50+1   1.2.1-1~bpo50+1 1.0.6-1~bpo50+1  
  1:3.0.3-2~bpo50+1  1:3.0.3-2~bpo50+1   2.02.39-8 Platform: Linux
   Kernel release: 2.6.27.54+ipax
   Architecture: x86_64
   Distribution: Description: Debian GNU/Linux 5.0.6 (lenny)
 
 
 there is one space missing before Platform: Linux.
 
 i do not know where this difference comes from, but what about
 using diff -wu instead of diff -u in txtdiff() ?

We could try that, but better fixing the actual output. It seems
like part of the output of crmd version (perhaps others too) goes
to stderr which is then mixed randomly with the stdout material.

Andrew:

fprintf(stderr, CRM Version: );
fprintf(stdout, %s (%s)\n, VERSION, BUILD_VERSION);

Is that intentional?

Thanks,

Dejan

 thanks,
 raoul
 -- 
 
 DI (FH) Raoul Bhatia M.Sc.  email.  r.bha...@ipax.at
 Technischer Leiter
 
 IPAX - Aloy Bhatia Hava OG  web.  http://www.ipax.at
 Barawitzkagasse 10/2/2/11   email.off...@ipax.at
 1190 Wien   tel.   +43 1 3670030
 FN 277995t HG Wien  fax.+43 1 3670030 15
 
 ___
 Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
 http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
 Home Page: http://linux-ha.org/
___
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


Re: [Linux-ha-dev] incorrect diff of sysinfo.txt

2010-09-22 Thread Andrew Beekhof
On Wed, Sep 22, 2010 at 4:07 PM, Dejan Muhamedagic deja...@fastmail.fm wrote:
 Hi,

 On Wed, Sep 22, 2010 at 12:50:53PM +0200, Raoul Bhatia [IPAX] wrote:
 running debian 5.0.6 and cluster-glue 1.0.6-1~bpo50+1, hb_report's
 analysis.txt shows:

  Diff sysinfo.txt... --- /root/move_ftp_group/wc01/sysinfo.txt       
  2010-09-22 12:17:21.0 +0200
  +++ /root/move_ftp_group/wc02/sysinfo.txt   2010-09-22 12:17:21.0 
  +0200
  @@ -2,7 +2,7 @@
   cluster-glue: 1.0.6 (1c87a0c58c59fc384b93ec11476cefdbb6ddc1e1)
   resource-agents: # Build version: 5ae70412eec8099b25e352110596dd279d267a8a
   CRM Version: 1.0.9 (74392a28b7f31d7ddc86689598bd23114f58978b)
  - 1.0.9.1+hg15626-1~bpo50+1   1.2.1-1~bpo50+1 1.0.6-1~bpo50+1  
  1:3.0.3-2~bpo50+1  1:3.0.3-2~bpo50+1   2.02.39-8Platform: Linux
  + 1.0.9.1+hg15626-1~bpo50+1   1.2.1-1~bpo50+1 1.0.6-1~bpo50+1  
  1:3.0.3-2~bpo50+1  1:3.0.3-2~bpo50+1   2.02.39-8 Platform: Linux
   Kernel release: 2.6.27.54+ipax
   Architecture: x86_64
   Distribution: Description: Debian GNU/Linux 5.0.6 (lenny)


 there is one space missing before Platform: Linux.

 i do not know where this difference comes from, but what about
 using diff -wu instead of diff -u in txtdiff() ?

 We could try that, but better fixing the actual output. It seems
 like part of the output of crmd version (perhaps others too) goes
 to stderr which is then mixed randomly with the stdout material.

 Andrew:

        fprintf(stderr, CRM Version: );
                fprintf(stdout, %s (%s)\n, VERSION, BUILD_VERSION);

 Is that intentional?

I probably had some notion of allowing just the version to be captured
in a shell variable.
Happy if you want to change to to stdout instead.
___
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/