From patchwork Tue Oct 31 13:52:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 10034603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24596602B9 for ; Tue, 31 Oct 2017 14:00:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DCE12811E for ; Tue, 31 Oct 2017 14:00:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7293C28ACB; Tue, 31 Oct 2017 14:00:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1BBE3286D2 for ; Tue, 31 Oct 2017 14:00:50 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9X3n-0003W5-2G; Tue, 31 Oct 2017 13:58:31 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e9X3l-0003Tn-Lg for xen-devel@lists.xenproject.org; Tue, 31 Oct 2017 13:58:29 +0000 Received: from [85.158.143.35] by server-8.bemta-6.messagelabs.com id 3C/A2-13910-48188F95; Tue, 31 Oct 2017 13:58:28 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKIsWRWlGSWpSXmKPExsXitHSDvW5L449 Ig5670hbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aFs/NYCw5wVTRcX8/WwPiOo4uRg0NCwF/i UEdxFyMnB5uAssTPzl42EFtEQE+i6cBzRhCbWcBOovnRBxYQW1ggTmLbgRdgNSwCqhI3Xs1nB rF5BSwlzlxbCVYvISAvsavtIiuIzQkUX/+0iR3EFhKwkLi37DsjhK0g0TH9GBNEr6DEyZlPWC B2SUgcfPGCeQIj7ywkqVlIUgsYmVYxqhenFpWlFuka6iUVZaZnlOQmZuboGhqY6eWmFhcnpqf mJCYV6yXn525iBAYOAxDsYNz53OkQoyQHk5Io707H75FCfEn5KZUZicUZ8UWlOanFhxhlODiU JHgdGn5ECgkWpaanVqRl5gBDGCYtwcGjJMJ7GCTNW1yQmFucmQ6ROsVozNFx8+4fJo5nM183M Aux5OXnpUqJ8z4CKRUAKc0ozYMbBIutS4yyUsK8jECnCfEUpBblZpagyr9iFOdgVBLmdQWZwp OZVwK37xXQKUxAp3hJgJ1SkoiQkmpgZD/JwLR+7aZAyXfb2n7c2cVV/+nU5mLRv0qtJ4pOfzn aafxuxYRr+WUOJbdOxT5/2Tjnh3BM0az+hQ+5a6/8kM8v/lqTEOslee66uPXsNZsPftub1cX7 RDlvolni6c4/R7i3+hn0KHrkRR/8JqihfLBLcLfSjuYqoaN7Xx6bJvJQrJZ1/pTH7kosxRmJh lrMRcWJAO+TFZOoAgAA X-Env-Sender: prvs=470789eaf=wei.liu2@citrix.com X-Msg-Ref: server-13.tower-21.messagelabs.com!1509458298!73901128!5 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 21928 invoked from network); 31 Oct 2017 13:58:28 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-13.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 31 Oct 2017 13:58:28 -0000 X-IronPort-AV: E=Sophos;i="5.44,324,1505779200"; d="scan'208";a="457036595" From: Wei Liu To: Xen-devel Date: Tue, 31 Oct 2017 13:52:00 +0000 Message-ID: <20171031135203.11537-17-wei.liu2@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171031135203.11537-1-wei.liu2@citrix.com> References: <20171031135203.11537-1-wei.liu2@citrix.com> MIME-Version: 1.0 Cc: ian.jackson@eu.citrix.com, Wei Liu Subject: [Xen-devel] [OSSTEST PATCH v2 16/19] Set mac address in interfaces(5) if force-mac-address is set X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP ff9e0d8cbd generated a udev rule for setting the mac address. But that udev rule is not copied into the target so reboot after installation will fail. We can copy the udev rule to target system so the reboot after installation works, but then the generated udev rules will end up in initramfs, which means the guest (which uses host's initrd) will use the same rune to set conflicting mac address. Put the mac address in interfaces(5). We still need to keep the udev rule for the initrd overlay otherwise host installation will fail. Signed-off-by: Wei Liu --- Osstest/Debian.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm index 2bfd5ae..2c3bcf4 100644 --- a/Osstest/Debian.pm +++ b/Osstest/Debian.pm @@ -1207,6 +1207,16 @@ END preseed_hook_command($ho, 'late_command', $sfx, $cmds); } + my $wantphysif= get_host_property($ho,'interface force','auto'); + if ($wantphysif ne 'auto' && $ho->{Flags}{'force-mac-address'}) { + preseed_hook_command($ho, 'late_command', $sfx, <{Ether}/' /target/etc/network/interfaces +END + } + if ( $ho->{Flags}{'need-uboot-bootscr'} ) { my @bootargs = uboot_common_kernel_bootargs($ho);