Both on a one-member PNI splits the LAG when the augment lands (#219)
A PNI's second member is an augment that arrives months later, so siteSet returned before setting the site and the new member joined the first building. The augment now carries site 'ab' (kept by sanitize), applies it on delivery if the POP still has two sites, and the panel shows Both as chosen while it is on order. Choosing A or B meanwhile drops the intent.
This commit is contained in:
parent
abd55c0846
commit
5f2dd38d2d
6 changed files with 47 additions and 5 deletions
|
|
@ -5,7 +5,11 @@ Object.assign(ACT,{
|
|||
const o=k==='t'?S.transit.find(x=>x.id===id):k==='p'?S.pni.find(x=>x.id===id):null;if(k!=='ix'&&!o)return;if(k==='ix'&&(!isIx(id)||S.ixp[id]===undefined||!S.pops[ixCity(id)]))return;
|
||||
if(k==='ix'&&S.myIx[id]){S.ixSite=S.ixSite||{};S.ixSite[id]=s;after();return;}
|
||||
const n=()=>k==='ix'?((S.ixn||{})[id]||1):(o.n||1);
|
||||
if(s==='ab'&&n()<2){const before=n();if(k==='t')ACT.lagT({id,d:1});else if(k==='p')ACT.lagP({id,d:1});else ACT.lagIx({city:id,d:1});if(n()<2||n()===before)return;toast(tr('sites_peering_caches.second_lag_member_added_one_member'),'good');}
|
||||
if(k==='p'&&o.up)delete o.up.site;
|
||||
if(s==='ab'&&n()<2){const before=n();if(k==='t')ACT.lagT({id,d:1});else if(k==='p')ACT.lagP({id,d:1});else ACT.lagIx({city:id,d:1});
|
||||
// A PNI's second member is an augment that lands months later (#219): it remembers to split the LAG when it does.
|
||||
if(k==='p'&&o.up&&o.up.n>=2&&n()<2){o.up.site='ab';after();return;}
|
||||
if(n()<2||n()===before)return;toast(tr('sites_peering_caches.second_lag_member_added_one_member'),'good');}
|
||||
if(k==='ix'){S.ixSite=S.ixSite||{};S.ixSite[id]=s;}else o.site=s;after();},
|
||||
peer:({city,net})=>{if(!isIx(city)||!isNet(net)||S.ixp[city]===undefined||!ixMembers(city).includes(net))return;const r=peerOk(net,'ix',city);if(!r.ok){toast(tr('sites_peering_caches.net_declined_why',{net:esc(NET[net].name),why:esc(r.why)}),'bad');sfx('err');return;}S.peers[net+'@'+city]=true;
|
||||
toast(`<b>${tr('sites_peering_caches.net_accepted',{net:esc(NET[net].name)})}</b><br>${NET[net].pol==='selective'?tr('sites_peering_caches.they_checked_your_pearingdb_page_and'):tr('sites_peering_caches.bgp_session_established')}`,'good');sfx('build');after();},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue