Installation/OS Specific Notes/Installing Amanda on NetBSD

From wiki.zmanda.com
Revision as of 13:28, 29 June 2010 by Poli (talk | contribs) (Initial NetBSD building notes: the IPv6 issue.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

NetBSD Building Notes

With the introduction of IPv6 in Amanda, a problem has arisen in some, if not all, NetBSD installations with IPv6 support.

With Amanda 3.1.0, after a successful compilation and installation, amdump may fail to execute if a holding disk is defined.

The problem comes from the fact that, in the default IPv6 compilation of 3.1.0, the chunker component will listen on IPv4, but dumper will try to connect to the IPv6 address, resulting in a timeout (after a default 5 minutes wait for 3 consecutive times) and a backup error.

Removing the holding disk configuration option will result in a good execution of amdump, as the dumper/chunker interface is probably not used.

The most obvious solution to this issue is to use the --without-ipv6 configure option.

./configure --without-ipv6

Or to patch common-src/util.c with the following:

# diff -Naur common-src/util.c.orig common-src/util.c
--- common-src/util.c.orig      2010-06-20 20:36:02.000000000 -0300
+++ common-src/util.c   2010-06-20 20:36:25.000000000 -0300
@@ -1063,14 +1063,9 @@
 #endif

     memset(&hints, 0, sizeof(hints));
-#ifdef WORKING_IPV6
-    /* get any kind of addresss */
-    hints.ai_family = AF_UNSPEC;
-#else
     /* even if getaddrinfo supports IPv6, don't let it return
      * such an address */
     hints.ai_family = AF_INET;
-#endif
     hints.ai_flags = flags;
     hints.ai_socktype = socktype;
     result = getaddrinfo(hostname, NULL, &hints, &myres);