netcat help output in error log when running xtrabackup SST

Bug #1625968 reported by Hartmut Holzgraefe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Fix Released
Low
Kenn Takara

Bug Description

The feature check for "ncat" only works on CentOS 7, on other distributions it leads to full netcat help output being written to the error log instead.

This is due to the nc version in CentOS 7 writing help output to stdout, while the version in CentOS 6, and in Ubuntu 16.04, write to stderr instead.

Redirecting stderr to stdout with 2>&1 should make the check work for all versions of netcat:

  if nc -h 2>&1 | grep -q ncat;then

instead of current

  if nc -h | grep -q ncat;then

The feature check for "ncat" only works on CentOS 7, on other distributions it leads to full netcat help output being written to the error log instead.

This is due to the nc version in CentOS 7 writing help output to stdout, while the version in CentOS 6, and in Ubuntu 16.04, write to stderr instead.

Revision history for this message
Hartmut Holzgraefe (hartmut-php) wrote :
Revision history for this message
Krunal Bauskar (krunal-bauskar) wrote :

commit 98359947f842d410e1fcceb63c2a359deae48e89
Author: Kenn Takara <email address hidden>
Date: Mon Nov 7 20:32:04 2016 -1000

    Fix PXC-716 : netcat help output in error log when running xtrabackup SST

    Issue:
    Some versions of netcat write the info to stderr rather than just to stdout.

    Solution:
    Redirect stderr to stdout also (use '2>&1')

Changed in percona-xtradb-cluster:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Kenn Takara (kenn-takara)
Changed in percona-xtradb-cluster:
milestone: none → 5.6.34-26.19
Changed in percona-xtradb-cluster:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-716

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.