diff --git a/software/ors-amarisoft/buildout.hash.cfg b/software/ors-amarisoft/buildout.hash.cfg index 1fc37ec3ba837961a0063370c3f3bbbb710ce903..963189801f635bb7cc5bab7d19a505a3092934a6 100644 --- a/software/ors-amarisoft/buildout.hash.cfg +++ b/software/ors-amarisoft/buildout.hash.cfg @@ -60,7 +60,7 @@ md5sum = 52da9fe3a569199e35ad89ae1a44c30e [template-enb] _update_hash_filename_ = instance-enb.jinja2.cfg -md5sum = 02afb6fb088106df46fea25d80963dba +md5sum = be054d3312acd4ff5bea116e9af895b0 [template-ors-enb] _update_hash_filename_ = instance-ors-enb.jinja2.cfg diff --git a/software/ors-amarisoft/instance-enb.jinja2.cfg b/software/ors-amarisoft/instance-enb.jinja2.cfg index 862b8abf16e8ee976bc36e05efc923ba1be028b4..da89dbfa2db15704eb52fc26be7b89a572911971 100644 --- a/software/ors-amarisoft/instance-enb.jinja2.cfg +++ b/software/ors-amarisoft/instance-enb.jinja2.cfg @@ -88,22 +88,36 @@ xlog-fluentbit = ${:var}/xlog-fluentbit [enb-sh-wrapper] recipe = slapos.recipe.template output = ${directory:bin}/${:_buildout_section_name_} -enb-log = ${directory:log}/enb-output.log +enb-info-log = ${directory:log}/enb-info.log +enb-info-archive-log = ${directory:log}/enb-info.log enb-radio-log = ${directory:log}/enb.log enb-start-date = ${directory:run}/enb-start.date inline = #!/bin/sh {% if not slapparameter_dict.get("testing", False) %} - sudo -n /opt/amarisoft/rm-tmp-lte; - sudo -n /opt/amarisoft/init-sdr; - sudo -n /opt/amarisoft/init-enb; + # Amarisoft init scripts + sudo -n /opt/amarisoft/rm-tmp-lte + sudo -n /opt/amarisoft/init-sdr + sudo -n /opt/amarisoft/init-enb + # Add useful information to enb-info log + (echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting eNB software...") >> ${:enb-info-log} + (echo -n "PCB: " ; for o in t b v s ; do sudo -n /opt/amarisoft/get-sdr-info -$o 2> /dev/null ; echo -n " " ; done ; echo) >> ${:enb-info-log} + (AMARISOFT_PATH=/dev/null {{ enb }}/lteenb ${directory:etc}/enb.cfg 2>&1 >/dev/null | sed -n 's/^.*\(Host ID.*\)$/\1/gp') >> ${:enb-info-log} + echo "System info: $(uname -a)" >> ${:enb-info-log} + ({{ sdr }}/sdr_util version && echo) >> ${:enb-info-log} + # Keep the 50 latest enb radio log stat ${:enb-start-date} && mv ${:enb-radio-log} ${directory:log}/enb-$(cat ${:enb-start-date}).log rm -f $(ls -1t ${directory:log}/enb-2* | tail -n+50) + rm -f $(ls -1t ${directory:log}/enb-info-2* | tail -n+50) date +"%Y-%m-%d-%T" > ${:enb-start-date} - (echo && echo && date "+[%Y/%m/%d %T.%N %Z] Starting eNB software..." && echo) >> ${:enb-log}; - tail -c 1M ${:enb-log} > ${:enb-log}.tmp; - mv ${:enb-log}.tmp ${:enb-log}; - {{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${:enb-log} 2>> ${:enb-log}; + # Trim enb info log to 500k and keep a 100M archive of enb info log + head -c -500k ${:enb-info-log} >> ${:enb-info-archive-log} + tail -c 500k ${:enb-info-log} > ${:enb-info-log}.tmp + mv ${:enb-info-log}.tmp ${:enb-info-log} + tail -c 100M ${:enb-info-archive-log} > ${:enb-info-archive-log}.tmp + mv ${:enb-info-archive-log}.tmp ${:enb-info-archive-log} + # Launch lteenb + {{ enb }}/lteenb ${directory:etc}/enb.cfg >> ${:enb-info-log} 2>> ${:enb-info-log} {% endif %} [enb-service] diff --git a/software/ors-amarisoft/instance-ors-gnb-input-schema.json b/software/ors-amarisoft/instance-ors-gnb-input-schema.json index eb9c2a2c98199fd273c35b9662bb53e6ca19c2b7..606ba1478dd6e21794128dfeb9db93cd71808209 100644 --- a/software/ors-amarisoft/instance-ors-gnb-input-schema.json +++ b/software/ors-amarisoft/instance-ors-gnb-input-schema.json @@ -50,6 +50,10 @@ "$ref": "instance-enb-input-schema.json#/properties/gnb_id_bits", "default": 28 }, + "gtp_addr": { + "$ref": "instance-enb-input-schema.json#/properties/gtp_addr", + "default": "127.0.1.1" + }, "amf_list": { "$ref": "instance-enb-input-schema.json#/properties/amf_list", "default": {