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

Re: [Xen-devel] [PATCH v1 11/12] hotplug: document new hotplug interface



On 13/03/13 17:29, Ian Jackson wrote:
> Roger Pau Monne writes ("[Xen-devel] [PATCH v1 11/12] hotplug: document new 
> hotplug interface"):
>> Mention the new diskspec parameter and add a document explaining the
>> new hotplug interface.
> ...
>> +HOTPLUG_PATH
>> +------------
>> +
>> +Points to the xenstore directory that holds information relative
>> +to this hotplug script. At present only one parameter is passed by
>> +the toolstack, the "params" xenstore entry which contains the "target"
>> +line specified in the diskspec xl disk configuration (pdev_path in
>> +libxl_device_disk struct).
>> +
>> +This xenstore directory will be used to communicate between the
>> +hotplug script and the toolstack, and it can also be used by the
>> +hotplug script to store temporary information.
> 
> Doesn't this leave the possibility that a script might decide to write
> "sponge"="42" in the xenstore directory, for its own purposes, and
> that libxl might later decide to try to pass "sponge"="bath" for an
> enhanced interface ?

This hotplug scripts (v2) should only be called with the parameters and
env vars specified in this document, so we should never call this
scripts with anything different.

If we ever decide to pass some random env var, we should bump hotplug
version to 3 and redo this document, but guessing now which env vars we
might need in the future is kind of a shot in the dark.

> I think you need to specify which names each user is entitled to use.

Reserved xenstore entries are also listed in the document, the user
should not use the following entries randomly:

HOTPLUG_PATH/version
HOTPLUG_PATH/pdev

> Also, you need to say something about access control.

The hotplug script will have permissions to read/write on HOTPLUG_PATH
and BACKEND_PATH at least, but of course if this runs on the Dom0 it
will have access to everything (just as hotplug scripts have right now)

> 
>> +=======================
>> +COMMAND LINE PARAMETERS
>> +=======================
> ...
>> +Script will be called with only one parameter, that is either prepare,
>> +add, remove, unprepare, localattach or localdetach.
> 
> You need to say what scripts should do with unknown parameters.
> 
>> +BACKEND_PATH: not valid
>> +
>> +Expected output:
>> +HOTPLGU_PATH/version = version supported by the hotplug script
> 
> The output is written into xenstore ?  (Also, typo.)
> 
> thanks,
> Ian.
> 


_______________________________________________
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®.