netopeer2 icon indicating copy to clipboard operation
netopeer2 copied to clipboard

how to increase or decrease call-home timeout & no.of attempts

Open chendrashekarp opened this issue 3 years ago • 1 comments

Hi @michalvasko , i want to increase or decrease the timeout of call-home in run-time & i want to limit call-home operation re-attempt for particular number of times , could you please suggest me a better approach

chendrashekarp avatar Oct 14 '22 10:10 chendrashekarp

You have not mentioned details but you can find some timeouts in this YANG configuration subtree that you can adjust and the number of attempts is separately here.

michalvasko avatar Oct 17 '22 06:10 michalvasko

Hello @michalvasko,

In O-RAN M-Plane specification, there are similar items stated such as re-call-home-no-ssh-timer and max-call-home-attempts in o-ran-operations.yang (revision 2021-12-01).

O-RAN.WG4.MP.0-v09.00.pdf -> 6.3 NETCONF call home to O-RU controller(s) (page 32 - 33)

module: o-ran-operations +--rw re-call-home-no-ssh-timer? (default 60 seconds) +--rw max-call-home-attempts? (range "0 .. 20")

I am not sure that @chendrashekarp refered to these.

I do understand that netopeer2 does not handle this o-ran-operations.yang, but operation scenarios are closely related to netopeer2-server itself.

max-call-home-attempts might refer to reconnect-strategy max-attempts in ietf-netconf-server.yang. However, I think re-call-home-no-ssh-timer is not related to periodic-connection timer.

Do you have any static or dynamic timer like re-call-home-no-ssh-timer in netopeer2-server configuration?

Thanks always.

Best Regards, James Park

jamespark76 avatar Oct 19 '22 23:10 jamespark76

Do you have any static or dynamic timer like re-call-home-no-ssh-timer in netopeer2-server configuration?

Probably not, it is the compile-time variable CALL_HOME_BACKOFF_WAIT of libnetconf2. This parameter is not part of ietf-netconf-server YANG modules so we do not support it. However, I have brought this problem to attention of the WG and it seems it will be added and then we will support it directly.

michalvasko avatar Oct 20 '22 06:10 michalvasko

Hi @michalvasko , as per leaf description , this

 container reconnect-strategy {
"The reconnection strategy directs how a NETCONF server
                reconnects to a NETCONF client, after discovering its
                connection to the client has dropped, even if due to a
                reboot.  The NETCONF server starts with the specified
                endpoint and tries to connect to it max-attempts times
                before trying the next endpoint in the list
}
leaf max-attempts {
               type uint8 {
                 range "1..max";
               }
               default "3";
               description
                 "Specifies the number times the NETCONF server tries
                  to connect to a specific endpoint before moving on
                  to the next endpoint in the list (round robin).";
             }

, this max-attempts will work only if there is connection drop & not for qst time connection ? is my understanding correct and if yes i need a parameters to work exactly

module: o-ran-operations
+--rw re-call-home-no-ssh-timer? (default 60 seconds)
+--rw max-call-home-attempts? (range "0 .. 20")

chendrashekarp avatar Oct 20 '22 11:10 chendrashekarp

As I have said before, from those 2 parameters only max-call-home-attempts is supported, the other is not. And we will implement the other only once ietf-netconf-server YANG modules are published and we migrate to them.

michalvasko avatar Oct 20 '22 11:10 michalvasko

Hi @michalvasko , yes for parameter max-call-home-attempts , will it applicable for 1st time connecting to client also or after there is any connection then only this max-call-home-attempts works? because i set the value as 2 in for max-call-home-attempts in running data store & i am observing the log as failing after 5 attempts

chendrashekarp avatar Oct 20 '22 11:10 chendrashekarp

Wait, you are actually setting the value of max-call-home-attempts of YANG o-ran-operations? Obviously, that is not going to work because that module is not implemented, netopeer2-server implements ietf-netconf-server, so you will have to adjust its node max-attempts.

michalvasko avatar Oct 20 '22 13:10 michalvasko

Hi @michalvasko, sorry for the wrong one , I am setting max-attempts from ietf-netconf-server yang only (netopeer2-version 2.0.35)

chendrashekarp avatar Oct 20 '22 13:10 chendrashekarp

Okay, then it should work. However, I seem to vaguely remember some issue like this and you using an old year version may just be the problem. So, try to update to the latest released version. If the problem persist, let us know.

michalvasko avatar Oct 20 '22 13:10 michalvasko

Hi @michalvasko , I have tried with new version still the behavior is same attaching the log for reference. netopeer2-server -d -v 3:

[INF]: SR: Triggering "ietf-netconf-acm" "done" event on enabled data.
[INF]: LN: Call Home client "default-client" connecting...
[INF]: LN: Trying to connect via IPv4 to 192.168.20.40:4334.
[INF]: LN: Timed out after 5s (Operation now in progress).
[INF]: LN: Trying to connect the pending socket 47.
[INF]: LN: Timed out after 5s (Operation now in progress).
[INF]: LN: Trying to connect the pending socket 47.
[INF]: LN: Timed out after 5s (Operation now in progress).
[INF]: LN: Trying to connect the pending socket 47.
[INF]: LN: Timed out after 5s (Operation now in progress).
[INF]: LN: Trying to connect the pending socket 47.
[INF]: LN: Timed out after 5s (Operation now in progress).
[ERR]: LN: Failed to connect socket 47 after 5 retries, closing.
[INF]: LN: Trying to connect via IPv4 to 192.168.20.40:4334.

sysrepocfg -X -x "/ietf-netconf-server:netconf-server/call-home/netconf-client/reconnect-strategy/*"

<netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server">
  <call-home>
    <netconf-client>
      <name>default-client</name>
      <reconnect-strategy>
        <max-attempts>3</max-attempts>
      </reconnect-strategy>
    </netconf-client>
  </call-home>
</netconf-server>

netopeer2-server -V: netopeer2-server 2.1.36

chendrashekarp avatar Oct 20 '22 13:10 chendrashekarp

It seems there were 2 things mixed up. I have cleaned the code and now it should work correctly, with logging improved as well.

michalvasko avatar Oct 21 '22 11:10 michalvasko

Hi @chendrashekarp,

Are you observing the expected behavior for re-call-home-no-ssh-timer and max-call-home-attempts in o-ran-operations.yang after setting period and max-attempts respectively in ietf-netconf-server.yang in latest version?

saraaibak avatar Mar 21 '23 07:03 saraaibak

Hi @saraaibak , Just max-call-home-attempts was working as expected & for re-call-home-no-ssh-timer we did some changes in the libraries

chendrashekarp avatar Mar 21 '23 08:03 chendrashekarp