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

Error: Error when loading default quota in version 0.50.5 #467

Open
MatzeScandio opened this issue Mar 9, 2023 · 5 comments
Open

Error: Error when loading default quota in version 0.50.5 #467

MatzeScandio opened this issue Mar 9, 2023 · 5 comments
Labels

Comments

@MatzeScandio
Copy link

We hid an error with the newest version 0.50.5

Error: Error when loading default quota: no resource exists with the name organization_quotas, did you add it to 'api/cloudcontroller/ccv3/internal/api_routes.go'? 

  on providers.tf line 63, in provider "cloudfoundry":
  63: provider "cloudfoundry" {}

When fixing the provider version to 0.50.4 the issue does not occur

 cloudfoundry = {
   source  = "cloudfoundry-community/cloudfoundry"
   version = "0.50.4"
 }
@loafoe loafoe added the bug label Mar 10, 2023
@loafoe
Copy link
Member

loafoe commented Mar 10, 2023

@Thanhphan1147 any ideas on this?

@toabi
Copy link

toabi commented Mar 10, 2023

My feeling is it's maybe related to those lines?

v0.50.4...v0.50.5#diff-0699725891f824c351d041b354b8654923f9907cb8952349b63f00189c755762L419-R425

… as it changed from getQuoats to getOrganizationQuotas. Are Org Quotas a rather "newish" feature and our CF doesn't support them yet?

@Thanhphan1147
Copy link
Contributor

Hi @MatzeScandio, can you show me the output of cf curl /v3 targeting your CF environment? The issue here is that the list of available resources are fetched with a call to /v3. And I believe in earlier versions of the cloudcontroller this resources is not yet implemented (versions earlier than 3.80.0 : http://v3-apidocs.cloudfoundry.org/version/3.80.0/#organization-quotas)

@MatzeScandio
Copy link
Author

MatzeScandio commented Mar 10, 2023

Hi @Thanhphan1147 , thanks for looking at it. An outdated seems likely. Checked the api versions for our CF and it is 3.50.0 :

$ cf curl /v3 
{
   "links": {
      "self": {
         "href": "https://example.com/v3"
      },
      "apps": {
         "href": "https://example.com/v3/apps"
      },
      "audit_events": {
         "href": "https://example.com/v3/audit_events"
      },
      "buildpacks": {
         "href": "https://example.com/v3/buildpacks"
      },
      "builds": {
         "href": "https://example.com/v3/builds"
      },
      "deployments": {
         "href": "https://example.com/v3/deployments",
         "experimental": true
      },
      "domains": {
         "href": "https://example.com/v3/domains"
      },
      "droplets": {
         "href": "https://example.com/v3/droplets"
      },
      "environment_variable_groups": {
         "href": "https://example.com/v3/environment_variable_groups"
      },
      "feature_flags": {
         "href": "https://example.com/v3/feature_flags"
      },
      "isolation_segments": {
         "href": "https://example.com/v3/isolation_segments"
      },
      "organizations": {
         "href": "https://example.com/v3/organizations"
      },
      "packages": {
         "href": "https://example.com/v3/packages"
      },
      "processes": {
         "href": "https://example.com/v3/processes"
      },
      "resource_matches": {
         "href": "https://example.com/v3/resource_matches"
      },
      "roles": {
         "href": "https://example.com/v3/roles",
         "experimental": true
      },
      "routes": {
         "href": "https://example.com/v3/routes"
      },
      "service_brokers": {
         "href": "https://example.com/v3/service_brokers",
         "experimental": true
      },
      "service_instances": {
         "href": "https://example.com/v3/service_instances"
      },
      "service_offerings": {
         "href": "https://example.com/v3/service_offerings",
         "experimental": true
      },
      "spaces": {
         "href": "https://example.com/v3/spaces"
      },
      "stacks": {
         "href": "https://example.com/v3/stacks"
      },
      "tasks": {
         "href": "https://example.com/v3/tasks"
      },
      "users": {
         "href": "https://example.com/v3/users",
         "experimental": true
      }
   }
}

Any chance to make it backwards compatible, or would that be a big headache.

@Thanhphan1147
Copy link
Contributor

Hi, sorry for the late response,

It would probably be quite a headache since we'd need to add a logic to fetch quotas using /v2 endpoint if we don't find the /v3 endpoint. I think the best solution would simply be fixing your provider version until your org upgrades the CAPI version

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

No branches or pull requests

4 participants