Red Hat Training

A Red Hat training course is available for Red Hat Gluster Storage

Appendix A. Utilities

A.1. Domain Management Tool

Red Hat Gluster Storage Console uses directory services to authenticate users. During installation, the manager sets up a domain named internal that is only used to store the admin user. To add and remove other users from the system, you must first add the directory services in which they are found.
The supported directory service is IPA. Red Hat Gluster Storage Console includes a domain management tool, rhsc-manage-domains, to add and remove domains provided by this service. In this way, you can grant access to the Red Hat Gluster Storage environment to users stored across multiple domains.
You will find the rhsc-manage-domains command on the machine on which Red Hat Gluster Storage Console was installed. The rhsc-manage-domains command must be run as the root user.

A.1.1. Syntax

The usage syntax is:
# rhsc-manage-domains action [options]
The available actions are:
add
Add a domain to the console directory services configuration.
edit
Edit a domain in the console directory services configuration.
delete
Delete a domain from the console directory services configuration.
validate
Validate the console directory services configuration. The command attempts to authenticate to each domain in the configuration using the configured user name and password.
list
List the current directory services configuration of the console.
The options that can be combined with the actions on the command line are:
--domain=DOMAIN
Specifies the domain on which the action must be performed. The --domain parameter is mandatory for add, edit, and delete.
--user=USER
Specifies the domain user to use. The --user parameter is mandatory for add, and optional for edit.
--password-file=FILE
A file containing the password. If this is not set, the password is read interactively.
--config-file=FILE
Specifies an alternative configuration file that the command must load. The --config-file parameter is always optional.
--report
Specifies that all validation errors encountered while performing the validate action will be reported in full.
Common examples of usage are discussed in subsequent sections. For full information on usage, see the rhsc-manage-domains command help output:
# rhsc-manage-domains --help

A.1.2. Listing Domains in Configuration

The rhsc-manage-domains command lists the directory services domains defined in the Red Hat Gluster Storage Console configuration. This command prints the domain, the user name in User Principal Name (UPN) format, and whether the domain is local or remote for each configuration entry.

Example A.1. rhsc-manage-domains List Action

# rhsc-manage-domains list
Domain: directory.demo.redhat.com
User name: admin@DIRECTORY.DEMO.REDHAT.COM
This domain is a remote domain.

A.1.3. Adding Domains to Configuration

In this example, the rhsc-manage-domains command is used to add the IdM domain directory.demo.redhat.com to the Red Hat Gluster Storage Console configuration. The configuration is set to use the admin user when querying the domain; the password is provided interactively.

Example A.2. rhsc-manage-domains Add Action

# rhsc-manage-domains add --domain=directory.demo.redhat.com --provider=IPA --user=admin
loaded template kr5.conf file
setting default_tkt_enctypes
setting realms
setting domain realm
success
User guid is: 80b71bae-98a1-11e0-8f20-525400866c73
Successfully added domain directory.demo.redhat.com. oVirt Engine restart is required in order for the changes to take place (service ovirt-engine restart).

A.1.4. Editing a Domain in the Configuration

In this example, the rhsc-manage-domains command is used to edit the directory.demo.redhat.com domain in the Red Hat Gluster Storage Console configuration. The configuration is updated to use the admin user when querying this domain; the password is provided interactively.

Example A.3. rhsc-manage-domains Edit Action

# rhsc-manage-domains edit --domain=directory.demo.redhat.com --user=admin
loaded template kr5.conf file
setting default_tkt_enctypes
setting realms
setting domain realmo
success
User guide is: 80b71bae-98a1-11e0-8f20-525400866c73
Successfully edited domain directory.demo.redhat.com. oVirt Engine restart is required in order for the changes to take place (service ovirt-engine restart).

A.1.5. Validating Domain Configuration

In this example, the rhsc-manage-domains command is used to validate the Red Hat Gluster Storage Console configuration. The command attempts to log into each listed domain with the credentials provided in the configuration. The domain is reported as valid if the attempt is successful.

Example A.4. rhsc-manage-domains Validate Action

# rhsc-manage-domains validate
User guide is: 80b71bae-98a1-11e0-8f20-525400866c73
Domain directory.demo.redhat.com is valid.

A.1.6. Deleting a Domain from the Configuration

In this example, the rhsc-manage-domains command is used to remove the directory.demo.redhat.com domain from the Red Hat Gluster Storage Console configuration. Users defined in the removed domain will no longer be able to authenticate with the Red Hat Gluster Storage Console. The entries for the affected users will remain defined in the Red Hat Gluster Storage Console until they are explicitly removed.
The domain being removed in this example is the last one listed in the Red Hat Gluster Storage Console configuration. A warning is displayed highlighting this fact and that only the admin user from the internal domain will be able to log in until another domain is added.

Example A.5. rhsc-manage-domains Delete Action

# rhsc-manage-domains delete --domain=directory.demo.redhat.com
WARNING: Domain directory.demo.redhat.com is the last domain in the configuration. After deleting it you will have to either add another domain, or to use the internal admin user in order to login.
Successfully deleted domain directory.demo.redhat.com. Please remove all users and groups of this domain using the Administration portal or the API.