Commit deb5969e authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'more-verbosity-in-release' into 'develop'

build(release): adding more verbosity to release mode

See merge request oai/cn5g/oai-cn5g-amf!46
parents 689fb352 b1a2519a
......@@ -55,9 +55,9 @@ RUN rm -f /etc/rhsm-host && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
# Some GIT configuration command quite useful
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
RUN git config --global https.postBuffer 123289600
RUN git config --global http.sslverify false
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi" && \
git config --global https.postBuffer 123289600 && \
git config --global http.sslverify false
# Copying source code
WORKDIR /openair-amf/
......@@ -70,7 +70,6 @@ RUN ./build_amf --install-deps --force
# Building AMF
WORKDIR /openair-amf/build/scripts
RUN ./build_amf --clean --Verbose --build-type Release --jobs
#RUN ./build_amf --clean --Verbose --build-type Debug --jobs
#---------------------------------------------------------------------
# TARGET IMAGE
......@@ -81,13 +80,13 @@ ENV TZ=Europe/Paris
RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \
tzdata \
libasan \
procps-ng \
psmisc \
net-tools \
libevent && \
rm -rf /var/lib/apt/lists/*
# Copying executable and generated libraries
WORKDIR /openair-amf/bin
COPY --from=oai-amf-builder /openair-amf/build/amf/build/amf oai_amf
......@@ -108,15 +107,9 @@ COPY --from=oai-amf-builder /usr/lib64/libboost_regex.so.1.66.0 /usr/lib64/
COPY --from=oai-amf-builder /usr/lib64/libicudata.so.60 /usr/lib64/
COPY --from=oai-amf-builder /usr/lib64/libicui18n.so.60 /usr/lib64/
COPY --from=oai-amf-builder /usr/lib64/libicuuc.so.60 /usr/lib64/
COPY --from=oai-amf-builder /usr/lib64/libasan.so.5.0.0 /usr/lib64/
COPY --from=oai-amf-builder /usr/lib64/libasan.so.5 /usr/lib64/
COPY --from=oai-amf-builder /openair-amf/scripts/entrypoint.sh entrypoint.sh
# debug
#RUN ldconfig -v
#RUN ldd oai_amf
# Copying template configuration files
WORKDIR /openair-amf/etc
COPY --from=oai-amf-builder /openair-amf/etc/amf.conf .
......@@ -127,7 +120,4 @@ WORKDIR /openair-amf
EXPOSE 80/tcp 9090/tcp 38412/sctp
ENTRYPOINT ["/openair-amf/bin/entrypoint.sh"]
CMD ["/openair-amf/bin/oai_amf", "-c", "/openair-amf/etc/amf.conf", "-o"]
#CMD ["sleep", "infinity"]
......@@ -33,7 +33,7 @@ FROM ubuntu:bionic as oai-amf-builder
ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
ENV TZ=Europe/Paris
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
......@@ -44,9 +44,9 @@ RUN apt-get update && \
&& rm -rf /var/lib/apt/lists/*
# Some GIT configuration commands quite useful
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
RUN git config --global https.postBuffer 123289600
RUN git config --global http.sslverify false
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi" && \
git config --global https.postBuffer 123289600 && \
git config --global http.sslverify false
WORKDIR /openair-amf/
COPY . /openair-amf
......
......@@ -239,6 +239,8 @@ bool amf_app::get_pdu_sessions_context(
void amf_app::handle_itti_message(
itti_n1n2_message_transfer_request& itti_msg) {
if (itti_msg.is_ppi_set) { // Paging procedure
Logger::amf_app().info(
"Handle ITTI N1N2 Message Transfer Request for Paging");
std::shared_ptr<itti_paging> i =
std::make_shared<itti_paging>(TASK_AMF_APP, TASK_AMF_N2);
i.get()->amf_ue_ngap_id = amf_n1_inst->supi2amfId.at(itti_msg.supi);
......@@ -251,6 +253,7 @@ void amf_app::handle_itti_message(
i->get_msg_name());
}
} else {
Logger::amf_app().info("Handle ITTI N1N2 Message Transfer Request");
// Encode DL NAS TRANSPORT message(NAS message)
DLNASTransport* dl = new DLNASTransport();
dl->setHeader(PLAIN_5GS_MSG);
......
......@@ -147,21 +147,21 @@ void amf_n2_task(void* args_p) {
amf_n2_inst->handle_itti_message(ref(*m));
} break;
case UE_CONTEXT_RELEASE_COMMAND: {
Logger::task_amf_n2().info(
Logger::amf_n2().info(
"Received UE_CONTEXT_RELEASE_COMMAND message, handling");
itti_ue_context_release_command* m =
dynamic_cast<itti_ue_context_release_command*>(msg);
amf_n2_inst->handle_itti_message(ref(*m));
} break;
case UE_CONTEXT_RELEASE_COMPLETE: {
Logger::task_amf_n2().info(
Logger::amf_n2().info(
"Received UE_CONTEXT_RELEASE_COMPLETE message, handling");
itti_ue_context_release_complete* m =
dynamic_cast<itti_ue_context_release_complete*>(msg);
amf_n2_inst->handle_itti_message(ref(*m));
} break;
case PDU_SESSION_RESOURCE_RELEASE_COMMAND: {
Logger::task_amf_n2().info(
Logger::amf_n2().info(
"Received PDU_SESSION_RESOURCE_RELEASE_COMMAND message, handling");
itti_pdu_session_resource_release_command* m =
dynamic_cast<itti_pdu_session_resource_release_command*>(msg);
......
......@@ -68,7 +68,7 @@ void Logger::_init(
m_async_cmd = new _Logger("asnyc_c", m_sinks, ss.str().c_str());
m_amf_app = new _Logger("amf_app", m_sinks, ss.str().c_str());
m_config = new _Logger("configurations", m_sinks, ss.str().c_str());
m_config = new _Logger("config ", m_sinks, ss.str().c_str());
m_system = new _Logger("system ", m_sinks, ss.str().c_str());
m_sctp = new _Logger("sctp ", m_sinks, ss.str().c_str());
m_nas_mm = new _Logger("nas_mm ", m_sinks, ss.str().c_str());
......@@ -77,8 +77,7 @@ void Logger::_init(
m_amf_n2 = new _Logger("amf_n2 ", m_sinks, ss.str().c_str());
m_amf_n1 = new _Logger("amf_n1 ", m_sinks, ss.str().c_str());
m_amf_n11 = new _Logger("amf_n11", m_sinks, ss.str().c_str());
m_amf_server = new _Logger("amf_server", m_sinks, ss.str().c_str());
m_task_amf_n2 = new _Logger("task_amf_n2", m_sinks, ss.str().c_str());
m_amf_server = new _Logger("amf_sbi", m_sinks, ss.str().c_str());
}
//------------------------------------------------------------------------------
......
......@@ -94,7 +94,6 @@ class Logger {
static _Logger& amf_n1() { return *singleton().m_amf_n1; }
static _Logger& amf_n11() { return *singleton().m_amf_n11; }
static _Logger& amf_server() { return *singleton().m_amf_server; }
static _Logger& task_amf_n2() { return *singleton().m_task_amf_n2; }
private:
static Logger* m_singleton;
......@@ -124,7 +123,6 @@ class Logger {
_Logger* m_amf_n1;
_Logger* m_amf_n11;
_Logger* m_amf_server;
_Logger* m_task_amf_n2;
};
#endif
......@@ -160,7 +160,7 @@ if(STATIC_LINKING)
else (STATIC_LINKING)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -fstack-protector-all -DMALLOC_CHECK_=3 -DINFO_IS_ON=1 -DDEBUG_IS_ON=1 -DTRACE_IS_ON=1 -O0 -fsanitize=address -fno-omit-frame-pointer")
endif(STATIC_LINKING)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O2 -fno-omit-frame-pointer -s -DINFO_IS_ON=1 ")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -O2 -fno-omit-frame-pointer -s -DINFO_IS_ON=1 -DDEBUG_IS_ON=1")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -O2 -DINFO_IS_ON=1 ")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS} -Os -s -DTRACE_IS_ON=1 -DDEBUG_IS_ON=1 -DINFO_IS_ON=1 -DAUTH_ALG_ON=0")
......@@ -169,7 +169,7 @@ if(STATIC_LINKING)
else(STATIC_LINKING)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -std=c++17 -g -fstack-protector-all -DMALLOC_CHECK_=3 -DINFO_IS_ON=1 -DDEBUG_IS_ON=1 -DTRACE_IS_ON=1 -O0 -fsanitize=address -fno-omit-frame-pointer")
endif(STATIC_LINKING)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -fno-omit-frame-pointer -s -DINFO_IS_ON=1")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -std=c++17 -O2 -fno-omit-frame-pointer -s -DINFO_IS_ON=1 -DDEBUG_IS_ON=1")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -std=c++17 -g -O2 -DINFO_IS_ON=1")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -std=c++17 -Os -s")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment