All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: "Dennis Lan (dlan)" <dennis.yxun@gmail.com>
Cc: Eugene Fedotov <e.fedotov@samsung.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: Unable to create VM with nic device on Arndale
Date: Sat, 18 Jan 2014 09:02:36 +0100	[thread overview]
Message-ID: <52DA351C.2030604@citrix.com> (raw)
In-Reply-To: <CAF1ZMEe6U-PrSo2S_vqg0ukOHM4tag5wE52scd3+M9tOhGEC0A@mail.gmail.com>

On 18/01/14 03:35, Dennis Lan (dlan) wrote:
> On Fri, Jan 17, 2014 at 9:31 PM, Roger Pau Monné <roger.pau@citrix.com> wrote:
>> On 17/01/14 12:59, Ian Campbell wrote:
>>> On Fri, 2014-01-17 at 19:43 +0800, Dennis Lan (dlan) wrote:
>>>> On Fri, Jan 17, 2014 at 7:01 PM, Ian Campbell <Ian.Campbell@citrix.com> wrote:
>>>>
>>>>
>>>>> vif-bridge and the common scripts which it includes would be a good
>>>>> start. Just an echo at the top to confirm that the script is running
>>>>> would be useful.
>>>>>
>>>>> I used to do "exec 1>/tmp/hotplug.log 2>&1" at the top to aid debugging
>>>>> when these scripts were launched by udev, but now that libxl runs them
>>>>> you may find that the debug from the script comes out on stdout/err of
>>>>> the xl create command so perhaps that isn't needed any more.
>>>>>
>>>>>> headless here.
>>>>>
>>>>> That shouldn't matter, you are looking for output from userspace
>>>>> scripts, not kernel or hypervisor logs.
>>>>>
>>>>> Ian.
>>>>>
>>>>
>>>> Hi Ian
>>>> I suspect for 4.4.0, the network devices even was not detected.
>>>> this is output from 4.3.1, notes follow lines.
>>>>
>>>> libxl: debug: libxl_device.c:959:device_hotplug: calling hotplug
>>>> script: /etc/xen/scripts/vif-bridge online
>>>> dlan: vif-bridge start
>>>> dlan: vif-common start
>>>>
>>>> dlan: vif-bridge start -> output from vif-bridge script
>>>> dlan: vif-common start -> output from vif-common.sh script
>>>
>>> So these are the 4.3 logs? Have you tried 4.4 and found that it doesn't
>>> produce the same output?
>>>
>>> (please can you try and set the text type to "preformatted" for the logs
>>> -- having them wrapped makes them very hard to read).
>>>
>>> The lack of
>>> libxl: debug: libxl_device.c:959:device_hotplug: calling hotplug script: /etc/xen/scripts/vif-bridge online
>>> in your original logs is a bit concerning.
>>>
>>> Roger -- any ideas?
>>
>> My first guess would be that libxl__get_domid failed, however I'm not
>> able to reproduce this. I'm attaching a patch to add an error message
>> if libxl__get_domid fails, and also prevent the removal of xenstore
>> entries so we can see what's going on. Dennis/Eugene, could you try the
>> attached patch and send the output of xl -vvv create <...> and
>> xenstore-ls -fp after the failed creation?
>>
>> ---
>> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
>> index a604cd8..03f9fe9 100644
>> --- a/tools/libxl/libxl_create.c
>> +++ b/tools/libxl/libxl_create.c
>> @@ -1296,6 +1296,9 @@ static void domcreate_complete(libxl__egc *egc,
>>          rc = xc_flask_relabel_domain(CTX->xch, dcs->guest_domid, d_config->b_info.exec_ssidref);
>>
>>      if (rc) {
>> +        LOG(ERROR, "domain creation failed, not doing removal of xs entries");
>> +        dcs->callback(egc, dcs, rc, -1);
>> +        return;
>>          if (dcs->guest_domid) {
>>              dcs->dds.ao = ao;
>>              dcs->dds.domid = dcs->guest_domid;
>> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
>> index ba7d100..56d8162 100644
>> --- a/tools/libxl/libxl_device.c
>> +++ b/tools/libxl/libxl_device.c
>> @@ -965,7 +965,10 @@ static void device_hotplug(libxl__egc *egc, libxl__ao_device *aodev)
>>       * hotplug scripts
>>       */
>>      rc = libxl__get_domid(gc, &domid);
>> -    if (rc) goto out;
>> +    if (rc) {
>> +        LOG(ERROR, "unable to get domain id, error: %d", rc);
>> +        goto out;
>> +    }
>>      if (aodev->dev->backend_domid != domid) {
>>          if (aodev->action != LIBXL__DEVICE_ACTION_REMOVE)
>>              goto out;
>>
> with this patch applied, I got following err. or see attached file for more info
> 
> ofire configs # xl create -c test1_stable
> Parsing config from test1_stable
> libxl: error: libxl_device.c:969:device_hotplug: unable to get domain
> id, error: -3
> libxl: error: libxl_device.c:969:device_hotplug: unable to get domain
> id, error: -3
> libxl: error: libxl_create.c:1206:domcreate_attach_vtpms: unable to
> add nic devices
> libxl: error: libxl_create.c:1279:domcreate_complete: domain creation
> failed, not doing removal of xs entries
> 

Hello,

Thanks for the log, could you please post the output of xenstore-ls -fp
after a failed domain creation?

My first guess is that your xencommons init script is outdated, could
you check if your xencommons init script has the following line:

113                 ${BINDIR}/xenstore-write "/local/domain/0/domid" 0

Roger.

  reply	other threads:[~2014-01-18  8:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-18 11:07 Unable to create VM with nic device on Arndale Eugene Fedotov
2013-12-18 11:45 ` Ian Campbell
2013-12-18 11:46 ` Stefano Stabellini
2013-12-18 12:46   ` Ian Jackson
2013-12-18 13:04     ` Ian Campbell
2013-12-18 14:44       ` Ian Jackson
2013-12-18 14:53         ` Ian Campbell
2013-12-18 13:23     ` Eugene Fedotov
2013-12-18 13:30       ` Ian Campbell
2013-12-18 14:45         ` Eugene Fedotov
2013-12-18 14:49         ` Eugene Fedotov
2014-01-17  9:33           ` Dennis Lan (dlan)
2014-01-17  9:46             ` Ian Campbell
2014-01-17 10:37               ` Dennis Lan (dlan)
2014-01-17 10:44                 ` Ian Campbell
2014-01-17 10:55                   ` Dennis Lan (dlan)
2014-01-17 11:01                     ` Ian Campbell
2014-01-17 11:43                       ` Dennis Lan (dlan)
2014-01-17 11:59                         ` Ian Campbell
2014-01-17 13:31                           ` Roger Pau Monné
2014-01-18  2:35                             ` Dennis Lan (dlan)
2014-01-18  8:02                               ` Roger Pau Monné [this message]
2014-01-20  2:20                                 ` Dennis Lan (dlan)

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=52DA351C.2030604@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=dennis.yxun@gmail.com \
    --cc=e.fedotov@samsung.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.