Installing and Administering Solaris Container Manager 3.6.1

Modifying Containers and Projects

Two property sheets are available for modifying either a container or an active or inactive project. The following table shows the differences between the property sheets.

Table 4–1 Property Sheet Details

Property Sheet 

Usage 

Tab 

Container  

Changes to description, project type, project identifiers (users, groups), match expression 

Properties tab in Containers view after selecting the container 

Project instance (active or inactive project) 

Changes to resource pool association, CPU reservation, memory cap 

Properties tab in Hosts view or Containers view 

Each project instance has a container with which it is associated. Any change that is made to the container applies to all the project instances that use that definition. For example, if you change the project type in a container, the project type changes for all project instances that use the same container. Therefore, you can use both property sheets to make all modifications that are needed.

Each project instance also has a property sheet that is used to change only its own resource pool association or the resource reservations. You can change one project at a time when using this property sheet. For example, you can increase the current minimum CPU reservation or the current memory cap. Changes become effective after the new values have been saved. Modifications that you make to the resource boundaries on an inactive project are not effective until you reactivate the project.

The following example shows a completed property sheet for the sales01 project instance.

Figure 4–1 Sample: Property Sheet for Changing Resource Reservations and Resource Pool

Project property sheet screen

If you need to make resource changes to multiple projects that are active on multiple hosts, use the resource change job feature. For more information, see Modifying Projects With a Resource Change Job.

From the Containers view, a separate property sheet is available from which you can modify the container. You can make changes to one container at a time. You cannot use the resource change job feature to make changes to multiple containers.

The following example shows a completed property sheet for changes to the sales01 project instance.

Figure 4–2 Sample: Property Sheet for Modifying a Container

Property Sheet for Modifying a Container Screen

You cannot modify the properties of a default project. Therefore, neither property sheet is available if a default project is selected.


Note –

Only a container or an inactive project can have its properties modified. You must first deactivate an active project from every host that the project is associated with before modifying any properties. After the changes are saved, you can reactivate the project.


ProcedureTo Modify a Container Using a Property Sheet

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Containers view.

  3. Select the container.

    • If the container is not currently used for any active project, select the Containers Group from the navigation window. This method displays the Container and Groups table in the right pane. Select the project from the table.

    • If the container is being used with any active projects, select the container from the navigation window. If needed, click the different Container groups to expand the list of individual containers. This method displays the Hosts Associated with this Container Definition table from which you can deactivate the project instances.


      Note –

      All project instances that use this container must be deactivated before you can change the properties. If any instances show the status as Active, use the Deactivate button in the Hosts Associated with this Container table after selecting all hosts before continuing.


  4. Select the Properties tab from the right pane.

    The property sheet for the selected container appears. You can make the following changes in the text fields:

    • Description – Provide the description of the container.

    • Project Type – Provide the User, Group, or Application.

    • UNIX User Name – Change existing entry for UNIX user name.

    • Additional User – Change existing entries or provide additional valid UNIX user names. Separate multiple entries with a comma.

    • Additional Group – Change existing entries or provide additional valid UNIX group names. Separate multiple entries with a comma.


    Note –

    If the Save button is not available and the text fields are grayed out, the container is being used in one or more container instances. Verify that the state is Inactive for all hosts listed in the Hosts Associated with this Container Definition table. If any show status as Active, you must deactivate them.


  5. Click Save to save the changes.

    The property sheet remains displayed.

ProcedureTo Modify a Project Using a Property Sheet

Use this procedure to make changes to the resource pool or resource reservations for only one project. If you want to make the same change to multiple projects, see Modifying Projects With a Resource Change Job.

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Choose from the following methods to select the desired project instance:

    • If you know the name of the host that the project is associated with, select the host name from the navigation window in the Hosts view. Then select the Projects tab in the right pane to access a table that lists all projects that are associated with the host.

    • If you know the name of the project, select its name from the navigation window in the Containers view. The Hosts Associated with this Container Definition table appears in the right pane.


    Note –

    All projects must be deactivated before you can change the properties. If any projects show the status as Active, use the Deactivate button in the table before continuing. The tables in both views have this button.


  3. Select the name of the project or host from the table, depending on the method that you selected in the previous step.

    The property sheet for the project instance is displayed.

  4. Make the desired changes.


    Note –

    (On Solaris 10) It is not possible to change the resource pool of a project.


    • Resource Pool Definition. To change the pool that the project is associated with, select from the drop-down menu.

    • CPU Reservation (CPU shares). Provide the new value in the text box as an integer.

    • Memory Cap (MB). Provide the new value in the text box.

    • Shared Memory (MB). Provide the new value in the text box.

  5. Click Save.

    The requested changes to the resource reservations have been saved.

  6. (Optional) To reactivate the project, return to the table that you used in Step 3 and click Activate.

Modifying Projects With a Resource Change Job

Use the resource change job feature to change resource limits on multiple projects that are spread across multiple hosts. These projects must all use the same container. You can either run the resource change job immediately so that the changes are implemented at the same time, or you can schedule the changes to occur later.


Note –

On Solaris 10, the resource change job feature changes the resource allocation of containers only if they are deployed in the global zone.



Note –

Changes to CPU reservations (CPU shares) are immediate. Changes to memory caps need to write to swap. Any big change to the memory cap will affect system performance while the memory cap is being adjusted.


The following information is available in the Resource Change Job table:

Resource Change Job Name

The name of the job that was provided during job creation.

Hosts

The names of the hosts with which the container is associated.

Schedule

The interval the job is scheduled to run. Options include One Time, Hourly, Daily, Weekly, Monthly.

State

The status of the job. Values include Queued, Succeeded, Failed.

The following example uses projects named “Webserver” and “Rollup” to show how the resource change job feature can be used to manage system resources across the enterprise. In this example, an online store provides order processing from its website. The Webserver project was created to manage the CPU and memory resources that are used by the web server across North America. The Rollup project was created to manage the resources that the database required. During the day and early evening hours, web server resource demands are high as people use the web site to place orders. But in the evening, the demand on the web server typically drops dramatically after midnight. During overnight hours, the database is scheduled to run reports on the day's sales.

To manage the resources required by these two containers on an 8 CPU system with 6000 Mbytes of physical memory, you could create a total of four resource change jobs as shown in the following table.

Table 4–2 Sample of Resource Change Job Scheduling

Container Name 

Resource Change Job Name 

Start Time 

Interval 

Resource Change 

Webserver 

webserver-day 

6:00 a.m. 

Daily 

CPU Shares: 6  

Memory: 2500 MB  

Rollup 

rollup-day 

6:00 a.m. 

Daily 

CPU Shares: 1  

Memory: 2000 MB  

Webserver 

webserver-night 

Midnight 

Daily 

CPU Shares: 1  

Memory: 2000 MB  

Rollup 

webserver-night 

Midnight 

Daily 

CPU Shares: 6  

Memory: 2500 MB  

Two resource change jobs run every morning at 6:00 a.m. to change the resources for the Webserver and Rollup projects. During the day, the Webserver project is given the majority of CPU and physical memory resources as the demand of the webserver is high. Then at midnight each day a second set of resource change jobs run, and they reallocate the system's resources to accommodate the changing need. The database requires the resources to tally the daily sales while the web server requires fewer resources as demand is low.

This feature is similar to the job management feature found in Sun Management Center, but use the Container Manager GUI to administer all Container Manager jobs. For more information about the Sun Management Center job feature, see Job Management Concepts in Sun Management Center 3.6.1 User’s Guide.

ProcedureTo Modify a Project Using a Resource Change Job

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Containers view.

  3. In the navigation window, select the project name.

    The project must be associated with a host to proceed.

  4. Select the Jobs tab from the right pane.

    The Resource Change Job table is displayed.

    Figure 4–3 Sample: Resource Change Job Table

    Resource Change Job screen

  5. Click the New Resource Change Job button located in the table.

    The Resource Change Job wizard appears. The Overview panel appears.

  6. Provide a name for the resource change job. Providing a description is optional.

    The length of the name cannot exceed 32 characters. Spaces, dash (-), underscore (_), and dot (.) are all accepted. A space is converted to an underscore (_).

    The Select Hosts panel appears. The names of all the hosts with which the selected container is associated appears in the Available list. You can change the resource limits for one or more hosts by selecting them from this window.

  7. Select each host from the Available list, and click Add to move each host to the Selected list. Or click Add All to move all hosts.

    The host names move to the Selected field.

  8. Provide a new minimum CPU reservation (CPU shares). A memory cap is optional.

    The new resource limits apply to all the hosts selected in the previous step.

  9. Provide a start date, start time, and interval for the resource change job.

    The changes to the resource limits are effective at the requested time.

  10. Review your selections in the Summary panel. To many any corrections, use the Previous button. When you have completed all changes, click Finish.

    The wizard is dismissed. The job is added to the Jobs table. The status is listed as queued until the day and time when the Job is scheduled to run. The changes to the resource limits become effective at the time requested.

ProcedureTo Edit a Pending Resource Change Job

Use this procedure to make changes to a pending job whose status still shows as Queued in the Jobs table.

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Containers view in the navigation window.

  3. Select the Jobs tab from the right pane.

  4. From the Resource Change Job table, select the job to be changed by selecting the check box next to the name.

    A check mark appears in the box.

  5. To start the Update Resource Change Job wizard, click the Update Resource Change Job button.

    For a detailed description of the steps to move the panels, see To Modify a Project Using a Resource Change Job.

  6. When you have completed all changes, click Finish.

    The wizard is dismissed. The edits made to the job have been saved.

ProcedureTo View a Resource Change Job Log

Use this procedure to view the log for a change job that has been completed. If the job included changes to multiple hosts, the status for the jobs per host is located in the log.

Steps
  1. If the Container Manager GUI is not already open, access it as described in To Start the Container Manager GUI.

  2. Select the Containers view in the navigation window.

  3. Select the Jobs tab from the right pane.

  4. From the Resource Change Jobs table, select the completed job whose log you want to view by selecting the check box next to the name.

    A check mark appears in the box.

  5. Click the View Log button.

    The log file for the resource change job appears.