Controller Services swact/failover time reduction

Add full support for Active/Active redudancy model
1. services could have enable dependency to services in other service
groups
   (standby group)
2. An active/active service failure will degraded the service group it
is in
3. A failure of active/active service would not prevent a swact
4. Locking a controller that is sole active/active service
provider will be rejected. But lock with force option will still proceed
to lock the node.
5. sm-api bind to port 7777 on mgmt interface. (was localhost:7777)

Change-Id: I0da78a51a50fd60ec128edc91c2eeec31af4a956
Signed-off-by: Jack Ding <jack.ding@windriver.com>
This commit is contained in:
Bin Qian 2018-06-01 13:45:08 -04:00 committed by Jack Ding
parent 5e725a7a0a
commit 5eb13b2eeb
1 changed files with 13 additions and 0 deletions

View File

@ -11,6 +11,17 @@
*/
#include "hostUtil.h"
#include "nodeBase.h"
static char local_hostname[MAX_HOST_NAME_SIZE+1] = {0};
const char* hostUtil_get_hostname()
{
if(*local_hostname == '\0')
{
gethostname(local_hostname, MAX_HOST_NAME_SIZE);
}
return local_hostname;
}
string hostUtil_getServiceIp ( mtc_service_enum service )
{
@ -38,6 +49,8 @@ string hostUtil_getServiceIp ( mtc_service_enum service )
break ;
}
case SERVICE_SMGR:
ip = hostUtil_get_hostname();
break;
case SERVICE_VIM:
{
ip = "localhost" ;