Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13758

Galera with rsync on FreeBSD broken

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.2.7
    • N/A
    • None
    • FreeBSD 10.3-STABLE, MariaDB running inside of a dedicated jail with no other changes/packages

    Description

      The FreeBSD specific patch for rsync Galera SST doesn't work.

      https://github.com/MariaDB/server/commit/cf1b0c1ace3584fcd807e0643d30956baa5de2c2#diff-ce1fe90d058fac6e05405aced56e6f83

      local port_info=$(netstat -46lp $\{rsync_port\} 2>/dev/null | \
      grep ":$\{rsync_port\}")
      

      netstat -p on FreeBSD is for protocol, not port number or program/PID. This command always results in the following error message being sent to /dev/null

      netstat: 4444: unknown or uninstrumented protocol

      From man:

           -f	address_family,	-p protocol
      	   Limit display to those records of the specified address_family or a
      	   single protocol.  The following address families and	protocols are
      	   recognized:
       
      	   Family		       Protocols
      	   inet	(AF_INET)	       divert, icmp, igmp, ip, ipsec, pim,
      				       sctp, tcp, udp
      	   inet6 (AF_INET6)	       icmp6, ip6, ipsec6, rip6, tcp, udp
      	   pfkey (PF_KEY)	       pfkey
      	   netgraph, ng	(AF_NETGRAPH)  ctrl, data
      	   unix	(AF_UNIX)
      	   link	(AF_LINK)
       
      	   The program will complain if	protocol is unknown or if there	is no
      	   statistics routine for it.
      

      Additionally, specifying both -4 and -6 at the same time doesn't work. The latter will overwrite the former. If it is specified as netstat -46, only IPv6 is used. If it is specified as netstat -64, only IPv4 is used.

      One other note: there is no mention in the FreeBSD man page of netstat being able to return PID at all, which is the whole point of this call to begin with. Searching around online, everyone is suggesting using lsof to get this information, which is exactly what was happening BEFORE this broken OS specific patch was applied.

      Attachments

        Issue Links

          Activity

            People

              anikitin Andrii Nikitin (Inactive)
              darkain Vincent Milum Jr
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.