Admins cannot edit or see node templates created by another user in Rancher v2.0.0-v2.3.2.

This document (000020183) is provided subject to the disclaimer at the end of this document.

Situation

Issue

Admins cannot edit or see node templates created by another user in Rancher v2.0.0 to v2.3.2. As a result, they are also unable to edit a cluster with a user that did not create it, even if that user is an admin.

Workaround

Change node template owner

This script will change your node template owner in Rancher 2.x. You can run this script as a Docker image or directly as a bash script. You'll need the cluster ID and the user ID you want to change the ownership to.

  1. To obtain the cluster ID in the Rancher user interface, Navigate to Global > "Your Cluster Name", then grab the cluster ID from your address bar. I have listed an example of the URL and a cluster ID derrived from the URL below.

    - Example URL: https://<RANCHER URL>/c/c-48x9z/monitoring - Derived cluster ID from above URL: c-48x9z

  2. Now we need the user ID of the user to become the new node template owner, navigate to Global > Users to find the ID.

  3. To run the script using a docker image, make sure your $KUBECONFIG is set to the full path of your Rancher local cluster kube config then run the following command.

    docker run -ti -v $KUBECONFIG:/root/.kube/config patrick0057/change-nodetemplate-owner -c <cluster-id> -n <user-id>
  4. To run the script directly, just download the change-nodetemplate-owner.sh script, make sure your $KUBECONFIG or ~/.kube/config is pointing to the correct Rancher local cluster then run the following command:

    curl -LO https://github.com/rancherlabs/support-tools/raw/master/change-nodetemplate-owner/change-nodetemplate-owner.sh
    bash change-nodetemplate-owner.sh -c <cluster-id> -n <user-id>
Assign a node template to a cluster's node pool

Assign a node template to a cluster's node pool. This is useful for situations where the original owner of a cluster has been deleted which also deletes their node templates. To use this task successfully it is recommended that you create a new node template in the UI before using it. Make sure the node template matches the original ones as closely as possible. You will be shown options to choose from and prompted for confirmation.

Run script with docker image:

docker run -ti -v $KUBECONFIG:/root/.kube/config patrick0057/change-nodetemplate-owner -t changenodetemplate -c <cluster-id>
Run script from bash command line:
curl -LO https://github.com/rancherlabs/support-tools/raw/master/change-nodetemplate-owner/change-nodetemplate-owner.sh
bash change-nodetemplate-owner.sh -t changenodetemplate -c <cluster-id>

Resolution

Upgrade to Rancher v2.3.3 or newer to receive the fix to this issue. More information on this bug can be found at the GitHub issue #12186.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020183
  • Creation Date: 06-May-2021
  • Modified Date:06-May-2021
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center