Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imminent cloudfoundry v2 api death and impact #5047

Open
2 of 9 tasks
thelangley opened this issue Dec 18, 2024 · 2 comments
Open
2 of 9 tasks

Imminent cloudfoundry v2 api death and impact #5047

thelangley opened this issue Dec 18, 2024 · 2 comments

Comments

@thelangley
Copy link

thelangley commented Dec 18, 2024

Stratos Version

4.4 and v4.8.1

Frontend Deployment type

  • Cloud Foundry Application (cf push)
  • Kubernetes, using a helm chart
  • Docker, single container deploying all components
  • npm run start
  • Other (please specify below)

Backend (Jet Stream) Deployment type

  • Cloud Foundry Application (cf push)
  • Kubernetes, using a helm chart
  • Docker, single container deploying all components
  • Other (please specify below)

Expected behaviour

App starts nicely and is able to be used

Actual behaviour

Stratos does not start due to V2 API being disabled

Steps to reproduce the behavior

Log output covering before error and any error statements

   2024-12-18T08:05:23.64+0000 [APP/PROC/WEB/0] OUT FATA[Wed Dec 18 08:05:23 UTC 2024] Could not get the info for Cloud Foundry: https://api.blahblah.cloudfoundry/v2/info endpoint returned 404
   2024-12-18T08:05:23.64+0000 [APP/PROC/WEB/0] OUT V2 endpoints disabled

Detailed Description

CF cloudcontroller V2 API is due to be retired in the first cut of cf-deployment starting January 2025. We've tried disabling it early to see what breaks.

Stratos is one of the breaks.

Context

Stratos could be re-worked to leverage v3 api calls instead of v2 api calls which would future proof it against this change.

@pburkholder
Copy link

@thelangley Do you have a list of all the things that are prone to break with the death of V2?

@thelangley
Copy link
Author

thelangley commented Jan 6, 2025

CF uses a versioned API so any Stratos code that tries to make a CF call that starts with /v2 will not work by default.

So that starts with v2/info (which currently provides good info like auth endpoint)

At the moment, Stratos doesn't start because v2/info doesn't exist. There is a PR for the cf-python-client which has a similar issue. It may be that a similar path could be taken cloudfoundry-community/cf-python-client#221

And then there's all of the other endpoints https://v3-apidocs.cloudfoundry.org/version/3.184.0/index.html

It looks like this has been discussed previously but de-prioritised. #3149

Majority of the functionality in Stratos already uses the V7 cf cli and v3 endpoints. So the majority of the work may have already been completed. It appears to be just the initial login (finding uaa url from v2/info) with the issue.

So as I see it https://github.com/cloudfoundry/stratos/blob/v4.8.1/src/jetstream/plugins/cloudfoundry/main.go#L214 and any other V2Info bits inside this function need to be re-written. That may mean that other sections of code that use this function may need to be tweaked too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants