[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xl list -l doesn't work for incoming domain



On 11/10/2014 12:24 PM, Wei Liu wrote:
> On Mon, Nov 10, 2014 at 12:08:18PM -0500, Zhigang Wang wrote:
>> On 11/10/2014 10:25 AM, Wei Liu wrote:
>>> On Mon, Nov 10, 2014 at 10:01:22AM -0500, Zhigang Wang wrote:
>>>> On 11/10/2014 07:35 AM, Wei Liu wrote:
>>>>> I see. At that point the configuration was not available, yet. After the
>>>>> domain is successfully migrated, the configuration should be available.
>>>>>
>>>>> I think a domain under construction without domain configuration is a
>>>>> valid state. What do you think?
>>>>
>>>> Here is my thought:
>>>>
>>>> 1. In this design, if I watch xenstore @introduceDomain, it will not been
>>>>    triggered until migration finish.
>>>>
>>>
>>> OK. What in this design makes behavior different than before? Are you
>>> suggesting "xl list -l" has something to do with your xenstore watch? I
>>> don't think I can get this.
>>>
>>> My guess is that, you have some tool that watches @introduceDomain,
>>> which happens *before* the domain creation is finished. And your tool
>>> needs to get domain information once your watch fires.  Here with this
>>> design, your tool cannot get the correct information until migration is
>>> finished. Am I right?
>>>
>>> However, in previous design, even if you manage to get configuration
>>> before migration is finished, I don't think that configuration reflects
>>> the true configuration of that domain. It's conceptually bogus.
>>>
>>> In any case, if you look at xenstore code, XS_INTRODUCE doesn't mean a
>>> domain is started, so using it for that purpose would be wrong.
>>>
>>>> 2. Because we have multiple places (hypervisor, xenstore, /var/lib/xen) 
>>>> holding
>>>>    domain state, we need to define what does it mean by "VM started".
>>>>
>>>
>>> If my above analysis is correct, will some kind of @startDomain event solve
>>> your problem?
>>>
>>> But this involves making changes to Xenstore protocol. Let's not go into
>>> details until we make sure your requirement is well understood.
>>
>> We do currently watch xenstore @introduceDomain for VM start.
>>
>> I thought the @introduceDomain behavior is different than xm/xend,
>> but I just did a test and I was wrong.
>>
>> xm/xend also trigger @introduceDomain until domain migration finish. (but 
>> before
>> @introduceDomain, all the VM xenstore entries are already there.)
>>
>> Right now, I'm all set if we fix the xl list -l issue during migration.
>>
> 
> Just to be sure -- you're fine with "xl list -l" displaying no
> configuration for an incoming domain, am I correct?

Could you please explain what does "no configuration" means?

Do you mean no info for the domain at all? If this is the case, it seems not 
consistent with xl list without -l.

Or do you mean show some info of the domain, but lack some parts? If this the 
case,
here I attach an example and you can tell me which part will be missing:

# xl list -l
...

   {
        "domid": 4,
        "config": {
            "c_info": {
                "type": "pv",
                "name": "0004fb0000060000495324cb831d2664",
                "uuid": "0004fb00-0006-0000-4953-24cb831d2664",
                "run_hotplug_scripts": "True"
            },
            "b_info": {
                "max_vcpus": 2,
                "avail_vcpus": [
                    0,
                    1
                ],
                "max_memkb": 716800,
                "target_memkb": 716800,
                "shadow_memkb": 7648,
                "sched_params": {
                    "weight": 55000
                },
                "claim_mode": "True",
                "type.pv": {
                    "bootloader": "/usr/bin/pygrub"
                }
            },
            "disks": [
                {
                    "pdev_path": 
"/OVS/Repositories/0004fb0000030000abbd129258377a77/VirtualDisks/OVM_OL6U4_X86_64_PVM_2GB_UEK3_System.img",
                    "vdev": "xvda",
                    "format": "raw",
                    "readwrite": 1
                }
            ],
            "nics": [
                {
                    "devid": 0,
                    "mac": "00:21:f6:00:08:aa",
                    "bridge": "1011d6ac59"
                }
            ],
            "vfbs": [
                {
                    "devid": 0,
                    "vnc": {
                        "listen": "127.0.0.1",
                        "findunused": "True"
                    },
                    "sdl": {

                    },
                    "keymap": "en-us"
                }
            ],
            "vkbs": [
                {
                    "devid": 0
                }
            ],
            "on_reboot": "restart",
            "on_crash": "restart"
        }
    }

Currently we want our APIs to get domain info by invoking xl list -l, but we 
can change them to get necessary info from other places.

Thanks,

Zhigang


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.