[VTN-61] VTN Manager's REST API does not work with odl-integration-compatible-with-all Created: 14/Mar/15  Updated: 19/Oct/17  Resolved: 30/Jun/15

Status: Resolved
Project: vtn
Component/s: VTN Manager
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Hideyuki Tai Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File karaf.log    
External issue ID: 2844

 Description   

I observed that the REST API of VTN Manager did not work at all when I installed the feature "odl-vtn-manager-all" with the feature "odl-integration-compatible-with-all".

I observed this issue on the Karaf distribution for integration tests which I built from the source code of the integration.git on 03/13 2015 (PDT).

How to reproduce the issue
==========================

1. Build a Karaf distribution for integration tests.

$ cd

{integration.git}

$ cd distributions/test
$ mvn clean install -DskipTests

2. Run the Karaf.

$ cd target/assembly
$ ./bin/karaf

3. Install features on the Karaf console.

opendaylight-user@root> feature:install odl-integration-compatible-with-all odl-openflowplugin-flow-services-ui odl-openflowplugin-adsal-compatibility odl-vtn-manager-all

4. Wait until VTN Manager bundles become "Active".

You can check the state of VTN Manager bundles by executing the following command.

bundle:list | grep vtn

5. Call the REST API of VTN Manager.

$ curl -v --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X GET \
http://localhost:8282/controller/nb/v2/vtn/default/vtns

The response message from the controller should contain the empty VTN list, and the response code should be 200.

However, the response code was 503 (Service Unavailable), and response message was "VTN Manager: Service is not available. Could be down for maintanence".

Error log message
=================

When I called the REST API, the controller output the following ERROR message into the karaf.log.

2015-03-13 20:07:53,582 | ERROR | -bio-8282-exec-1 | ContainerResponse | 108 - com.sun.jersey.jersey-server - 1.17.0 | Mapped exception to response: 503 (Service Unavailable)
org.opendaylight.controller.northbound.commons.exception.ServiceUnavailableException
at org.opendaylight.vtn.manager.northbound.VTNNorthBoundBase.serviceUnavailable(VTNNorthBoundBase.java:133)[491:org.opendaylight.vtn.manager.northbound:0.3.0.SNAPSHOT]
at org.opendaylight.vtn.manager.northbound.VTNNorthBoundBase.getVTNManager(VTNNorthBoundBase.java:180)[491:org.opendaylight.vtn.manager.northbound:0.3.0.SNAPSHOT]
at org.opendaylight.vtn.manager.northbound.VTenantNorthbound.getTenants(VTenantNorthbound.java:89)[491:org.opendaylight.vtn.manager.northbound:0.3.0.SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_65]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_65]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_65]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_65]

For your investigation, I attached the karaf.log on the issue into this bug report.

Complementary Information
=========================

When I just installed the feature odl-vtn-manager-all, the REST API of VTN Manager worked fine.



 Comments   
Comment by Hideyuki Tai [ 14/Mar/15 ]

Attachment karaf.log has been added with description: The karaf.log on the issue.

Comment by Hideyuki Tai [ 28/Mar/15 ]

It seems to me that this problem (VTN-61) occurred in the CSIT.

For example, we observed that all REST APIs of the VTN Manager returned "503" on the build #111 of the vtn-csit-1node-imds-manager-all-master job.

https://jenkins.opendaylight.org/releng/view/vtn/job/vtn-csit-1node-imds-manager-all-master/111/

I saw the following WARN message in the karaf.log of the build #111.

2015-03-26 09:09:02,235 | WARN | pool-61-thread-2 | AbstractLifeCycle | 179 - org.eclipse.jetty.aggregate.jetty-all-server - 8.1.14.v20131031 | FAILED HttpServiceContext{httpContext=WebAppHttpContext{org.opendaylight.vtn.manager.northbound - 509}}: java.lang.IllegalStateException: No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator@1cc27df8 in org.eclipse.jetty.security.ConstraintSecurityHandler@24dc3388
java.lang.IllegalStateException: No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator@1cc27df8 in org.eclipse.jetty.security.ConstraintSecurityHandler@24dc3388
at org.eclipse.jetty.security.authentication.LoginAuthenticator.setConfiguration(LoginAuthenticator.java:61)[179:org.eclipse.jetty.aggregate.jetty-all-server:8.1.14.v20131031]

Comment by Hideyuki Tai [ 30/Jun/15 ]

The following patches fix this issue.
https://git.opendaylight.org/gerrit/#/c/22714/
https://git.opendaylight.org/gerrit/#/c/22734/

Generated at Wed Feb 07 20:47:54 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.