From: Roni Riska Date: Tue, 17 Sep 2019 09:56:52 +0000 (+0300) Subject: Query Xapp config after subscription X-Git-Tag: 0.0.8~8 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F63%2F963%2F3;p=ric-plt%2Fvespamgr.git Query Xapp config after subscription When the xapp notification subscription is done vesmgr makes a query of running xapps and recreates the vespa configuration and starts vespa. Vespa is not started before we have got the configuration from the xapp manager. Change-Id: I286fff7ed33e5704e6b9a18d1dd5358b6282bbdb Signed-off-by: Roni Riska --- diff --git a/cmd/vesmgr/vesmgr.go b/cmd/vesmgr/vesmgr.go index 18ed793..0e27838 100755 --- a/cmd/vesmgr/vesmgr.go +++ b/cmd/vesmgr/vesmgr.go @@ -127,9 +127,6 @@ func vesmgrInit() { subscribeXAppNotifications(chXAppSubscriptions) - createConf([]byte{}) - startVesagent(chVesagent) - runVesmgr(chVesagent, chSupervision, chXAppNotifications, chXAppSubscriptions) } @@ -210,6 +207,7 @@ func runVesmgr(chVesagent chan error, chSupervision chan chan string, chXAppNoti logger.Info("vesmgr main loop ready") mystate := normalState var xappStatus []byte + var err error for { select { case supervision := <-chSupervision: @@ -225,7 +223,6 @@ func runVesmgr(chVesagent chan error, chSupervision chan chan string, chXAppNoti * the situation is fixed when the next * xapp notif comes */ - var err error xappStatus, err = queryConf() if err == nil { killVespa(vesagent.process) @@ -247,6 +244,11 @@ func runVesmgr(chVesagent chan error, chSupervision chan chan string, chXAppNoti logger.Error("Failed to make xApp subscriptions, vesmgr exiting: %s", isSubscribed.err) os.Exit(1) } + xappStatus, err = queryConf() + if err == nil { + createConf(xappStatus) + startVesagent(chVesagent) + } } } } diff --git a/container-tag.yaml b/container-tag.yaml index f5eba34..30299ec 100644 --- a/container-tag.yaml +++ b/container-tag.yaml @@ -1,4 +1,4 @@ # The Jenkins job uses this string for the tag in the image name # for example nexus3.o-ran-sc.org:10004/my-image-name:0.0.1 --- -tag: 0.0.2 +tag: 0.0.3