domain key gone from xenstore when calling offline hotplug scripts
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.
Thanks,
-Chris
Quoted 8 lines · Christopher S. Aker
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?
Ewan.
Quoted 11 lines · Ewan Mellor
Quoted 3 lines · Christopher S. Aker
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
Quoted 19 lines · Christopher S. Aker
Quoted 12 lines · Ewan Mellor
Quoted 8 lines · Christopher S. Aker
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.
Quoted 5 lines
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?
Quoted 8 lines
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.
What are you doing to destroy this domain? I've just tried it with both xm destroy and xm shutdown, and I am seeing the backend/vif/26/0/frontend-id node in both cases. I would consider it a bug if you are seeing those nodes disappear before the offline event is fired, so I would be interested in your help with debugging that, if indeed that's what you are seeing.
Of course, it would be possible for us to add extra environment variables to the scripts to contain the information that you require, but I am wary of doing that, as it clutters the interface and leaves us with more things to support in the future.
Cheers,
Ewan.