[NETVIRT-1111] BGP: some log messages have wrong LEVEL (ERROR instead of INFO) Created: 21/Feb/18 Updated: 04/Oct/18 Resolved: 04/Oct/18 |
|
| Status: | Resolved |
| Project: | netvirt |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Medium |
| Reporter: | Valentina Krasnobaeva | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
So I execute in ODL shell : karaf@root()> bgp-connect -p 7644 -h 127.0.0.1 add karaf@root()> Connection with quagga was established successfully and in the code snippet of BgpRouter below we can see, that these messages were emitted, while Try branch was executed. And as opposite, in a catch section instead of ERROR level we can see messages which will be emitted at DEBUG level: public synchronized boolean connect(String bgpHost, int bgpPort) { String msgPiece = "BGP config server at " + bgpHost + ":" + bgpPort; if (!BgpConfigurationManager.isValidConfigBgpHostPort(bgpHost, bgpPort)) { LOG.error("Invalid config server host: {}, port: {}", bgpHost, bgpPort); return false; } final int numberOfConnectRetries = 180; configServerUpdated = false; RetryOnException connectRetry = new RetryOnException(numberOfConnectRetries); disconnect(); setConnectTS(System.currentTimeMillis()); do { if (!isBGPEntityOwner.getAsBoolean()) { LOG.error("Non Entity BGP owner trying to connect to thrift. Returning"); isConnected = false; return false; } if (configServerUpdated) { LOG.error("Config server updated while connecting to server {} {}", bgpHost, bgpPort); isConnected = false; return false; } try { LOG.error("Trying to connect BGP config server at {} : {}", bgpHost, bgpPort); TSocket ts = new TSocket(bgpHost, bgpPort, CONNECTION_TIMEOUT); transport = ts; transport.open(); ts.setTimeout(THRIFT_TIMEOUT_MILLI); isConnected = true; setLastConnectedTS(System.currentTimeMillis()); LOG.error("Connected to BGP config server at {} : {}", bgpHost, bgpPort); break; } catch (TTransportException tte) { LOG.debug("Failed connecting to BGP config server at {} : {}. msg: {}; Exception :", bgpHost, bgpPort, msgPiece, tte); if (tte.getCause() instanceof ConnectException) { LOG.debug("Connect exception. Failed connecting to BGP config server at {} : {}. " + "msg: {}; Exception :", bgpHost, bgpPort, msgPiece, tte); connectRetry.errorOccured(); } else { //In Case of other exceptions we try only 3 times connectRetry.errorOccured(60); } } } while (connectRetry.shouldRetry());
There are a lot of places in bgpmanager, when log messages have such confusing LEVEL // private void reConnect(TTransportException tte) { Bgp bgpConfig = bgpConfigSupplier.get(); if (bgpConfig != null) { LOG.error("Received TTransportException, while configuring qthriftd, goind for Disconnect/Connect " + " Host: {}, Port: {}", bgpConfig.getConfigServer().getHost().getValue(), bgpConfig.getConfigServer().getPort().intValue()); disconnect(); try {
|