[asterisk-bugs] [DAHDI-linux 0013205]: [patch] bad master selection

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Feb 15 22:59:48 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=13205 
====================================================================== 
Reported By:                biohumanoid
Assigned To:                sruffell
====================================================================== 
Project:                    DAHDI-linux
Issue ID:                   13205
Category:                   dahdi (the module)
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     assigned
JIRA:                        
Reviewboard Link:            
====================================================================== 
Date Submitted:             2008-07-31 00:11 CDT
Last Modified:              2011-02-15 22:59 CST
====================================================================== 
Summary:                    [patch] bad master selection
Description: 
Current dahdi master handling work in the following way:
The first SPAN become a master
If a new registered !!! SPAN is preferred , it is the new master
If a span is unregistered - the new master is the first available span
If master SPAN is in alarm state - the new master is the first non in
alarm state SPAN

So
1. dahdi-dummy once loaded will be the master forever.
2. even not-running SPAN can be a master
3. master implementation is ugly...
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0013206 [patch] ztdynamic double buffering on r...
====================================================================== 

---------------------------------------------------------------------- 
 (0132002) biohumanoid (reporter) - 2011-02-15 22:59
 https://issues.asterisk.org/view.php?id=13205#c132002 
---------------------------------------------------------------------- 
Patching DAHDI: STEP1
1.Using SPAN/DPSAN
2.Using Dummy SPAN

Good SPAN: 
1.no alarm
2.running
We will have some limits, but we can live with it.
If we want adapter2:span1 to be the master – we have to load it's module
first.
It's not perfect, but it's a way (right now, in 2.4.0 you don't have even
this....)

Patching DAHDI: STEP2
1.dahdi-base.c: saving dahdi_lineconfig->sync to span->sync
the same for dahdi_dynamic
2.taking into account span->sync priority

Thus, user can choose, what will be the master as flexible, as possible.
I't really major In the world of TDM...

I've looked, how  dahdi_lineconfig->sync is used in current drivers – it
should not be a problem for them (they don't care the absolute values, they
are searching for the lower).

Sample:
2 cards * 2 SPANS.
span=1,1,0,ccs,hdb3,crc4
span=2,0,0,ccs,hdb3,crc4
span=3,2,0,ccs,hdb3,crc4
span=4,0,0,ccs,hdb3,crc4
span 1 will be the master.
If SPAN1 will fail – SPAN2 will be the master. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-02-15 22:59 biohumanoid    Note Added: 0132002                          
======================================================================




More information about the asterisk-bugs mailing list