Moab Web Services > Access Control > How-to > Removing a Tenant

Removing a Tenant

The following instructions are applicable to cloud, not HPC, environments.

To remove a tenant

  1. Prevent service creation and migration from occurring on nodes assigned to the tenant you want to remove; to prevent such, you must do the following:
    • Delete principals associated with the tenant, which revokes the create service permission for the tenant for all users.
    • Create reservations on each of the tenant's nodes.

    Deleting principals associated with the tenant prevents new services from being created on the tenant's nodes, but it does not stop existing services from migrating among those nodes. Creating reservations also prevents new services from being created, and it also prevents migration onto nodes; if users try to create new services, they will be unable to do so (an error results) because the reservation(s) prevent the requested services from being placed.

  2. (Optional) Determine whether you want to delete or retain any service template(s) presently attached to the tenant you want to remove.
    • If you want to retain a service template, through the REST interface, copy it to another tenant. You can also copy service templates to a new tenant using the included msvctempl command line script distributed with MWS. See The msvctempl Provisioning Script for more information about syntax, commands, and options associated with the script.

    Once you've copied all the service templates you want to keep, you should delete the remaining service templates from the tenant.

  3. Migrate to another tenant, or delete, any service(s) assigned to the tenant you want to remove. Only container services can be migrated, but when they are, they automatically migrate all their child services as well.

    If you have a lot of services assigned to the tenant you want to remove, consider migrating the services in smaller sets to avoid disruptions to data center performance.

    It may take some time for all migrations and deletions to complete. Verify that all services have evacuated the tenant's nodes before allowing services from other tenants to use those nodes.

  4. Once all services have cleared the tenant's nodes, you may reassign those nodes to other tenants. If the tenant's nodes are reassigned to other tenants before all services clear, services from different tenants may run simultaneously on those nodes.
    • Reassign the nodes presently assigned to the tenant you want to remove; for details on how to do so via the REST interface (see Modify Single Tenant) or by running the included mtenant command line script distributed with MWS. See The mtenant Provisioning Script for more information about syntax, commands, and options associated with the script.

    Moab may attempt to migrate services belonging to the tenant you want to remove to available nodes still owned by that tenant. However, the VMs should not have any eligible nodes to migrate to. Following these instructions should minimize the number of migrations, effectively eliminating the case where a VM needs to migrate off and then right back onto a node.

  5. Delete the tenant you want to remove. To do so using the REST interface, see Deleting Tenants for details.

Related Topics 

© 2015 Adaptive Computing