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
opsDbImporter.importDump(); - net.dante.dashboard.data.importAndExport.DatabaseImporter
populator.repopulate(); - net.dante.dashboard.populate.Populator
routerQueryRepopulator.executeRouterQueries(); - net.dante.dashboard.population.routers.RouterQueryRepopulator;

 

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"