SAFplus Runtime Director API  3.0.5
upgrade.UpgradeSg Class Reference

This class reflects the state of the upgrade on a particular Service Group. More...

Inheritance diagram for upgrade.UpgradeSg:
Collaboration diagram for upgrade.UpgradeSg:

Public Member Functions

def __init__
 Constructor. More...
 
def __cmp__
 
def __hash__
 
def CreateSuTrackers
 Create change trackers for all of the nodes in the SG. More...
 
def CopySoftware
 Move the software onto the nodes. More...
 
def CopySoftwareToNode
 Move the software onto the node. More...
 
def TransformWork
 Convert SAF SIs from the old format to the new format. More...
 
def QuietWork
 Gently quiese existing work in the SG (used in single step upgrades) More...
 
def AllOk
 Make sure all blades are up and ready to be upgraded. More...
 
def AsyncUpgrade
 Run the upgrade asynchronously. More...
 
def Upgrade
 Run the upgrade. More...
 
def Commit
 Commit an upgrade that has already been run. More...
 
def Revert
 Revert an upgrade to the prior version. More...
 
def UpgradeLoop
 Upgrade a service group to a new version. More...
 
def isGuided
 Return whether the upgrade pauses between each step (or is automatic) More...
 
def distributeNewEntities
 After a bunch of new entities are created we must connect them to the old entities so that they can be turned on and off in synchrony. More...
 
def OneStepUpgradeIter
 Upgrade a service group to a new version all nodes at once. More...
 
def CreateNewSus
 Create new service units. More...
 
def RollingUpgradeIter
 Upgrade a service group to a new version in a rolling fashion. More...
 
- Public Member Functions inherited from upgrade.ChangeTracker
def __init__
 Constructor. More...
 
def changed
 Indicate that state has changed. More...
 
def changeWait
 Wait for a state change. More...
 

Public Attributes

 name
 Name of this upgrade tracker (same as the name of the entity it is tracking) More...
 
 mgr
 Back-pointer to the upgrade manager. More...
 
 sg
 What service group is being upgraded (actually a function that loads the latest SG entity from the clusterinfo) More...
 
 upMethod
 What upgrade algorithm to use. More...
 
 autoUp
 Go though the upgrade without intervention (currently must be Yes). More...
 
 entities
 Dictionary of all child upgrade objects associated with the upgrade of this service group. More...
 
 trkr
 
 nodes
 Set of nodes involved in this upgrade. More...
 
 log
 Logging entity. More...
 
 amf
 Object of type aspAmf.Session that will be used to actually make changes to the cluster. More...
 
 oldCompToCsi
 
 thrd
 
 upStatus
 Status of the upgrade (string) More...
 
 upOp
 Current operation (string) More...
 
 oldSuNames
 
 newEntities
 
- Public Attributes inherited from upgrade.ChangeTracker
 parent
 Change tracker hierarchy (if you are changed, your parent is marked as changed as well) More...
 
 generation
 Every time a change occurs, generation is incremented. More...
 
 changeFlag
 Python threading Event Object that implements the fundamental thread blocking mechanism. More...
 

Detailed Description

This class reflects the state of the upgrade on a particular Service Group.

Constructor & Destructor Documentation

def upgrade.UpgradeSg.__init__ (   self,
  mgr,
  sg 
)

Constructor.

Parameters
mgrPointer to the parent upgrade session object
sgAn entity of type aspAmfEntity.AmfServiceGroup

Member Function Documentation

def upgrade.UpgradeSg.__cmp__ (   self,
  other 
)
def upgrade.UpgradeSg.__hash__ (   self)
def upgrade.UpgradeSg.AllOk (   self)

Make sure all blades are up and ready to be upgraded.

def upgrade.UpgradeSg.AsyncUpgrade (   self,
  newVer 
)

Run the upgrade asynchronously.

Parameters
newVerWhat version to upgrade to. Object of type aspApp.AppFile
def upgrade.UpgradeSg.Commit (   self)

Commit an upgrade that has already been run.

def upgrade.UpgradeSg.CopySoftware (   self,
  newVer,
  nodes 
)

Move the software onto the nodes.

Parameters
newVerAn object of type aspApp.AppFile, describing the software rev you are upgrading to
nodesa list of node entities (aspAmfEntity.AmfNode)
def upgrade.UpgradeSg.CopySoftwareToNode (   self,
  n,
  newVer 
)

