Follow-up on #1940

This commit is contained in:
Sukchan Lee 2022-12-06 22:57:36 +09:00
parent 0c2a3b0f39
commit fbd9ada101
5 changed files with 29 additions and 10 deletions

View File

@ -162,6 +162,9 @@ upf:
subnet: subnet:
- addr: 10.45.0.1/16 - addr: 10.45.0.1/16
- addr: 2001:db8:cafe::1/48 - addr: 2001:db8:cafe::1/48
metrics:
- addr: 127.0.0.7
port: 9090
hss: hss:
freeDiameter: freeDiameter:
@ -226,6 +229,9 @@ pcf:
sbi: sbi:
- addr: 127.0.0.13 - addr: 127.0.0.13
port: 7777 port: 7777
metrics:
- addr: 127.0.0.13
port: 9090
nssf: nssf:
sbi: sbi:

View File

@ -196,6 +196,9 @@ upf:
subnet: subnet:
- addr: 10.45.0.1/16 - addr: 10.45.0.1/16
- addr: 2001:db8:cafe::1/48 - addr: 2001:db8:cafe::1/48
metrics:
- addr: 127.0.0.7
port: 9090
hss: hss:
freeDiameter: freeDiameter:
@ -255,6 +258,9 @@ pcf:
sbi: sbi:
- addr: 127.0.0.13 - addr: 127.0.0.13
port: 7777 port: 7777
metrics:
- addr: 127.0.0.13
port: 9090
nssf: nssf:
sbi: sbi:

View File

@ -164,6 +164,9 @@ upf:
subnet: subnet:
- addr: 10.45.0.1/16 - addr: 10.45.0.1/16
- addr: 2001:db8:cafe::1/48 - addr: 2001:db8:cafe::1/48
metrics:
- addr: 127.0.0.7
port: 9090
hss: hss:
freeDiameter: freeDiameter:
@ -225,6 +228,9 @@ pcf:
sbi: sbi:
- addr: 127.0.0.13 - addr: 127.0.0.13
port: 7777 port: 7777
metrics:
- addr: 127.0.0.13
port: 9090
nssf: nssf:
sbi: sbi:

View File

@ -28,8 +28,8 @@ int pcf_initialize()
{ {
int rv; int rv;
ogs_sbi_context_init();
ogs_metrics_context_init(); ogs_metrics_context_init();
ogs_sbi_context_init();
pcf_context_init(); pcf_context_init();
rv = ogs_sbi_context_parse_config("pcf", "nrf", "scp"); rv = ogs_sbi_context_parse_config("pcf", "nrf", "scp");
@ -41,13 +41,13 @@ int pcf_initialize()
rv = pcf_context_parse_config(); rv = pcf_context_parse_config();
if (rv != OGS_OK) return rv; if (rv != OGS_OK) return rv;
rv = pcf_metrics_open();
if (rv != 0) return OGS_ERROR;
rv = ogs_log_config_domain( rv = ogs_log_config_domain(
ogs_app()->logger.domain, ogs_app()->logger.level); ogs_app()->logger.domain, ogs_app()->logger.level);
if (rv != OGS_OK) return rv; if (rv != OGS_OK) return rv;
rv = pcf_metrics_open();
if (rv != 0) return OGS_ERROR;
rv = ogs_dbi_init(ogs_app()->db_uri); rv = ogs_dbi_init(ogs_app()->db_uri);
if (rv != OGS_OK) return rv; if (rv != OGS_OK) return rv;
@ -93,13 +93,14 @@ void pcf_terminate(void)
ogs_timer_delete(t_termination_holding); ogs_timer_delete(t_termination_holding);
pcf_sbi_close(); pcf_sbi_close();
pcf_metrics_close();
ogs_dbi_final(); ogs_dbi_final();
pcf_context_final(); pcf_context_final();
pcf_metrics_close();
ogs_sbi_context_final(); ogs_sbi_context_final();
ogs_metrics_context_final();
} }
static void pcf_main(void *data) static void pcf_main(void *data)

View File

@ -31,10 +31,10 @@ int upf_initialize()
{ {
int rv; int rv;
ogs_metrics_context_init();
ogs_gtp_context_init(OGS_MAX_NUM_OF_GTPU_RESOURCE); ogs_gtp_context_init(OGS_MAX_NUM_OF_GTPU_RESOURCE);
ogs_pfcp_context_init(); ogs_pfcp_context_init();
ogs_metrics_context_init();
upf_context_init(); upf_context_init();
upf_event_init(); upf_event_init();
upf_gtp_init(); upf_gtp_init();
@ -54,9 +54,6 @@ int upf_initialize()
rv = upf_context_parse_config(); rv = upf_context_parse_config();
if (rv != OGS_OK) return rv; if (rv != OGS_OK) return rv;
rv = upf_metrics_open();
if (rv != 0) return OGS_ERROR;
rv = ogs_log_config_domain( rv = ogs_log_config_domain(
ogs_app()->logger.domain, ogs_app()->logger.level); ogs_app()->logger.domain, ogs_app()->logger.level);
if (rv != OGS_OK) return rv; if (rv != OGS_OK) return rv;
@ -64,6 +61,9 @@ int upf_initialize()
rv = ogs_pfcp_ue_pool_generate(); rv = ogs_pfcp_ue_pool_generate();
if (rv != OGS_OK) return rv; if (rv != OGS_OK) return rv;
rv = upf_metrics_open();
if (rv != 0) return OGS_ERROR;
rv = upf_pfcp_open(); rv = upf_pfcp_open();
if (rv != OGS_OK) return rv; if (rv != OGS_OK) return rv;
@ -88,12 +88,12 @@ void upf_terminate(void)
upf_pfcp_close(); upf_pfcp_close();
upf_gtp_close(); upf_gtp_close();
upf_metrics_close();
upf_context_final(); upf_context_final();
ogs_pfcp_context_final(); ogs_pfcp_context_final();
ogs_gtp_context_final(); ogs_gtp_context_final();
upf_metrics_close();
ogs_metrics_context_final(); ogs_metrics_context_final();
ogs_pfcp_xact_final(); ogs_pfcp_xact_final();