When collector is configured in agent config file, InitGenerator is invoked before ConnectionStateManager::GetInstance(). This resuls in agent crash because of the restriction enforced by commit https://github.com/Juniper/contrail-controller/commit/03133839a5e6e11000bd339e6ec6dd0e2812334f which requires ConnectionStateManager::GetInstance() to be invoked before InitGenerator.
When collector is configured in agent config file, InitGenerator is invoked before ConnectionStateManager::GetInstance(). This resuls in agent crash because of the restriction enforced by commit https://github.com/Juniper/contrail-controller/commit/03133839a5e6e11000bd339e6ec6dd0e2812334f which requires ConnectionStateManager::GetInstance() to be invoked before InitGenerator.

Fix agent initialization so that ConnectionStateManager::GetInstance() is invoked before InitGenerator.
Closes-Bug: #1399521

Change-Id: I069a485dd060cc3892c16b7fe822a2eebdb8c992

hthompson6/contrail-controller,numansiddique/contrail-controller,facetothefate/contrail-controller,cloudwatt/contrail-controller,nischalsheth/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-controller,facetothefate/contrail-controller,rombie/contrail-controller,DreamLab/contrail-controller,tcpcloud/contrail-controller,vmahuli/contrail-controller,vmahuli/contrail-controller,hthompson6/contrail-controller,vpramo/contrail-controller,reiaaoyama/contrail-controller,eonpatapon/contrail-controller,DreamLab/contrail-controller,numansiddique/contrail-controller,reiaaoyama/contrail-controller,sajuptpm/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-controller,nischalsheth/contrail-controller,facetothefate/contrail-controller,eonpatapon/contrail-controller,nischalsheth/contrail-controller,srajag/contrail-controller,vmahuli/contrail-controller,tcpcloud/contrail-controller,vpramo/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-controller,srajag/contrail-controller,cloudwatt/contrail-controller,numansiddique/contrail-controller,sajuptpm/contrail-controller,numansiddique/contrail-controller,codilime/contrail-controller,reiaaoyama/contrail-controller,vmahuli/contrail-controller,hthompson6/contrail-controller,sajuptpm/contrail-controller,codilime/contrail-controller,cloudwatt/contrail-controller,rombie/contrail-controller,sajuptpm/contrail-controller,DreamLab/contrail-controller,codilime/contrail-controller,numansiddique/contrail-controller,sajuptpm/contrail-controller,eonpatapon/contrail-controller,facetothefate/contrail-controller,codilime/contrail-controller,nischalsheth/contrail-controller,codilime/contrail-controller,rombie/contrail-controller,hthompson6/contrail-controller,cloudwatt/contrail-controller,tcpcloud/contrail-controller,rombie/contrail-controller,facetothefate/contrail-controller,tcpcloud/contrail-controller,rombie/contrail-controller,vpramo/contrail-controller,sajuptpm/contrail-controller,reiaaoyama/contrail-controller,tcpcloud/contrail-controller,nischalsheth/contrail-controller,DreamLab/contrail-controller,vmahuli/contrail-controller,nischalsheth/contrail-controller,srajag/contrail-controller,reiaaoyama/contrail-controller,codilime/contrail-controller,DreamLab/contrail-controller,vpramo/contrail-controller,tcpcloud/contrail-controller,eonpatapon/contrail-controller,srajag/contrail-controller,vpramo/contrail-controller,srajag/contrail-controller,hthompson6/contrail-controller,cloudwatt/contrail-controller