public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Ferry Huberts <ferry-NbsvJix5b8QAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] make kvm service script transfer dhclient settings correctly
Date: Sun, 16 Sep 2007 11:52:56 +0200	[thread overview]
Message-ID: <46ECFCF8.2020002@qumranet.com> (raw)
In-Reply-To: <46ECF9DB.5020208-NbsvJix5b8QAvxtiuMwx3w@public.gmane.org>

Ferry Huberts wrote:
> Avi Kivity wrote:
>> Ferry Huberts wrote:
>>> Hi list,
>>>
>>> I mailed about this earlier (may 7th, 2007) but the issue is still 
>>> there: the handling surrounding DHCP clients could be a bit improved...
>>>
>>> Currently every dhcp client gets killed after which a very basic 
>>> dhcp client is started for the dst interface, which is not really 
>>> inline with what the rest of the script does: the settings of the 
>>> src interface are transferred to the dst interface.
>>>
>>> I wrote a new patch to bring the handling of the dhcp client inline 
>>> with the reset of the script:
>>> - only the dhclient that is running on the src interface gets killed,
>>> - the commandline options of the killed dhcp client get reused for 
>>> the new dhcp client (running on dst)
>>> - when no running dhcp client can be found on the src interface then 
>>> a basic dhcp client is started.
>>>
>>> There is only one assumption in this script: the interface on which 
>>> the dhcp client is running must be the last argument on the 
>>> commandline of the dhcp client.
>>>
>>> I checked this assumption for Fedora 6 and 7 and it is met.
>>>
>>> The patch is against kvm-snapshot-20070914 (since kvm-39 does not 
>>> allow insertion for me)
>>>
>>> Hope this patch is a bit more palatable for you than the previous 
>>> one :-)
>>>
>>
>>
>> I really recommend against using the kvm initscript... it is fragile 
>> is broken.  On Fedora, you can use the standard initscripts (well, 
>> they are fragile and broken too, but they are more complete than the 
>> kvm initscript):
>>
>> [avi@blast ~]$ cat /etc/sysconfig/network-scripts/ifcfg-sw0
>> DEVICE=sw0
>> BOOTPROTO=dhcp
>> HWADDR=00:0F:EA:6E:1E:F0
>> ONBOOT=yes
>> TYPE=Bridge
>> DHCP_HOSTNAME=blast
>>
>> [avi@blast ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
>> DEVICE=eth0
>> BRIDGE=sw0
>> HWADDR=00:0F:EA:6E:1E:F0
>> ONBOOT=yes
>> TYPE=Ethernet
>>
>>
>> This setup starts dhcp directly on the bridge, without the need to 
>> move things around.  See especially the 'TYPE=Bridge' and 
>> 'BRIDGE=sw0' statements.
>>
>> Is there a reason to use the kvm initscript instead of this?
>>
> no, just thought that since it's included in the kvm distribution I'd 
> use it. Seemed a logical conclusion that this one would be the 
> recommended way to do it. I'll just as happy convert to the 
> distribution scripts now. But maybe it's a good idea then to remove 
> the script and replace it with a text file on how to setup the config 
> files. If you don't remove the script maybe the patch can go in? At 
> least it makes the script more robust than it is.
>

I'll remove the script unless anyone sees an objection?

> You seem to use the same MAC address for both your interfaces Avi. Is 
> this on purpose?

Not really.  I just added lines until it worked.  But I think it makes 
sense -- you need the mac address for eth0 so it can detect the card, 
and you need one for the switch, and since the real card won't use its 
address this is a good choice.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  parent reply	other threads:[~2007-09-16  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-15 17:09 [PATCH] make kvm service script transfer dhclient settings correctly Ferry Huberts
     [not found] ` <46EC11AE.9090408-NbsvJix5b8QAvxtiuMwx3w@public.gmane.org>
2007-09-16  9:18   ` Avi Kivity
     [not found]     ` <46ECF4E2.9000203-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-16  9:39       ` Ferry Huberts
     [not found]         ` <46ECF9DB.5020208-NbsvJix5b8QAvxtiuMwx3w@public.gmane.org>
2007-09-16  9:52           ` Avi Kivity [this message]
     [not found]             ` <46ECFCF8.2020002-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-16 18:28               ` Daniel P. Berrange
2007-09-16  9:55           ` Dor Laor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46ECFCF8.2020002@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=ferry-NbsvJix5b8QAvxtiuMwx3w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox