Revision e52019f7

b/lib/config.py
1150 1150
      constants.SS_RELEASE_VERSION: constants.RELEASE_VERSION,
1151 1151
      }
1152 1152

  
1153
  @locking.ssynchronized(_config_lock)
1154
  def InitConfig(self, version, cluster_config, master_node_config):
1155
    """Create the initial cluster configuration.
1156

  
1157
    It will contain the current node, which will also be the master
1158
    node, and no instances.
1159

  
1160
    @type version: int
1161
    @param version: Configuration version
1162
    @type cluster_config: objects.Cluster
1163
    @param cluster_config: Cluster configuration
1164
    @type master_node_config: objects.Node
1165
    @param master_node_config: Master node configuration
1166

  
1167
    """
1168
    nodes = {
1169
      master_node_config.name: master_node_config,
1170
      }
1171

  
1172
    self._config_data = objects.ConfigData(version=version,
1173
                                           cluster=cluster_config,
1174
                                           nodes=nodes,
1175
                                           instances={},
1176
                                           serial_no=1)
1177
    self._WriteConfig()
1178

  
1179 1153
  @locking.ssynchronized(_config_lock, shared=1)
1180 1154
  def GetVGName(self):
1181 1155
    """Return the volume group name.

Also available in: Unified diff