From owner-freebsd-stable@freebsd.org Wed Apr 25 19:56:13 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 6F043FAE755 for ; Wed, 25 Apr 2018 19:56:13 +0000 (UTC) (envelope-from marcnarc@gmail.com) Received: from mail-qt0-x22b.google.com (mail-qt0-x22b.google.com [IPv6:2607:f8b0:400d:c0d::22b]) (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 04F2E7870F for ; Wed, 25 Apr 2018 19:56:13 +0000 (UTC) (envelope-from marcnarc@gmail.com) Received: by mail-qt0-x22b.google.com with SMTP id d3-v6so28482984qth.8 for ; Wed, 25 Apr 2018 12:56:13 -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=hrYT7W7/vbN9L8iG6ynkkVDNfqi7A9ETROP9A6dBsC8=; b=Pxq26V5lzDqDy1HzJOiWF4xd3gloEl7kpJB3Fp1C+47Z6RLvMnVw35cUqxkhomJc5Q heIkjSUJmKj/rNl90yLUpGUnSWhS3BkgyiazrZP+FGqa3En3mzOBOjAHhhlhBBIGDsSI Fv/GvstqYhfW52zSvgZQzdKJkOgze7ksZFx3w3LzdF49nJtBKC9Ao2/zXxy9xy/6itaB g3Lm6pj3M3ZOqpQkmzCd1TEUISuqR1TfbdP41ij3ri9F1MLOWUBu8ca48X32HGmFHE7x h/VTJrbvQxHutqcVCkTrkXas+rxw1S9Uq9IKKZpUBXMhYd5+UtStUYm1Zu2jUWIyrKWw bdqQ== 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=hrYT7W7/vbN9L8iG6ynkkVDNfqi7A9ETROP9A6dBsC8=; b=jk39fFvAQqwsmnOnppW0o0cOItcgN4aZ368G+s1Mp3hgNAZgj93rC09GgOrgvf5FM8 7taPWHiERC30TRc2inH1ZAUU9AE48D/YuGyq8tCmD5VP8PbPl/MDsEKUL3BWximGvKkQ Sr9+1hIkIqigqrq2+Ff2IoKzo7bqXE4C4mVsVKvbcudxCZwy7AxuQThaR02bPpj393RG EUX7BigugtWETrnclyPgW4BvqcYHnen1sq9Z1GkrrRaxTRMC4qVF8IJQDCX9Z9sk5AE3 U9EQ2jIZ9JUXiZx6oeUtky3BS1vG188G6rsswOmRhi/LItKYiCPCaATgMwZwvhK057pD DpKA== X-Gm-Message-State: ALQs6tC3RB+yOK5FaWnzsD5zhp+IGbzxhg/rsClu16Yir+z6JzIkcd7B O6XsJYFWg35f4Zk0T+IEn//RyQ== X-Google-Smtp-Source: AIpwx4+XLPDNlTKz2/xXIP1svvWloUPQYysgL0HbFW+d3WczXaR2i9sywNXQ1WQ3F9ypgjtLwDcGfw== X-Received: by 2002:ac8:2c8b:: with SMTP id 11-v6mr31969194qtw.160.1524686172269; Wed, 25 Apr 2018 12:56:12 -0700 (PDT) Received: from [192.168.222.13] (cable-192.222.220.61.electronicbox.net. [192.222.220.61]) by smtp.googlemail.com with ESMTPSA id d52-v6sm16384309qta.25.2018.04.25.12.56.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Apr 2018 12:56:11 -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> <94c4e3f3-dac5-2958-3ad4-b4c43e4d21cf@gmail.com> Message-ID: Date: Wed, 25 Apr 2018 15:56:10 -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: <94c4e3f3-dac5-2958-3ad4-b4c43e4d21cf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA 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: Wed, 25 Apr 2018 19:56:13 -0000 On 2018-04-06 02:26 PM, Marc Branchaud wrote: > 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. The problem stems from work for bug 209112, a patch for which (r302857) was MFC'd to stable-10. I've added a comment to bug 209112. M. >         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.