Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: observe GRPC client #330

Merged

Conversation

gatici
Copy link
Contributor

@gatici gatici commented Oct 21, 2024

This PR aims to solve GPRC client connection issues which appears when GPRC server (webconsole) is restarted.

If the Webconsole is restarted, other modules loses the GRPC connection to Webconsole
They tries to connect again for hours with no success.

2024-09-26T11:32:10.014Z [smf] 2024-09-26T11:32:10Z [ERRO][Config5g][GRPC] Connectivity status idle, trying to connect again

NF observes the GRPC client availability and connection status in an infinite loop.
If the connection is ready it does nothing. If GRPC client does not exist, it creates new client. If GRPC client connection is not ready, it closes the existing client and creates another client.
Only one GRPC client exists for any time slot.

Copy link
Contributor

@gab-arrobo gab-arrobo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that changes are not consistent across the different NFs (in some NFs the updateConfig is in service/init.go like this in NF/PR and in other NFs, the same function goes in factory/factory.go). Would this be a good time to make the change consistent across all NFs?

@gatici gatici force-pushed the TELCO-1381-recover-grpc-connection branch from 5a3c110 to 28bfc1f Compare October 25, 2024 11:14
@gatici gatici requested a review from gab-arrobo October 26, 2024 13:08
client := gClient.ConnectToConfigServer(factory.AmfConfig.Configuration.WebuiUri)
configChannel := client.PublishOnConfigChange(true)
go amf.UpdateConfig(configChannel)
logger.InitLog.Infoln("Reading Amf related configuration from ROC")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
logger.InitLog.Infoln("Reading Amf related configuration from ROC")
logger.InitLog.Infoln("reading Amf related configuration from ROC")

@gab-arrobo gab-arrobo merged commit 3c60ac9 into omec-project:main Oct 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants