From owner-freebsd-stable@freebsd.org Fri Apr 6 18:26:50 2018 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FFC0F9C6C7 for ; Fri, 6 Apr 2018 18:26:50 +0000 (UTC) (envelope-from marcnarc@gmail.com) Received: from mail-qt0-x22a.google.com (mail-qt0-x22a.google.com [IPv6:2607:f8b0:400d:c0d::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC45D6D671 for ; Fri, 6 Apr 2018 18:26:49 +0000 (UTC) (envelope-from marcnarc@gmail.com) Received: by mail-qt0-x22a.google.com with SMTP id f8so2102158qtg.12 for ; Fri, 06 Apr 2018 11:26:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=E8zu9LAY4G0GzkoKKbDA/Q3iHNomg6lA5jWExwVJRe4=; b=ivHuqX+15ofz9tc/HutNqD2+Jrx1KzD90Oldu20LeXwkNRVIiyE1X0fw+q2jXl345H 4xF9KJ8Qheb/Pm+/q35PI/7ReDt1dkV4YmW7bMDuRZjnGeRCDZWcgE37NghRqwiVmj71 G4JVoDZJfqvY674Gyc5X/Zfftkf3QGVzI2YPJjb77Sk3xkLAiODFx1MXFpRcMZyYWZXh 35QrPL1WLx+M99Eghe32VFGq7sl8hfyJNyNdGU232+LyBZN7jsrrJVG91vVxsd8pf5c1 9WMgXqO1bEZsRFEbfUbIrGcUSAKVtCgr9UmR7/w81x3tCTjChvifTWkjLIjFPHVuIWjQ 4p9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=E8zu9LAY4G0GzkoKKbDA/Q3iHNomg6lA5jWExwVJRe4=; b=P5Z0ZbfEBVNa66dyQwJ9csZZyCXKyg6M8zYWanfXCDf/MySVzcD2e8SnVdQyCm+phO KB4Hb1CXngguUwzEorls/QGp8CVrPmtbzCTjccBehqArMbB6paGDxicgbxCs5gJU6YNU syFOTkGVockwY8czcSF2wuUN+6nsiOuLuDrRIyUp75RoxYslGVXnDrP2aC6NwtnxYzeI DnG9rM+GVsyGtlqyDB0qFCulV19o4gmCcc1JzCbqoqNhTbxX9dDC6e980c9SirVs64zi y7XrVqlvLkh6mUFzt/mVao8vVUwVqFX3OCINTje9/ZSY7CnQMNSeWbrp8jQgxc+pg9i2 0AyA== X-Gm-Message-State: ALQs6tDbr4QAdrgfEOFQ52sOQ79kBJ/Vcac3ynoV81M7PFmJRBmWGSpF KO85IA4SWbvNO/Kui6lgORE= X-Google-Smtp-Source: AIpwx4+EqS7VNZwLedA8vIfy2YvXcFvimwLaBkzXeSeOc1pH2Ci32ksdKDXfhHKpt+zL3a/UPEDDbw== X-Received: by 10.200.65.17 with SMTP id q17mr38224713qtl.122.1523039209069; Fri, 06 Apr 2018 11:26:49 -0700 (PDT) Received: from [10.10.1.32] ([192.252.130.194]) by smtp.gmail.com with ESMTPSA id i188sm8020414qkc.16.2018.04.06.11.26.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Apr 2018 11:26:48 -0700 (PDT) Subject: Re: Problems with ifconfig when starting all jails after 10.3 -> 10.4 upgrade From: Marc Branchaud To: freebsd-stable@FreeBSD.ORG References: <45483fb3-bd94-10f1-a75c-3a035ec69cfa@gmail.com> Message-ID: <94c4e3f3-dac5-2958-3ad4-b4c43e4d21cf@gmail.com> Date: Fri, 6 Apr 2018 14:26:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <45483fb3-bd94-10f1-a75c-3a035ec69cfa@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2018 18:26:50 -0000 On 2018-04-05 10:28 AM, Marc Branchaud wrote: > Hi all, > > I just upgraded from 10.3 to 10.4, and "/etc/rc.d/jail start" is having > problems starting all of my jails: > > # /etc/rc.d/jail start > Starting jails:xipbuild_3_3: created > ifconfig:: bad value > jail: xipbuild_3_3_8: /sbin/ifconfig lo1 inet 10.1.1.38/32 alias: failed > xipbuild_3_4: created > ifconfig:: bad value > jail: xipbuild_4_0: /sbin/ifconfig lo1 inet 10.1.1.5/32 alias: failed > xipbuild: created > xipbuild_4_9: created > ifconfig:: bad value > jail: xipbuild9: /sbin/ifconfig lo1 inet 10.1.1.209/32 alias: failed > . More info: Things work fine with jail_parallel_start="YES". In 10.4, /etc/rc.d/jail now adds "-p1" to the jail command's arguments when starting all jails with jail_parallel_start="NO". It's definitely this parameter that's causing my problems -- changing /etc/rc.d/jail to not add the parameter fixes the problem. M. > This worked fine in 10.3.  I can individually start each jail, e.g. > "/etc/rc.d/jail start xipbuild9". > > All the jails configure the same set of parameters.  Here's my jail.conf: > > --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- > xipbuild_3_3 { >   path="/usr/build-jails/jails/3.3"; >   host.hostname="xipbuild_3_3"; >   ip4.addr="10.1.1.3/32"; > >   allow.chflags; >   allow.mount; >   mount.devfs; > >   persist; > >   mount="/usr/home  /usr/build-jails/jails/3.3/usr/home nullfs rw 0 0"; >   interface="lo1"; > } > xipbuild_3_3_8 { >   path="/usr/build-jails/jails/3.3.8"; >   host.hostname="xipbuild_3_3_8"; >   ip4.addr="10.1.1.38/32"; > >   allow.chflags; >   allow.mount; >   mount.devfs; > >   persist; > >   mount="/usr/home  /usr/build-jails/jails/3.3.8/usr/home nullfs rw 0 0"; >   interface="lo1"; > } > xipbuild_3_4 { >   path="/usr/build-jails/jails/3.4"; >   host.hostname="xipbuild_3_4"; >   ip4.addr="10.1.1.4/32"; > >   allow.chflags; >   allow.mount; >   mount.devfs; > >   persist; > >   mount="/usr/home  /usr/build-jails/jails/3.4/usr/home nullfs rw 0 0"; >   interface="lo1"; > } > xipbuild_4_0 { >   path="/usr/build-jails/jails/4.0"; >   host.hostname="xipbuild_4_0"; >   ip4.addr="10.1.1.5/32"; > >   allow.chflags; >   allow.mount; >   mount.devfs; > >   persist; > >   mount="/usr/home  /usr/build-jails/jails/4.0/usr/home nullfs rw 0 0"; >   interface="lo1"; > } > xipbuild { >   path="/usr/build-jails/jails/latest"; >   host.hostname="xipbuild"; >   ip4.addr="10.1.1.200/32"; > >   allow.chflags; >   allow.mount; >   mount.devfs; > >   persist; > >   mount="/usr/home  /usr/build-jails/jails/latest/usr/home nullfs rw 0 0"; >   interface="lo1"; > } > xipbuild_4_9 { >   path="/usr/build-jails/jails/4.9"; >   host.hostname="xipbuild_4_9"; >   ip4.addr="10.1.1.90/32"; > >   allow.chflags; >   allow.mount; >   mount.devfs; > >   persist; > >   mount="/usr/home  /usr/build-jails/jails/4.9/usr/home nullfs rw 0 0"; >   interface="lo1"; > } > xipbuild9 { >   path="/usr/build-jails/jails/latest9"; >   host.hostname="xipbuild9"; >   ip4.addr="10.1.1.209/32"; > >   allow.chflags; >   allow.mount; >   mount.devfs; > >   persist; > >   mount="/usr/home  /usr/build-jails/jails/latest9/usr/home nullfs rw 0 > 0"; >   interface="lo1"; > } > --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- > > I use ipnat to give the jails network access.  Here's ipnat.rules: > > --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- > map em0 10.1.1.0/24 -> 0/32 proxy port ftp ftp/tcp > map em0 10.1.1.0/24 -> 0/32 > --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- > > And here's my rc.conf: > > --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- > # Generated by Ansible > > # hostname must be FQDN > hostname="devastator.xiplink.com" > > zfs_enable="False" > > # FIXME: previously auto-created? > ifconfig_lo1="create" > > > ifconfig_em0="DHCP SYNCDHCP" > > network_interfaces="em0" > gateway_enable="YES" > > # Prevent rpc > rpcbind_enable="NO" > > # Prevent sendmail to try to connect to localhost > sendmail_enable="NO" > sendmail_submit_enable="NO" > sendmail_outbound_enable="NO" > sendmail_msp_queue_enable="NO" > > # Bring up sshd, it takes some time and uses some entropy on first startup > sshd_enable="YES" > > netwait_enable="YES" > netwait_ip="10.10.0.35" > netwait_if="em0" > > jenkins_swarm_enable="YES" > jenkins_swarm_opts="-executors 8" > > # --- Build jails --- > build_jails_enable="YES" > jail_enable="YES" > > # Set rules in /etc/ipnat.rules > ipnat_enable="YES" > > # Set interface name for ipnat > network_interfaces="${network_interfaces} lo1" > > # Each jail needs to specify its IP address and mask bits in ipv4_addrs_lo1 > ipv4_addrs_lo1="10.1.1.1/32" > > jail_chflags_allow="yes" > > varmfs="NO" > --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- 8< --- > > Any insight would be deeply appreciated! > >         M.