Subject: Re: [dtn-users] bundle expire malfunction??
From: Alex McMahon <[email-masked]>
To: Nick Fox <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Fri, 30 Oct 2009 15:30:14 -0700
List-Id: dtn-users mailing list <dtn-users.maillists.intel-research.net>

Expiring a bundle would simply remove it from the bundle list
immediately and delete the bundle.  I believe what you are seeing is one
of three registrations being deleted and not the expiration of the
bundle.  If the bundle expires ( you could try manually expiring it with
'bundle expire <id>')before all known nodes have been encountered, I
expect the bundle would disappear from the bundle list and is deleted.  

Alex

1) no bundles / default registrations
sphere dtn% bundle list
All Bundles (0): 

sphere dtn% registration list
id 0: active dtn://sphere.dtn (DEFER) [expiration 0]
id 2: active dtn://sphere.dtn/ping (DEFER) [expiration 0]

sphere dtn% route dump
Route table for flood router:

destinatio source COS    next hop    fwd    route [custody timeout]
endpoint i  eid   BNE    link/eid   action   prio [min   pct   max]
-----------------------------------------------------------------------------

Class of Service (COS) bits:
	B: Bulk  N: Normal  E: Expedited

Links:

2) Two bundles sent with expiration time of 10 seconds to EID that does
no exist. Bundles 8 & 9 and registrations 14 & 15 are visible  

$ dtnping -c 1 -e 10 dtn://blahblah2/ping
source_eid [dtn://sphere.dtn/ping.1747]
dtn_register succeeded, regid 15

$ dtnping -c 1 -e 10 dtn://blahblah1/ping
source_eid [dtn://sphere.dtn/ping.1745]
dtn_register succeeded, regid 14

sphere dtn% bundle list
All Bundles (2): 
	8  : dtn://sphere.dtn/ping.1745 -> dtn://blahblah1/ping length 20
	9  : dtn://sphere.dtn/ping.1747 -> dtn://blahblah2/ping length 20

sphere dtn% registration list
id 0: active dtn://sphere.dtn (DEFER) [expiration 0]
id 2: active dtn://sphere.dtn/ping (DEFER) [expiration 0]
id 14: active dtn://sphere.dtn/ping.1745 (DEFER) [expiration 0]
id 15: active dtn://sphere.dtn/ping.1747 (DEFER) [expiration 0]

sphere dtn% route dump
Route table for flood router:

destinatio source COS    next hop    fwd    route [custody timeout]
endpoint i  eid   BNE    link/eid   action   prio [min   pct   max]
-----------------------------------------------------------------------------

Class of Service (COS) bits:
	B: Bulk  N: Normal  E: Expedited

Links:

3) After 10 seconds as expected the registration expires and bundle
expires. Registrations 14 & 15 and bundles 8 & 9 are gone from lists. A
signal is given by the dtnping application for both bundles.  

PING [dtn://blahblah1/ping] (expiration 10)...
bundle deleted at [dtn://sphere.dtn] (lifetime expired): seqno=0,
time=10004 m

PING [dtn://blahblah1/ping] (expiration 10)...
bundle deleted at [dtn://sphere.dtn] (lifetime expired): seqno=0,
time=10002 ms

sphere dtn% bundle list
All Bundles (0): 

sphere dtn% registration list
id 0: active dtn://sphere.dtn (DEFER) [expiration 0]
id 2: active dtn://sphere.dtn/ping (DEFER) [expiration 0]

sphere dtn% route dump
Route table for flood router:

destinatio source COS    next hop    fwd    route [custody timeout]
endpoint i  eid   BNE    link/eid   action   prio [min   pct   max]
-----------------------------------------------------------------------------

Class of Service (COS) bits:
	B: Bulk  N: Normal  E: Expedited

Links:

On Wed, 2009-09-30 at 14:44 -0400, Nick Fox wrote:

> I am using DTN2-2.6.0 and flooding routing.  I believe I am
> experiencing some odd behavior with the bundle expire command.
> 
> Here is my test scenario:
> 
> Nodes N1, N2, N3, and N4 all have entries in each others link lists.
> Say N1 has a dtnsend command run on it while all links are closed
> which creates bundle B1.  If a bundle info command is run on B1, then
> it is "queued" of the following lists:all_bundles, pending_bundles,
> FloodBundleRouter::all_bundles, link-0:deferred, link-1:deferred, and
> link-2:deferred (link-0=N2, link-1=N3, link-2=N4).  Now if the link
> opens with N3, the bundle is flooded to N3 and a bundle expire command
> is run on the bundle on N1.  Here is the what I see on N1.  Bundle
> list status = NOT PENDING.  Now if bundle info is run on it, it is
> "queued" on the following lists:all_bundles, link-0:deferred,
> link-2:deferred.  If N1 now opens a link with N2 and/or N4, the bundle
> is still flooded to the node and it is removed from the corresponding
> link:deferred list.  When all known nodes have been encountered, then
> the bundle finally disappears from the bundle list and is deleted.
> Note: if N1 were to open a link to a "new" node ex. N6, then the
> bundle would be flooded to N6 as well.
> 
> I am curious, is this the intended behavior of the bundle expire
> command? I was under the impression that expiring a bundle would
> simply remove it from the bundle list immediately and delete the
> bundle.  Also, if this is the intended behavior for bundle expire, is
> there a way to manually alter which lists a bundle is a part of?  
> 
> Thanks in advance for your comments/suggestions.
> 
> Nick Fox
> 
> _______________________________________________
> dtn-users mailing list
> [email-masked]
> http://maillists.intel-research.net/mailman/listinfo/dtn-users