Port-xen archive

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

Re: vif script interpreter issues



On 16.03.2011 18:13, David Hopper wrote:
> Hello,
> 
> I'm running a NetBSD -current dom0 from 3/14, and xenkernel33,
> xentools33 from -current pkgsrc (3/14).  The vif-bridge and vif-ip
> scripts are from January 12 and contain Jean-Yves Migeon's 'vifname'
> changes to the vif-ip and vif-bridge scripts in pkg/etc/xen and
> pkg/etc/xen/scripts.  I'm provisioning a cluster of Red Hat 6
> domU's.
> 
> The xvifx.x devices were not being created in dom0, and networking in
> the domU was broken as a result.  I had the bridge0 setup, but the PV
> driver wouldn't communicate, and a vif ioemu flag would never create
> the tap device in dom0.
> 
> I was getting these in the logs:
> 
> /var/log/messages: xvif3.0: Ethernet address 00:16:3e:55:39:85 
> sysctl_createv: sysctl_create(xvif3.0) returned 22 xvif3.0: could not
> attach sysctl nodes

Strange. If it failed creating the xvifx.y interfaces, these messages
would never appear in console (or logs). Are you sure that the
interfaces were not rather present, but improperly configured?

> xenbackendd.log: xenstore-read: couldn't read path
> /local/domain/0/backend/vif/2/0/bridge exec
> /usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/2/0
> 6 Failed to read /local/domain/0/device/vif/0/script (No such file or
> directory) exec /usr/pkg/etc/xen/scripts/vif-bridge
> /local/domain/0/backend/vif/0/0 1 exec
> /usr/pkg/etc/xen/scripts/vif-bridge /local/domain/0/backend/vif/0/0
> 2 xenstore-read: couldn't read path
> /local/domain/0/backend/vif/0/0/bridge [...]
> 
> ...and xvifx.x never showed up in dom0-- not in the bridge, nor as a
> separate device.

Huh... Race with Xenstore key creation, maybe.

> Then, out of curiosity, I switched back to /bin/sh -e, and it still
> worked.  I assume that because the xenstore entry was updated using
> bash, that sh -e started working after that.  Or something.
> 
> (with /bin/sh -ex): exec /usr/pkg/etc/xen/scripts/vif-bridge
> /local/domain/0/backend/vif/9/0 6 + dirname
> /usr/pkg/etc/xen/scripts/vif-bridge + dir=/usr/pkg/etc/xen/scripts +
> . /usr/pkg/etc/xen/scripts/xen-subr +
> PATH=/bin:/usr/bin:/usr/pkg/bin:/sbin:/usr/sbin:/usr/pkg/sbin +
> export PATH + xpath=/local/domain/0/backend/vif/9/0 + xstatus=6 +
> xenstore-rm /local/domain/0/backend/vif/9/0 + exit 0
> 
> Looks fine.
> 
> Very curious.  I wish I had run /bin/sh -ex to see what was failing
> prior to using bash, but it all works now.

Xenstore gets populated by the PV backend driver (via xenbus(4)), the
shell scripts are called later in the process, after xennet(4)/xvif(4)
devices are created.
If the interfaces are missing, something goes wrong early in the
backend, but "what" is unknown. Especially if the sysctl warnings
appeared, but interfaces did not show up with ifconfig -a.

If this happens again, don't hesitate to send me a mail, and I'll try to
reproduce this bug.

-- 
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost


Home | Main Index | Thread Index | Old Index