mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-11 23:52:35 +02:00
Fix for app dependency loading order issue
Change-Id: Ic4210644bb4a7c433c6e4bd6a33136d2bdfe1e5a (cherry picked from commit e09b71ab0e8cf7f648f345cfa257f24e62804bf9)
This commit is contained in:
parent
12ed9af2b7
commit
bd85f785a2
@ -335,18 +335,17 @@ public class DistributedApplicationStore extends ApplicationArchive
|
||||
|
||||
|
||||
private void activate(ApplicationId appId, boolean updateTime) {
|
||||
AtomicBoolean stateChanged = new AtomicBoolean(false);
|
||||
InternalApplicationHolder appHolder = Versioned.valueOrNull(apps.computeIf(appId,
|
||||
v -> v != null && v.state() != ACTIVATED,
|
||||
(k, v) -> {
|
||||
stateChanged.set(true);
|
||||
return new InternalApplicationHolder(v.app(), ACTIVATED, v.permissions());
|
||||
}));
|
||||
if (stateChanged.get()) {
|
||||
Versioned<InternalApplicationHolder> vAppHolder = apps.get(appId);
|
||||
if (vAppHolder != null) {
|
||||
if (updateTime) {
|
||||
updateTime(appId.name());
|
||||
}
|
||||
activateRequiredApps(appHolder.app());
|
||||
activateRequiredApps(vAppHolder.value().app());
|
||||
|
||||
apps.computeIf(appId, v -> v != null && v.state() != ACTIVATED,
|
||||
(k, v) -> new InternalApplicationHolder(
|
||||
v.app(), ACTIVATED, v.permissions()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user