Port-xen archive

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

Re: xvifX.Y vs sysctl_create() returning 22 (EINVAL)

On Tue, 11 Jan 2011 11:15:07 +0100, Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
- similar to what is done for XenSource's Linux, create a "vifname" node inside XenStore, which contains the vifnames (doh!) for the domain just
created. In our case, for dom0, that would be "xvifX-Y", or anything
that avoid using dots in the name (X being domU ID and Y the frontend
interface ID).

- modify the vif-ip and vif-bridge scripts: introduce a
"xenstore_read_default" function, like done for Linux:

# xenstore_read_default <path> <default>
# Read the given path, returning the value there or the given default
# if the path is not present.
xenstore_read_default() {
  xenstore-read "$1" 2>/dev/null || echo "$2"

- use it to query the "vifname" keys; obviously, keep the "xvifX.Y" as
default syntax.

- wait for an arbitrary amount of time (TBD), so that Xen scripts get
eventually replaced by their newer versions.

- finally, modify the syntax in kernel. Consequence: vifname will change its syntax within xenstore for each new domU, and the newer scripts will
take that into account "automagically."


This looks good. The "amount of time" to wait is probably one quartely pkgsrc
release. Too bad 2010Q4 has just been branched ...

I thought more about "branching date" (rather than delay), eg. just before 6.0 is branched. The scripts being part of etc, they are not replaced by pkgsrc automatically, and making the syntax sugar change in the middle of 5.99 is not the kind of things appreciated by users.

I'll make the change to the scripts (+ bump), and add vifname to xvif/xennet init code. Will commit the syntax fix just before branching -6.

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index