rancher / rancher

Complete container management platform
http://rancher.com
Apache License 2.0
23.22k stars 2.94k forks source link

[BUG] custom cluster roles not available in downstream harvester cluster #41224

Open ibrokethecloud opened 1 year ago

ibrokethecloud commented 1 year ago

Rancher Server Setup

Information about the Cluster

samjustus commented 1 year ago

/backport 2023-Q2-v2.7x test

samjustus commented 1 year ago

SURE-6009

JonCrowther commented 1 year ago

I have attempted multiple ways to reproduce this bug with no success.

@ibrokethecloud , please let me know if I am not following the steps correctly, but here is what I do:

  1. With my test user jono-test that has the role Cluster Member for my harvester cluster I attempt to get pcidevices and see I don't have permission: Screenshot 2023-07-17 at 12 05 30 PM

  2. I create a cluster role that inherits from Cluster Member that has all the verbs for * Resource in API Group devices.harvesterhci.io Screenshot 2023-07-17 at 11 58 40 AM

  3. I then add my test user (which has no other permissions) to my harvester cluster with the Member Role of pcidevices Screenshot 2023-07-17 at 11 59 13 AM

Note: My user is a User-Base Screenshot 2023-07-17 at 12 00 36 PM

  1. I log in with my test user, then in my harvester cluster I open the kubectl shell and do k get pcidevices and am successful Screenshot 2023-07-17 at 12 02 43 PM

Some other things I have attempted that were all successful and behaved as expected

JonCrowther commented 1 year ago

Some information that could help:

ibrokethecloud commented 1 year ago

what is the version of rancher being used? I can share the details of my environment.

JonCrowther commented 1 year ago

The rancher version is v2.7.4 and harvester is v1.1.2

ibrokethecloud commented 1 year ago

The reason for no error was the lack of actual pcidevice objects being created in the harvester cluster.

I created some pcidevice objects and now the error is re-producible in the environment.

JonCrowther commented 1 year ago

I was able to create the error temporarily. However, as soon as I added the following role to a user: Screenshot 2023-07-21 at 11 04 55 AM I was no longer able to recreate the error. Every role I attempted to add afterwards would successfully get propagated to the harvester cluster (including the existing role that had previously given an error)

I'm going through the logs to try and identify what happened, but this may function as a temporary workaround? Admittedly I can only get it to happen once since the error is gone now, so I'm not sure how consistent this may be.

samjustus commented 8 months ago

moving teams to harvester cc @rebeccazzzz

Jono-SUSE-Rancher commented 2 weeks ago

@rebeccazzzz - I haven't seen or heard any movement on this for v2.9.0 or v2.9.1. I am going to move it to v2.9-Next2, please let me know if you have a corresponding Harvester issue and maybe we can close this one?