Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.

Conversation

@xieus
Copy link
Contributor

@xieus xieus commented Jul 22, 2020

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.

@xieus xieus added the bug Something isn't working label Jul 22, 2020
@xieus xieus added this to the Version 0.7.2020.07.30 milestone Jul 22, 2020
@xieus xieus self-assigned this Jul 22, 2020
@xieus
Copy link
Contributor Author

xieus commented Jul 22, 2020

Our JAVA CI keeps complaining of one SwaggerJsonTest failure. It is non-blocking and can't be reproducible locally. Likely a CI issue which caused by different JDK version in CI env and Alcor Codes (tracking issue #312 )

[ERROR] Errors:
[ERROR] SwaggerJsonTest.createSpringfoxSwaggerJson » IllegalState Failed to load Appli...
[INFO]
[ERROR] Tests run: 13, Failures: 0, Errors: 1, Skipped: 0

Copy link
Contributor

@er1cthe0ne er1cthe0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xieus xieus changed the title [Hotfix] Add missing configuration annotation to ElasticIpManagerRestClient [Hotfix] Add missing configuration annotation to EIP RestClient Jul 22, 2020
@xieus xieus merged commit 4d46aa9 into futurewei-cloud:master Jul 22, 2020
@xieus xieus deleted the pm/eipfix branch July 22, 2020 21:05
@haboy52581
Copy link
Contributor

Our JAVA CI keeps complaining of one SwaggerJsonTest failure. It is non-blocking and can't be reproducible locally. Likely a CI issue which caused by different JDK version in CI env and Alcor Codes (tracking issue #312 )

[ERROR] Errors:
[ERROR] SwaggerJsonTest.createSpringfoxSwaggerJson » IllegalState Failed to load Appli...
[INFO]
[ERROR] Tests run: 13, Failures: 0, Errors: 1, Skipped: 0

I could easily reproduce this issue locally after updating to the latest master code on eim

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants