This repository was archived by the owner on Mar 31, 2023. It is now read-only.
[Hotfix] Add missing configuration annotation to EIP RestClient #311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR proposes a hotfix to a missing qualifying bean issue introduced by a recent change.
Client Logs
The symptom is DELETE /ports/<port_id> call failed with the following exception
2020-07-22 11:29:19.604 13272 DEBUG neutronclient.v2_0.client [-] Error message: {"timestamp":"2020-07-22T17:49:52.661+0000","status":500,"error":"Internal Server Error","message":"No qualifying bean of type 'com.futurewei.alcor.web.restclient.ElasticIpManagerRestClient' available","path":"/project/f282163e-0698-40d0-8da9-07661a2ce609/ports/f6a00f29-d997-476e-aa1b-77e55bf8cfdc"} _handle_fault_response /usr/lib/python2.7/dist-packages/neutronclient/v2_0/client.py:259
Server Logs
2020-07-22 19:34:10.521 INFO 1 --- [nio-8080-exec-7] c.f.alcor.common.stats.StatisticsAspect : com.futurewei.alcor.web.restclient.IpManagerRestClient.allocateIpAddress() startTime: 18652863559180410ns, endTime: 18652863569553127ns, duration: 10ms
2020-07-22 19:34:10.521 DEBUG 1 --- [nio-8080-exec-7] o.s.web.servlet.DispatcherServlet : Failed to complete request: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.futurewei.alcor.web.restclient.ElasticIpManagerRestClient' available
2020-07-22 19:34:10.522 DEBUG 1 --- [nio-8080-exec-7] o.a.c.loader.WebappClassLoaderBase : findClass(jdk.internal.reflect.GeneratedMethodAccessor51)
2020-07-22 19:34:10.523 DEBUG 1 --- [nio-8080-exec-7] o.a.c.loader.WebappClassLoaderBase : --> Returning ClassNotFoundException
2020-07-22 19:34:10.523 ERROR 1 --- [nio-8080-exec-7] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.futurewei.alcor.web.restclient.ElasticIpManagerRestClient' available] with root cause
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.futurewei.alcor.web.restclient.ElasticIpManagerRestClient' available
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:351) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342) ~[spring-beans-5.2.5.RELEASE.jar!/:5.2.5.RELEASE]
Fix
Add missing configuration annotation to the new ElasticIpManagerRestClient in Port Mgr.