From owner-freebsd-hackers@freebsd.org Tue Jul 18 00:56:00 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2FB9C08861; Tue, 18 Jul 2017 00:56:00 +0000 (UTC) (envelope-from paggas1@yandex.com) Received: from forward17o.cmail.yandex.net (forward17o.cmail.yandex.net [IPv6:2a02:6b8:0:1a72::1e7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 881307D183; Tue, 18 Jul 2017 00:56:00 +0000 (UTC) (envelope-from paggas1@yandex.com) Received: from smtp1m.mail.yandex.net (smtp1m.mail.yandex.net [77.88.61.132]) by forward17o.cmail.yandex.net (Yandex) with ESMTP id 3BB0E21BC8; Tue, 18 Jul 2017 03:55:56 +0300 (MSK) Received: from smtp1m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1m.mail.yandex.net (Yandex) with ESMTP id 7799B63C0E8B; Tue, 18 Jul 2017 03:55:53 +0300 (MSK) Received: by smtp1m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id CCiud5xOnX-tAjqORHa; Tue, 18 Jul 2017 03:55:11 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1500339311; bh=+U8RjezC9NV5NG62UL4m8294fd6n2VU4Gy99a2Cj65Y=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=IaqcN7lf2Y8KRRZ7kox/EWg4abNcDiHMoLaQnJePI06c2EUKKsy0e+deoK+imwrLX vkhHmU+yCmz0J/nFgmhjArRGozrGbmQs3osZNw1kh+uhI3/msO/3nrgPlk3y+UfwWh hCyXmHId43Cfiv+YlhXp6P8NBxYdeZ9Z9TD+OzV4= Authentication-Results: smtp1m.mail.yandex.net; dkim=pass header.i=@yandex.com X-Yandex-Suid-Status: 1 0,1 0,1 1022867361,1 0 Subject: Re: Attn: CI/Jenkins people; Run bhyve instance for testing pf To: Alan Somers , Panagiotes Mousikides Cc: "freebsd-hackers@freebsd.org" , FreeBSD Current References: <871d6043-0c56-2c9b-1e3e-5db33898c24a@yandex.com> From: Panagiotes Mousikides Message-ID: Date: Tue, 18 Jul 2017 00:55:10 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jul 2017 00:56:00 -0000 Den 2017-07-16 kl. 21:11, skrev Alan Somers: > On Sun, Jul 16, 2017 at 2:44 PM, Panagiotes Mousikides > wrote: >> Hello everybody! >> >> I am working on adding tests to the FreeBSD test suite for testing pf, the >> network packet filter. >> >> These tests need at least two machines running and connected to each other, >> with one machine generating network traffic and the other running pf and >> filtering the traffic. I am looking for a way to fire off a bhyve instance >> to serve as the second machine, the first being the actual machine I am >> running the tests on. This should be done completely automatically, with >> scripts to configure all network interfaces and to preferably also set up an >> SSH server on the bhyve instance. >> >> This bhyve instance could start off as running the latest stable version of >> FreeBSD, or it could be configured to run a snapshot of the development >> tree. The aim is to have the desired version of FreeBSD that we want to >> test running on it. Ideally this would be done in such a way that we can >> reuse the machine for further tests, instead of rebuilding everything from >> scratch for each test. >> >> What I am looking for is the best way to do this, preferably so that it can >> be easily integrated into the CI work being done at Jenkins. What do you >> think? Any input is welcome! >> >> All the best, >> Panagiotes > It's possible to setup CI systems that involve multiple machines > networked together. I've done it. But it's complicated, fragile, and > slow. I advise you to consider very carefully whether you truly need > multiple VMs. What about creating an epair(4)? You could run pf on > epair0b and generate traffic from epair0a. That would be faster than > spinning up VMs, and would be very easy to integrate into any other CI > system. Would that work? > > -Alan > Hi Alan! Thank you for the tip about epair(4), it sounds really like an interesting approach to my problem. I will look into it! Best regards, Panagiotes