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

Multitenancy does not work in CAPOCI using instance principals. #180

Open
yimw opened this issue Oct 27, 2022 · 2 comments
Open

Multitenancy does not work in CAPOCI using instance principals. #180

yimw opened this issue Oct 27, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@yimw
Copy link
Member

yimw commented Oct 27, 2022

What would you like to be added:
Support Multitenancy in CAPOCI

Why is this needed:
for the current CAPOCI we tested, we created multiple clusters on different Tenancy by using One management cluster:
~  k get clusters -A
NAMESPACE NAME PHASE AGE VERSION
default capioke Provisioned 37h (# This one on Tenancy A compartment A1)
default capoci Provisioned 13h (# This one on Tenancy A compartment A2)
default simplecluster Provisioned 13h (# This one on Tenancy B compartment B1)

And in the CAPOCI controller log, we found such error info:
~  k logs capoci-controller-manager-6574d4c58-nlxp6 -n cluster-api-provider-oci-system
failed to reconcile VCN for OCICluster default/capioke: Error returned by VirtualNetwork Service. Http Status Code: 404. Error Code: NotAuthorizedOrNotFound. Opc request id: 96b0b9de49c13bd31c62771134e90561/66A16B024E825D025C4E6B533054C281/B8ABA034DB613580462A833F052E3214. Message: Authorization failed or requested resource not found.

The failed reason I guess is the credentials we used for creating simplecluster which cannot be authorized to check other clusters.

And in our env, we don't have instance principals support, we could only leverage user principals.

@yimw yimw added the enhancement New feature or request label Oct 27, 2022
@cheherna
Copy link
Member

cheherna commented Nov 3, 2022

As per clarification

  • In my personal opinion Resource Principals work better for this particular use case, why we don't use them instead of plain instance principals?
  • How the error of not been authorized (as before) has to be handled? (Retry, terminate the operation, etc)

@shyamradhakrishnan
Copy link
Member

@yimw , for the error you are getting, it seems like you have not provided proper permissions on the network-family resource. But we tested the same and we have found a bug in OCI Service Gateway due to which network creation using CAPOCI is not working. We will update here once that bug is fixed.
@cheherna Resource Principals are not externally visible feature which CAPOCI can use, atleast as per last information I have. When we get an auth error, we go into a exponential backoff and retry mechanism.

@shyamradhakrishnan shyamradhakrishnan added bug Something isn't working and removed enhancement New feature or request labels Jan 18, 2023
@shyamradhakrishnan shyamradhakrishnan changed the title Multitenancy support in CAPOCI Multitenancy does not work in CAPOCI using instance principals. Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants