Chapter 8 Configuring System Groups to Manage Client Systems

You can create system groups to perform the same actions on multiple client systems. Typically, a system group contains systems that have a common installation base, architecture, and profile, for example Oracle Linux 6 (x86_64) servers.

If you manage large numbers of systems, creating system groups is a effective way of applying errata, installing or upgrading packages, changing channel subscriptions, deploying configuration files, and reconfiguring kickstart provisioning with a minimum of effort.

Spacewalk provides the System Set Manager, which maintains a current, working system group, or system set, to which you can add or remove systems and system groups. You can perform actions on the systems in the system set or you can save the system set as a new system group.

Note

If a system is present in the system set, the Spacewalk web interface has a check mark in its associated check box on the Systems page. You can select or deselect system check boxes to add or remove systems from a system set.

8.1 Working With System Groups by Using the Spacewalk Web Interface

Figure 8.1 System Groups Page

Select Systems and then System Groups:

  • To create a system group:

    1. Click + create new group.

    2. On the Create System Group page, enter a name and description for the system group.

    3. Click Create Group.

  • To add client systems to a system group:

    1. Click the system group name.

    2. Select the Target Systems tab.

    3. On the Target Systems page, select the check boxes for the systems that you want to add to the group and click Add Systems.

  • To work with a system group:

    1. Click the system group name.

    2. On the Details page, click Work With Group.

      Spacewalk loads the group into the System Set Manager.

      The Selected Systems List page under System Set Manager displays the member systems of the system group. Any actions that you take on the tabs under System Set Manager apply only to these systems.

  • To work with the union or intersection of two or more system groups:

    1. Select the check boxes next to the system groups.

    2. Click either Work With Union or Work With Intersection.

      • Work With Union creates a union group that includes all member systems of the selected groups.

      • Work With Intersection creates an intersection group that includes only systems that are members of all of the selected groups. If no systems are members of all of the groups, the intersection group does not have any members.

      • The Selected Systems List page under System Set Manager displays the member systems of the union or intersection group. Any actions that you take on the tabs under System Set Manager apply only to these systems.

      • To save a union or intersection group as a new system group, select the Groups tab, click + create new group, enter a name and description for the system group, and click Create Group.

  • To remove client systems from a system group:

    1. Click the system group name.

    2. Select the Systems tab.

    3. On the Systems page, select the check boxes of the systems that you want to remove from the group and click Remove Systems.

  • To delete a system group:

    1. Click the system group name.

    2. Click delete group and then click Confirm Deletion.

8.2 Working With System Groups by Using the spacecmd Command

Create a system group by using the group_create command as follows:

spacecmd {SSM:0}> group_create group3 "Example system group 3"

To list system groups, use the group_list command:

spacecmd {SSM:0}> group_list
group1
group2
group3

To add client systems to a system group, use the group_addsystems command:

spacecmd {SSM:0}> group_addsystems group3 svr1.mydom.com

You can also specify systems by the software channels to which they are subscribed or the results of a system search, as shown in the following example:

spacecmd {SSM:0}> group_addsystems group3 channel:ol6-x86_64
spacecmd {SSM:0}> group_addsystems group3 ip:192.168.1

See Section 8.3, “Searching for Systems by Using the spacecmd Command”.

To display the details of a system group, use the group_details command:

spacecmd {SSM:0}> group_details group3
Name               group3
Description:       Example system group 3
Number of Systems: 1

Members
-------
svr1.mydom.com

To work with a system group, specify it by using group:group_name to a spacecmd command:

spacecmd {SSM:0}> system_listerrata group:group2
System: svr1.mydom.com

Security Errata
---------------
ELSA-2017-1095 Important: bind security update 4/19/17
ELSA-2017-0907 Moderate: util-linux security and bug fix update 4/12/17
ELSA-2017-0906 Moderate: httpd security and bug fix update 4/12/17
ELSA-2017-0933 Important: kernel security, bug fix, and 4/12/17
...

To create a union of two or more system groups, create an empty group and specify the groups to the group_addsystems command:

spacecmd {SSM:0}> group_create group4 "Example system group 4"
spacecmd {SSM:0}> group_addsystems group4 group:group1 group:group2

To create an intersection of two or more system groups, clear the contents of the system set in the System Set Manager, use the ssm_intersect command to create the intersection as the new system set, create an empty group and specify the system set as ssm to the group_addsystems command:

spacecmd {SSM:0}> ssm_clear
spacecmd {SSM:0}> ssm_intersect group:group1 group:group2
spacecmd {SSM:2}> group_create group5 "Example system group 5"
spacecmd {SSM:2}> group_addsystems group5 ssm
spacecmd {SSM:2}> ssm_clear
spacecmd {SSM:0}>
Note

{SSM:N} shows the number of systems that are members of the system set.

To remove client systems from a system group, use the group_removesystems command:

spacecmd {SSM:0}> group_removesystems group3 svr1.mydom.com
Systems
-------
svr1.mydom.com

Remove these systems [y/N]: y

To delete a system group, use the group_delete command:

spacecmd {SSM:0}> group_delete group3
group3

Delete these groups [y/N]: y

8.3 Searching for Systems by Using the spacecmd Command

Search for systems by using the system_search command as follows:

spacecmd {SSM:0}> system_search criterion:value

You can search on the following criteria:

device

System device name, for example, "xen platform device".

driver

System driver name, for example, ata_piix.

hostname

FQDN of the system, for example, svr1.mydom.com.

id

System ID in Spacewalk, for example, 1000010100.

ip

IP address, for example, 192.168.1.

name

System name in Spacewalk, for example, svr1.mydom.com.

uuid

System UUID, for example, 0004fb0000060000a4d43e4f737f4f5d.

vendor

System vendor name, for example, GenuineIntel.

For example, you would search for systems that have an IP address that contains 192.168.1 as follows:

spacecmd {SSM:0}> system_search ip:192.168.1
svr1.mydom.com    192.168.1.201
svr2.mydom.com    192.168.1.202
...

You can also use a search query instead of a system name with spacecmd commands, as shown in this example:

spacecmd {SSM:0}> group_addsystems group3 search:ip:192.168.1

To search for systems that subscribe to a software channel, use the softwarechannel_listsystems command:

spacecmd {SSM:0}> softwarechannel_listsystems ol6-x86_64
svr1.mydom.com
svr2.mydom.com
...