From: "Christopher S. Aker" Subject: Re: domain key gone from xenstore when calling offline hotplug scripts Date: Fri, 09 Dec 2005 06:19:07 -0600 Message-ID: <4399763B.8020605@theshore.net> References: <439963C8.3040605@theshore.net> <20051209112141.GE9336@leeni.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20051209112141.GE9336@leeni.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ewan Mellor Cc: xen-devel List-Id: xen-devel@lists.xenproject.org Ewan Mellor wrote: > On Fri, Dec 09, 2005 at 05:00:24AM -0600, Christopher S. Aker wrote: > >>I'm using a custom vif-script and I've noticed that when the "offline" >>mode is called, I'm unable to retrieve the domain key from xenstore, >>most likely because the domain has already been destroyed. >> >>Is there any way to defer the removal of those keys until $vif-script >>offline has been called, or possibly retain it in xend and pass it along >>as a command arg? The domain value is useful in the network >>deconstruction I'm performing. > > > What do you mean by "the domain key"? You get the path to the domain, the > device type and the vif ID passed as environment variables -- this should be > sufficient for you to use as a key to other databases or whathaveyou. What > else do you require? What's passed in is the xenstore path to that specific vif's backend entries, for example "backend/vif/26/0". In 'online' mode backend/vif/26/0/domain exists. In 'offline' mode, none of that data is accessible, or at least the domain entry is no longer there. I could store the associations between vifs and domainIDs/domain names locally and perform lookups, but I was just looking for a xend provided method to grab the domain(id) that "owned" the vif we're bringing offline. Thanks, -Chris