You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

 

In the dashboard-networkdb-repopulator/src/main/java/net/dante/dashboard/population/messaging/Consumer.java the Consumer picks up a message from the ESB, previously created by the OpsDB-Copier Application

public synchronized void receiveRepopulateRequest(ActiveMQMessage message) throws ExecutionException, InterruptedException {
LOG.info("Received request to repopulate network map DB....");
try {
attemptNetworkMapDatabaseRepopulation();
updateNotifications();
producer.notifyCorrelatorMapRepopulated();
} catch (Exception exception) {
handleExceptionAtHighLevel(exception);
} finally {
producer.sendNotificationsReload();
}
}

 

The Producer sends a message to the networkMapReloadQueue and the notificationsReloadQueue which causes the NetworkMap to be switched.

 

 

Within the attemptNetworkMapDatabaseRepopulation function, the following functions are called:

tarUnpacker.execute(); - net.dante.dashboard.population.tar.TarUnpacker - Found in dashboard-networkdb-repopulator
opsDbImporter.importDump(); - net.dante.dashboard.data.importAndExport.DatabaseImporter - Found in dashboard-common
populator.repopulate(); - net.dante.dashboard.populate.Populator - Found in dashboard-network-map <> populate-model
routerQueryRepopulator.executeRouterQueries(); - net.dante.dashboard.population.routers.RouterQueryRepopulator;- Found in dashboard-networkdb-repopulator

 

populator.repopulate()

Sadly the first thing it does is wipe out all the data in the networkmap schema using the net.dante.dashboard.populate.NetworkMapWiper class then it calls the populateDataBase() function.

 

 

 

routerQueryRepopulator.executeRouterQueries()

This fires off a series of Bash shell and php scripts stored in the /home/local/GEANT/dante.sanigar/scripts directory.

final String[] scriptCommands = new String[] {"cd " + scriptDirectory + " && ./update_routers_table.php > /var/log/nms-dashboard/router_details.log 2>&1",
"cd " + scriptDirectory + " && ./populate_router_details_table.php >> /var/log/nms-dashboard/router_details.log 2>&1",
"cd " + scriptDirectory + " && ./get-bgp-v4-peers-on-router.sh > /var/log/nms-dashboard/ix_public_peers.log 2>&1",
"cd " + scriptDirectory + " && ./get-bgp-v6-peers-on-router.sh >> /var/log/nms-dashboard/ix_public_peers.log 2>&1",
"cd " + scriptDirectory + " && ./populate_router_ix_public_peer_table.php >> /var/log/nms-dashboard/ix_public_peers.log 2>&1",
"cd " + scriptDirectory + " && ./get-bgp-gopen-peers-on-router.sh > /var/log/nms-dashboard/gopen_peers.log 2>&1",
"cd " + scriptDirectory + " && ./populate_router_gopen_peer_table.php >> /var/log/nms-dashboard/gopen_peers.log 2>&1",
"cd " + scriptDirectory + " && ./get-bgp-v4-vpnRRPeers-on-router.sh > /var/log/nms-dashboard/vpnrr_peers.log 2>&1",
"cd " + scriptDirectory + " && ./populate_router_vpnrr_peer_table.php >> /var/log/nms-dashboard/vpnrr_peers.log 2>&1"

 

 

 

  • No labels