From owner-freebsd-current@FreeBSD.ORG Tue Feb 21 01:56:34 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB0AC16A423 for ; Tue, 21 Feb 2006 01:56:33 +0000 (GMT) (envelope-from wilkinsa@squash.dsto.defence.gov.au) Received: from digger1.defence.gov.au (digger1.defence.gov.au [203.5.217.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D5A443D53 for ; Tue, 21 Feb 2006 01:56:30 +0000 (GMT) (envelope-from wilkinsa@squash.dsto.defence.gov.au) Received: from ednmsw501.dsto.defence.gov.au (ednmsw501.dsto.defence.gov.au [131.185.2.150]) by digger1.defence.gov.au with ESMTP id k1L1sWDk012091 for ; Tue, 21 Feb 2006 12:24:32 +1030 (CST) Received: from muttley.dsto.defence.gov.au (unverified) by ednmsw501.dsto.defence.gov.au (Content Technologies SMTPRS 4.3.17) with ESMTP id for ; Tue, 21 Feb 2006 12:26:23 +1030 Received: from fmbex501.dsto.defence.gov.au (fmbex501.dsto.defence.gov.au [146.221.39.230]) by muttley.dsto.defence.gov.au (8.11.3/8.11.3) with ESMTP id k1L1rkp26563 for ; Tue, 21 Feb 2006 12:23:46 +1030 (CST) Received: from squash.dsto.defence.gov.au ([131.185.40.212]) by fmbex501.dsto.defence.gov.au with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id YXL1ZHN7; Tue, 21 Feb 2006 12:53:41 +1100 Received: from squash.dsto.defence.gov.au (localhost [127.0.0.1]) by squash.dsto.defence.gov.au (8.13.3/8.13.3) with ESMTP id k1L1sZKs083552; Tue, 21 Feb 2006 12:24:35 +1030 (CST) (envelope-from wilkinsa@squash.dsto.defence.gov.au) Received: (from wilkinsa@localhost) by squash.dsto.defence.gov.au (8.13.3/8.13.3/Submit) id k1L1sZpd083551; Tue, 21 Feb 2006 12:24:35 +1030 (CST) (envelope-from wilkinsa) Date: Tue, 21 Feb 2006 12:24:35 +1030 From: "Wilkinson, Alex" To: freebsd-current@freebsd.org Message-ID: <20060221015435.GM82482@squash.dsto.defence.gov.au> Mail-Followup-To: freebsd-current@freebsd.org, matthew.thyer@dsto.defence.gov.au Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: Mutt/1.5.11 Cc: matthew.thyer@dsto.defence.gov.au Subject: netgroup limits on -current ... [mountd(8)] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Feb 2006 01:56:34 -0000 OS: FreeBSD 7.0-CURRENT #24: Thu Feb 16 12:28:58 CST 2006 Hi all, We are currently experiencing problems with FreeBSD -CURRENT and mountd(8). When we export a filesystem via NFS to a netgroup with a 'large' number of hosts in it we get all sorts of truncation. There looks like a limit on the number of hosts in a netgroup FreeBSD's mountd(8) can export to. e.g. NFS Export ---------- /export/home/username my_netgroup mountd(8) In Debugging Mode --------------------------- Feb 21 12:10:49 host mountd[83451]: can't get address info for host hostname.dsto.defence.g Feb 21 12:10:49 host mountd[83451]: bad host host.dsto.defence.g in netgroup my_netgroup, skipping This happens as mountd(8) builds its exports list via: mountd: getting export list mountd: got line /export/home/username my_netgroup mountd: making new ep fs=0x4297314f,0x57f85ac got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au got host host.dsto.defence.gov.au ... relevant code producing this error: /usr/src/usr.sbin/mountd get_host(cp, grp, tgrp) char *cp; struct grouplist *grp; struct grouplist *tgrp; { struct grouplist *checkgrp; struct addrinfo *ai, *tai, hints; int ecode; char host[NI_MAXHOST]; if (grp->gr_type != GT_NULL) { syslog(LOG_ERR, "Bad netgroup type for ip host %s", cp); return (1); } memset(&hints, 0, sizeof hints); hints.ai_flags = AI_CANONNAME; hints.ai_protocol = IPPROTO_UDP; ecode = getaddrinfo(cp, NULL, &hints, &ai); if (ecode != 0) { syslog(LOG_ERR,"can't get address info for host %s", cp); return 1; } grp->gr_ptr.gt_addrinfo = ai; while (ai != NULL) { if (ai->ai_canonname == NULL) { if (getnameinfo(ai->ai_addr, ai->ai_addrlen, host, sizeof host, NULL, 0, NI_NUMERICHOST) != 0) strlcpy(host, "?", sizeof(host)); ai->ai_canonname = strdup(host); ai->ai_flags |= AI_CANONNAME; } if (debug) fprintf(stderr, "got host %s\n", ai->ai_canonname); /* * Sanity check: make sure we don't already have an entry * for this host in the grouplist. */ for (checkgrp = tgrp; checkgrp != NULL; checkgrp = checkgrp->gr_next) { if (checkgrp->gr_type != GT_HOST) continue; for (tai = checkgrp->gr_ptr.gt_addrinfo; tai != NULL; tai = tai->ai_next) { if (sacmp(tai->ai_addr, ai->ai_addr, NULL) != 0) continue; if (debug) fprintf(stderr, "ignoring duplicate host %s\n", ai->ai_canonname); grp->gr_type = GT_IGNORE; return (0); } } ai = ai->ai_next; } Can someone please tell me if there is a limit on the number characters or hosts that mountd(8) can build an export list from ? And if so can we increase it ? Cheers - aW