Modify application instance functionality

The modify functionality is similar to the add functionality. The user selects a particular application instance to modify, based on the application instance Smart Assist identifier and component identifier.

Creating the modify SMIT screen

The modify SMIT screens identifiers for the GASA Smart Assist are defined in the call to claddsa

SMIT_MODIFY="clsa_gasa_modify" 

and

SMIT_MODIFY_TYPE="d" 

Identical in approach to the add screen, the application framework will call the clsa_gasa_modify dialog, or name selector based on the entry in the HACMPsa ODM.

What is different about the modify screen is that the framework will also pass along the application_id as a cooked field name, along with the Smart Assist identifier sa_id and the component_id of the application to the dialog or name selector.

The application framework will call the following SMIT command header entry "clsa_gasa_modify", which provides the SMIT screen Make Applications Highly Available (Use Smart Assists):

General Application Smart Assist - Selector Screen
          Make Applications Highly Available (Use Smart Assists) 

Move cursor to desired item and press Enter.
 
 Add an Application to the PowerHA SystemMirror Configuration 
 Change/Show an Application's PowerHA SystemMirror Configuration 
 Remove an Application from the PowerHA SystemMirror Configuration 
 Manage Your Applications 
 Change/Show the Resources Associated with Your Application 
 Test Your Application for Availability 

+""""""""""""""""""""""""""""""""""-+ 
| Select an Application from the List of Discovered Applications Below 
| 
| Move cursor to desired item and press Enter. 
| 
| example_app 
+""""""""""""""""""""""""""""""""""""""""""""""""-+

The following cooked field names are passed along to the dialog:

Item Description
application_id =example_app  
sa_id =zzOther  
component_id =GASA

The user's SMIT session will transition onto the clsa_gasa_modify dialog:

General Application Smart Assist Modify Dialog
     General Application Smart Assist 
Type or select values in entry fields. 

Press Enter AFTER making all desired changes. 

[Entry Fields]  
* Application Name             example_app

* Primary Node                 [nodeA] +

* Takeover Nodes               [nodeB nodeC] +

* Application Controller Start     [/example_app/start]
Script

* Application Controller Stop      [/example_app/stop]
Script

* Service IP Label             [service1] +

Typically the modify screen of the Smart Assist will look identical to the add screen, what differs is that some of the fields are not editable. Note that in the above figure the application name cannot be changed. The user however can change all other aspects of the application's configuration within SMIT. See SMIT general application Smart Assist modify stanzas for The ODM stanzas.

Note that the fields are already populated when the user enters the modify screen. This is accomplished via the cmd_to_discover method in the sm_cmd_hdr ODM stanza. In the case of the GASA Smart Assist the smit_util script gathers the participating nodes from the associated resource group, and extracts the service IP label, and application start / stop scripts by using the clvt API. A similar approach would be taken for all Smart Assists.

Creating the modify script

In the case of the GASA Smart Assist all of the requisite resources constructed in the add phase are removed, and the add script is called again. In more complicated Smart Assists the modify script would only change those properties of the application that were modified by the user. The GASA first calls the clsapre script, then uses the clvt API to remove PowerHA® SystemMirror® components from the cluster configuration. The add script is then called and the application resources are added to the PowerHA SystemMirror configuration. Again, at the tail end of the add script the command clsapost -v is called to run verification. If the modify script were to only modify the resources, it should call clsapost -v directly.