Hi Ondrej,

I tried your suggestion by adding a new interface on each slaves. Now both slave 1 and slave 2 have two eth inferface, which is eth0 and eth1. eth0 will be used to receive control signal from controller and eth1 will be used in real testing. Both eth0 and eth1 on two slaves are valid and could ping each other.

However, I still get the error message like: " phys_id passed but doesn not match any device on machine." I attached my log file as well as the recipe within this email and hope to hearing from you soon!

Thanks again for your kindness!

Xing


From: dymfangxing@hotmail.com
To: olichtne@redhat.com
CC: lnst-developers@lists.fedorahosted.org
Subject: RE: can lnst be used on Linux distributions other that Fedora 18?
Date: Wed, 19 Jun 2013 02:38:27 +0800

Hi Ondrej,

Thank you so much for your in-detailed reply! Let me try your suggestion by adding a new interface and I will get back to you later!

Thanks again for your patience!!!

Xing


> Date: Tue, 18 Jun 2013 10:10:56 +0200
> From: olichtne@redhat.com
> To: dymfangxing@hotmail.com
> CC: lnst-developers@lists.fedorahosted.org
> Subject: Re: can lnst be used on Linux distributions other that Fedora 18?
>
> Hi,
>
> the attached recipe and logs didn't get to me so I think it might
> have been too big for the mail servers. If you could try again, or
> upload it on the web somewhere (e.g. pastebin) and sending me the links
> that would be great.
>
> However from what I can see you are using the interface eth0 for the
> test. eth0 is usually the main interface that provides internet
> connectivity and in case of virtual machines connectivity to the host. I
> am thinking this because of you specifying the same ip address in the
> <info hostname=""> and in the <address value=""> tags.
>
> For lnst to work properly you need a DEDICATED interface or connection
> between the controller and every slave. This connection is described by
> the <info hostname=""> tag. This interface or connection CANNOT be used
> for testing because lnst resets the interface by setting it down which
> will in turn sever the connection between the controller and the slave
> and the test will be unable to continue.
>
> This means that you usually need at least 2 interfaces on each slave
> machine- one for the connection to the controller and one for testing.
> Therefore my advice here is to add a new interface to the virtual
> machine and use that one for testing. I personally use libvirts ability
> to create an isolated network and then connect my test interfaces to
> that to ensure the connectivity between slaves.
>
> The xml snippets that you mention at the end of your email. The machine
> description is split into two parts in the version you are using. The
> first part describes the test interfaces- type, mac address, network.
> This information is used by lnst to properly match the test setup to the
> recipe.
> The second part is how the interface should be configured during the
> test- the ip adresses, for soft devices their slaves and other options.
>
> We are aware that this is a bit confusing and you will be happy to know
> that in our current developement code (available through git) this has
> already been changed so that you only describe each interface once.
>
> The issue with dhcp- at the moment lnst doesn't expect a third party to
> be manipulating the configuration of interfaces and that includes dhcp.
> This doesn't mean it won't work but it will probably be unreliable and
> test results won't be accurate. However as I mentioned earlier the test
> interfaces should be on isolated networks and not used for anything
> except testing so it shouldn't be too big of a problem. Automatic
> address assignment would also cause a bit of a problem when writing your
> command sequences- you probably don't know the assigned ip address when
> writing the recipe and you therefore have to use the ip() template
> function, but that currently won't notice changes in ip configuration-
> it's set at the begining of the test when the interface is first
> configured.
> We are looking into this and we probably will support some sort of
> automatic address configuration in the future.
>
> To conclude- eth0 is your main connection from controller to slave- you
> can use dhcp here as long as you specify the correct address in the
> hostname argument. For testing you need additional interfaces,
> preferably on isolated networks. These shouldn't use dhcp as lnst is
> currently not aware of changes in interface configurations that were
> done by other tools.
>
> Sorry about the longer response, since I don't know the specifics I
> tried to be a little more verbose in hopes of getting at least something
> right. I hope this helps.
>
> -Ondrej
>
> On Tue, Jun 18, 2013 at 04:51:39AM +0800, FangXinglorrie wrote:
> > Hi Ondrej,
> > Thanks a lot for your replying!
> > Currently I try it on Ubuntu 12.04, I've checked python's version, it is 7.0, which is enough for me to run LNST. The test case I am using is "ping_icmp", which I do some modifications such as change the IP address and MAC address.
> > The issue I have is: I could successfully run the it to get the ping command accomplished; however, I won't be able to let the rest stops. After I press "Ctrl+C" to force stop it on controller side, it has some error information.
> > What's more, when I dig into it ,I found that after the ping command finishing executing, the slave side's eth interface has been down and could not be re-up. So when I type "ifconfig" I won't see eth0. I have to manually type "dhclient eth0" to enable it again.
> > I took a look at the source code and found that lnst do will down the eth when it starts running; however, it will up it again at the end of running this test. So I doubt that for some reasons I don't know, it fails to bring the eth0 up again in my case. And the whole test hung in certain stage.
> > Actually I also test it on a pure fedora environment and both controller and slaves are in Fedora 18, but the result keeps same. So I don't know how to deal with it.
> > I attached the log for both the controller and slaves when it is running on Ubuntu 12.04 and also the recipe I am using to run this test. Hope they could provide more information to you.
> > I am looking forward to hearing from you!
> > PS:
> > One more question, I don't really understand some part of the recipe file. The question is: since I've already set up the host interface:
> > <info hostname="192.168.1.4"/> <netdevices> <!-- Change hwaddr here --> <netdevice type="eth" network="tnet" hwaddr="00:0c:29:04:e0:33" phys_id="0"/>
> > Why do I still need to set up a "testifc1" again?
> > <netconfig> <interface id="testifc1" phys_id="0" type="eth"> <addresses> <address value="192.168.1.4/24"/> </addresses>
> > And, how do I set up this testifc1? Do I need to set it to be different from the real host name? I did it before but the test fails by reporting "No interface" so I have to set it exactly same as the host name.
> > Do I also need to set the eth0 to a static IP address? Currently I am using DHCP. Will it affect test's running?
> > Thank you so much!
> > Yours,
> > Xing