mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-22 12:51:09 +02:00
[ONOS-6488] Fix failure when reinstall a VPLS
When removes and reinstalls a VPLS the VPLS operation manager doesn't update intents because it didn't check if the intent from store is installed or withdrawn. Purge intents every time when removes interface or VPLS to clean the intent store is a possible solution. Change-Id: Ie06fb11e915b8f82f6753c8e47177ac4dc53dd17
This commit is contained in:
parent
8c9e410846
commit
ada511f800
@ -304,13 +304,12 @@ public class VplsOperationManager implements VplsOperationService {
|
||||
// Error consumer
|
||||
VplsOperation vplsOperation =
|
||||
vplsOperationException.vplsOperation();
|
||||
log.debug("VPLS operation failed: {}", vplsOperation);
|
||||
log.warn(OP_EXEC_ERR,
|
||||
vplsOperation.toString(),
|
||||
vplsOperationException.getMessage());
|
||||
VplsData vplsData = vplsOperation.vpls();
|
||||
vplsData.state(VplsData.VplsState.FAILED);
|
||||
vplsStore.updateVpls(vplsData);
|
||||
log.error(OP_EXEC_ERR,
|
||||
vplsOperation.toString(),
|
||||
vplsOperationException.getMessage());
|
||||
runningOperations.remove(vplsName);
|
||||
});
|
||||
log.debug("Applying operation: {}", operation);
|
||||
@ -544,6 +543,7 @@ public class VplsOperationManager implements VplsOperationService {
|
||||
private void removeVplsIntents() {
|
||||
Set<Intent> intentsToWithdraw = getCurrentIntents();
|
||||
applyIntentsSync(intentsToWithdraw, Direction.REMOVE);
|
||||
intentsToWithdraw.forEach(intentService::purge);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -100,6 +100,7 @@ public class DistributedVplsStore
|
||||
@Deactivate
|
||||
protected void deactive() {
|
||||
vplsDataStore.removeListener(vplsDataListener);
|
||||
networkConfigService.removeConfig(appId);
|
||||
log.info("Stopped");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user