openbaton / autoscaling-engine

Respository containing the source code of the autoscaling system
Apache License 2.0
5 stars 5 forks source link

ASE not starting - invalid_token #23

Closed ccollicutt closed 6 years ago

ccollicutt commented 6 years ago

I'm trying to build an image of openbaton with ASE in a Packer image that is then deployed in OpenStack.

For some reason ASE won't startup in the new image, though the NFVO and Generic NFVM will.

I see many of these in the ASE log:

2018-01-02 22:43:53.389 ERROR 2023 --- [main] org.openbaton.sdk.api.util.RestUtils     : Status expected: 200 obtained: 401
2018-01-02 22:43:53.390 ERROR 2023 --- [main] org.openbaton.sdk.api.util.RestUtils     : httpresponse: HttpResponseProxy{HTTP/1.1 401  [X-Content-Type-Options: nosniff, X-XSS-Protection: 1; mode=block, Cache-Control: no-cache, no-store, max-age=0, must-revalidate, Pragma: no-cache, Expires: 0, X-Frame-Options: DENY, Cache-Control: no-store, Pragma: no-cache, WWW-Authenticate: Bearer realm="oauth2-server", error="invalid_token", error_description="Invalid access token: 4c3821ef-6086-4c6d-a2ff-425608536c19", Content-Type: application/json;charset=UTF-8, Transfer-Encoding: chunked, Date: Tue, 02 Jan 2018 22:43:53 GMT] ResponseEntityProxy{[Content-Type: application/json;charset=UTF-8,Chunked: true]}}
2018-01-02 22:43:53.390 ERROR 2023 --- [main] org.openbaton.sdk.api.util.RestUtils     : Body: {"error":"invalid_token","error_description":"Invalid access token: 4c3821ef-6086-4c6d-a2ff-425608536c19"}

Any thoughts on this?

Thanks.

gc4rella commented 6 years ago

@ccollicutt latest versions of the ASE requires a service token which is used runtime to interact with the NFVO. The service token is automatically generated while using the bootstrap procedure, otherwise you need to generate it manually via dashboard or CLI. More information can be found on http://openbaton.github.io/documentation/services/, while an example is provided in the FMS README (https://github.com/openbaton/fm-system/#configure-the-service-key).

ccollicutt commented 6 years ago

Any way to automate this?

gc4rella commented 6 years ago

the bootstrap procedure already does it. Please check the function create_service at: http://get.openbaton.org/bootstraps/latest/bootstrap-common-functions

it uses the open baton CLI for making a request to the NFVO.

ccollicutt commented 6 years ago

Awesome, thanks so much for responding. Much appreciated.