Move the software onto the node.

Parameters
newVerAn object of type aspApp.AppFile
def upgrade.UpgradeSg.CreateNewSus (   self,
  newVer,
  basename,
  nameIndex,
  nodeList = None 
)

Create new service units.

Used by the other upgrade algorithms

def upgrade.UpgradeSg.CreateSuTrackers (   self)

Create change trackers for all of the nodes in the SG.

def upgrade.UpgradeSg.distributeNewEntities (   self,
  newEntities 
)

After a bunch of new entities are created we must connect them to the old entities so that they can be turned on and off in synchrony.

def upgrade.UpgradeSg.isGuided (   self)

Return whether the upgrade pauses between each step (or is automatic)

def upgrade.UpgradeSg.OneStepUpgradeIter (   self,
  newVer,
  basename,
  nameIndex,
  amf = None 
)

Upgrade a service group to a new version all nodes at once.

This function is a Python generator, which essentially means that it should be called within a for loop, and therefore allows you to put logic in between each step in the upgrade.

   @param newVer    appFile object describing the software to upgrade to
   @param basename  String prefix for any newly created entities
   @param nameIndex The 'N' in 'mySGiN'
   @param amf       (Optional) amf session.  If not included a new one will be created.
def upgrade.UpgradeSg.QuietWork (   self,
  newVer 
)

Gently quiese existing work in the SG (used in single step upgrades)

Parameters
newVerAn object of type aspApp.AppFile, describing the software rev you are upgrading to
def upgrade.UpgradeSg.Revert (   self)

Revert an upgrade to the prior version.

def upgrade.UpgradeSg.RollingUpgradeIter (   self,
  newVer,
  basename,
  nameIndex,
  amf = None 
)

Upgrade a service group to a new version in a rolling fashion.

This function is a Python generator, which essentially means that it should be called within a for loop, and therefore allows you to put logic in between each step in the upgrade.

   @param newVer    appFile object describing the software to upgrade to
   @param basename  String prefix for any newly created entities
   @param nameIndex The 'N' in 'mySGiN'
   @param amf       (Optional) amf session.  If not included a new one will be created.
def upgrade.UpgradeSg.TransformWork (   self,
  newVer 
)

Convert SAF SIs from the old format to the new format.

Parameters
newVerAn object of type aspApp.AppFile, describing the software rev you are upgrading to
def upgrade.UpgradeSg.Upgrade (   self,
  newVer 
)

Run the upgrade.

Parameters
newVerWhat version to upgrade to. Object of type aspApp.AppFile
def upgrade.UpgradeSg.UpgradeLoop (   self,
  newVer,
  basename,
  index,
  fn,
  amf = None 
)

Upgrade a service group to a new version.

Parameters
newVeraspApp.AppFile object describing the software to upgrade to
basenameString prefix for any newly created entities
indexThe 'N' in 'mySGiN'
fnWhat upgrade generator to use (this selects the upgrade algorithm – OneStepUpgradeIter or RollingUpgradeIter)
amf(Optional) amf session (aspAmf.Session). If not included a new one will be created.

Member Data Documentation

upgrade.UpgradeSg.amf

Object of type aspAmf.Session that will be used to actually make changes to the cluster.

upgrade.UpgradeSg.autoUp

Go though the upgrade without intervention (currently must be Yes).

Default is Yes.

upgrade.UpgradeSg.entities

Dictionary of all child upgrade objects associated with the upgrade of this service group.

upgrade.UpgradeSg.log

Logging entity.

upgrade.UpgradeSg.mgr

Back-pointer to the upgrade manager.

upgrade.UpgradeSg.name

Name of this upgrade tracker (same as the name of the entity it is tracking)

upgrade.UpgradeSg.newEntities
upgrade.UpgradeSg.nodes

Set of nodes involved in this upgrade.

upgrade.UpgradeSg.oldCompToCsi
upgrade.UpgradeSg.oldSuNames
upgrade.UpgradeSg.sg

What service group is being upgraded (actually a function that loads the latest SG entity from the clusterinfo)

upgrade.UpgradeSg.thrd
upgrade.UpgradeSg.trkr
upgrade.UpgradeSg.upMethod

What upgrade algorithm to use.

Choices are SingleStepUpgrade (default) and RollingUpgrade

upgrade.UpgradeSg.upOp

Current operation (string)

upgrade.UpgradeSg.upStatus

Status of the upgrade (string)