Previous  |  Next  >  
Product: Cluster Server Guides   
Manual: Cluster Server 4.1 Agent Developer's Guide   

Categories of Attributes

  • Resource-specific attributes.
  • An attribute that can be defined for a specific resource only is resource-specific. Examples include the PathName attribute for the FileOnOff resource and the MountPoint attribute for the Mount resource. Resource-specific attributes are set in the main.cf file.
  • Type-dependent attributes:
  • When attributes can be defined only for resources of a specific type, they are type-dependent. An example would be the StartVolumes and Stop Volumes attributes of the VCS DiskGroup resource type. All resources of the type DiskGroup have the default values for these attributes. For example:

      type DiskGroup (
         :
         int StartVolumes = 1
         int StopVolumes = 1
         :
         )
    Type-dependent attributes can be static and non-static. Static attributes are typically defined in the types.cf file, identified as static. For example:

      type FileOnOff (
      static str ArgList[] = { PathName }
      .
      .
      )
    Static resource type attributes can be overridden. See Overriding Static Attributes.
  • Type-independent attributes:
  • An attribute that can be defined for resources regardless of their type is a type-independent type. An example might be the MonitorInterval attribute. These attributes are defined in the agent framework when the agent is developed.
    The value of a type-independent attribute can be set for a give type. For example, the default value of MonitorInterval is 60 seconds, but it can be set for a specific resource type in the types.cf file.

      type FileOnOff (
      static str ArgList[] = { PathName }
        str PathName
      static int MonitorInterval=30
      )
  • Global and local attributes:
  • An attribute whose value applies for the resource on all systems is global. The values of a resource's attribute can be set to have a local scope, that is, apply to specific systems. In the following example of the MultiNICA resource type, attributes applying locally are indicated by "@system" following the attribute name:

      MultiNICA mnic (
      Device@sysa = { le0 = "166.98.16.103", qfe3 = "166.98.16.103" }
      Device@sysb = { le0 = "166.98.16.104", qfe3 = "166.98.16.104" }
      NetMask = "255.255.255.0"
      ArpDelay = 5
      Options = "trailers"
      RouteOptions@sysa = "default 166.98.16.103 0"
      RouteOptions@sysb = "default 166.98.16.104 0"
      )
  • Temp attributes
  • Temp attributes are maintained by VCS only at run time. Their values are not dumped to disk and hence, are lost when VCS is stopped and restarted. Refer to the VERITAS Cluster Server User's Guide for information about temp attributes.

Attribute Data Types and Dimensions

Attributes contain data regarding the cluster, systems, service groups, resources, resource types, agents, and heartbeats if the Global Cluster option is used (refer to the VERITAS Cluster Server User's Guide for information about the Global Cluster option).

Attribute Data Types

  • String
  • A string is a sequence of characters enclosed by double quotes. A string may also contain double quotes, but the quotes must be immediately preceded by a backslash character. A backslash is represented in a string as \\.
    Quotes are not required if a string begins with a letter, and contains only letters, numbers, dashes (-), and underscores (_). For example, a string defining a network interface such as hme0 does not require quotes as it contains only letters and numbers. However a string defining an IP address requires quotes, such as: "192.168.100.1" because the IP contains periods.

      str Address
  • Integer
  • Signed integer constants are a sequence of digits from 0 to 9. They may be preceded by a dash, and are interpreted in base 10. Integers cannot exceed the value of a 32-bit signed integer, 21471183247. For example:

      int StartVolumes = 1
  • Boolean
  • A boolean is an integer, the possible values of which are 0 (false) and 1 (true). For example, the Critical attribute has two possible values:

      bool Critical = 1

Attribute Dimensions

  • Scalar
  • A scalar has only one value. This is the default dimension. The definition of an attribute resembles:

      str scalar_attribute
    For example:

      str MountPoint
    When values are assigned to a scalar, the attribute in the main.cf file might resemble:

      MountPoint = "/Backup"
  • Vector
  • A vector is an ordered list of values. Each value is indexed using a positive integer beginning with zero. A set of brackets ([]) denotes that the dimension is a vector. Brackets are specified after the attribute name in the attribute definition. To define an attribute with a vector dimension, add a line in the resource type definition that resembles:

      str vector_attribute[]
    For example:

      str BackupSys[]
    When values are assigned to a vector, the attribute in the main.cf file might resemble:

            BackupSys[] = { sysA, sysB, sysC }
  • Keylist
  • A keylist is an unordered list of strings, with each string being unique within the list. To define an attribute with a keylist dimension, add a line in the resource type definition that resembles:

      keylist keylist_attribute = { value1value2 }
    For example:

      keylist BackupVols = {}
    When values are assigned to a keylist, the attribute in the main.cf file might resemble:

            BackupVols = { vol1, vol2 }
  • Association
  • An association is an unordered list of name-value pairs. Each pair is separated by an equal sign. A set of braces ({}) denotes that an attribute is an association. Braces are specified after the attribute name in the attribute definition. To define an attribute with an association dimension, add a line in the resource type definition that resembles:

      int assoc_attr{} = { attr1 = val1attr2 = val2 }
    For example:

      int BackupSysList {} 
    When values are assigned to an association, the attribute in the main.cf file might resemble:

            BackupSysList{} = { sysa=1, sysb=2, sysc=3 }

 ^ Return to Top Previous  |  Next  >  
Product: Cluster Server Guides  
Manual: Cluster Server 4.1 Agent Developer's Guide  
VERITAS Software Corporation
www.veritas.com