Fixes for problems with starting and stopping apps in a minimal system

- Missing app dependencies
- Incorrect provider registrations
- Fatal execeptions thrown when external resources are not present

Change-Id: I3fdcf0666c88a47f399a722a9ab549d1104ff40e
This commit is contained in:
Ray Milkey 2019-02-07 08:08:26 -08:00
parent 31b0048a78
commit 6ee38b8688
15 changed files with 36 additions and 9 deletions

View File

@ -28,7 +28,10 @@ onos_app(
category = "Utility",
description = "Castor application",
included_bundles = BUNDLES,
required_apps = ["org.onosproject.intentsynchronizer"],
required_apps = [
"org.onosproject.intentsynchronizer",
"org.onosproject.route-service",
],
title = "Castor",
url = "http://onosproject.org",
)

View File

@ -104,7 +104,7 @@ import static org.onosproject.net.config.basics.SubjectFactories.APP_SUBJECT_FAC
)
public class DhcpManager implements DhcpService {
private static final ProviderId PID = new ProviderId("of", "org.onosproject.dhcp", true);
private static final ProviderId PID = new ProviderId("of", "org.onosproject.dhcp");
private final Logger log = LoggerFactory.getLogger(getClass());

View File

@ -4,7 +4,7 @@ COMPILE_DEPS = CORE_DEPS + METRICS + [
"@remotetea_oncrpc//jar",
]
EXCLUDED_BUNDLES = [
INCLUDED_BUNDLES = [
"@gmetric4j//jar",
"@metrics_ganglia//jar",
"@remotetea_oncrpc//jar",
@ -17,7 +17,7 @@ osgi_jar_with_tests(
onos_app(
category = "Monitoring",
description = "Performance metric service reporter",
excluded_bundles = EXCLUDED_BUNDLES,
included_bundles = INCLUDED_BUNDLES,
title = "Ganglia Report and Query",
url = "http://onosproject.org",
)

View File

@ -24,6 +24,8 @@ APPS = [
"org.onosproject.models.common",
"org.onosproject.models.l3vpn",
"org.onosproject.bgpcep",
"org.onosproject.pcep",
"org.onosproject.bgp",
]
osgi_jar_with_tests(

View File

@ -106,7 +106,7 @@ public class MQSender implements Manageable {
channel.queueDeclare(this.queueName, true, false, false, null);
channel.queueBind(queueName, exchangeName, routingKey);
} catch (Exception e) {
log.error(E_CREATE_CHAN, e);
log.warn(E_CREATE_CHAN, e.getMessage());
}
}

View File

@ -18,11 +18,16 @@ BUNDLES = [
"//apps/routing-api:onos-apps-routing-api",
]
APPS = [
"org.onosproject.route-service",
]
onos_app(
app_name = "org.onosproject.cpr",
category = "Traffic Engineering",
description = "Redirects routing control traffic to a control plane",
included_bundles = BUNDLES,
required_apps = APPS,
title = "Control Plane Redirect",
url = "http://onosproject.org",
)

View File

@ -11,6 +11,7 @@ onos_app(
"org.onosproject.openflow-base",
"org.onosproject.lldpprovider",
"org.onosproject.hostprovider",
"org.onosproject.route-service",
],
title = "SONA SimpleFabric",
url = "http://onosproject.org",

View File

@ -138,7 +138,7 @@ public class VbngManager implements VbngService {
vbngConfigurationService.getXosRestPort());
map = restClient.getRest();
} catch (Exception e) {
log.error("Could not contact XOS", e);
log.warn("Could not contact XOS {}", e.getMessage());
return;
}
if (map == null) {

View File

@ -14,7 +14,10 @@ onos_app(
app_name = "org.onosproject.drivers.flowspec",
category = "Drivers",
description = "Adds support for devices using flow specs.",
required_apps = ["org.onosproject.drivers"],
required_apps = [
"org.onosproject.drivers",
"org.onosproject.flowspec-api",
],
title = "Generic Flow Spec Drivers",
url = "http://onosproject.org",
)

View File

@ -19,6 +19,7 @@ onos_app(
"org.onosproject.generaldeviceprovider",
"org.onosproject.drivers.gnmi",
"org.onosproject.drivers.p4runtime",
"org.onosproject.pipelines.basic",
],
title = "Stratum Drivers",
url = "http://onosproject.org",

View File

@ -12,7 +12,11 @@ onos_app(
category = "Provider",
description = "BGP protocol southbound providers.",
included_bundles = BUNDLES,
required_apps = ["org.onosproject.evpn-route-service"],
required_apps = [
"org.onosproject.evpn-route-service",
"org.onosproject.tunnel",
"org.onosproject.pcep-api",
],
title = "BGP Provider",
url = "http://onosproject.org",
)

View File

@ -20,6 +20,11 @@ onos_app(
category = "Provider",
description = "BGPCEP providers.",
included_bundles = BUNDLES,
required_apps = [
"org.onosproject.tunnel",
"org.onosproject.bgp",
"org.onosproject.pcep-api",
],
title = "BGPCEP Provider",
url = "http://onosproject.org",
)

View File

@ -11,6 +11,7 @@ onos_app(
app_name = "org.onosproject.ovsdbhostprovider",
category = "Provider",
description = "OVSDB Host provider.",
required_apps = ["org.onosproject.ovsdb-base"],
title = "OVSDB host Provider",
url = "http://onosproject.org",
)

View File

@ -16,6 +16,8 @@ onos_app(
required_apps = [
"org.onosproject.pcep-api",
"org.onosproject.optical-model",
"org.onosproject.tunnel",
"org.onosproject.bgp",
],
title = "PCEP Provider",
url = "http://onosproject.org",

View File

@ -86,7 +86,7 @@ public class PcepTopologyProvider extends AbstractProvider
public PcepTopologyProvider() {
//In BGP-PCEP app, since both BGP and PCEP topology provider have same scheme
//so BGP will be primary and PCEP topology provider will be ancillary.
super(new ProviderId("l3", "org.onosproject.provider.pcep", true));
super(new ProviderId("l3", "org.onosproject.provider.bgp", true));
}
private static final Logger log = LoggerFactory