GRIS: Implementation/Adding New Providers
Note: This document is in rough draft form
The
MDS 2.1 resource information models the physical and logical
class MdsVo
contains attr Mds-Vo-name
class MdsHost
contains attr Mds-Host-hn
class MdsDevice
contains attr Mds-Device-name
class MdsDeviceGroup
contains attr Mds-Device-Group-name
...
A
complementary set of "auxiliary" types adds information about
the
dn: Mds-Device-Group-name=memory, ...
objectclass: MdsMemoryRamTotal
objectclass: MdsMemoryVmTotal
objectclass: MdsDeviceGroup
Mds-Device-Group-name: memory
Mds-validfrom: 200110030128.12Z
Mds-validto: 200110030128.12Z
Mds-keepto: 200110030128.12Z
Mds-Memory-Ram-Total-sizeMB: 751
Mds-Memory-Ram-Total-freeMB: 642
Mds-Memory-Vm-Total-sizeMB: 1600
Mds-Memory-Vm-Total-freeMB: 1592
Mds-Memory-Ram-sizeMB: 751
Mds-Memory-Ram-freeMB: 642
Mds-Memory-Vm-sizeMB: 1600
Mds-Memory-Vm-freeMB: 1592
dn: Mds-Device-name=physical memory, Mds-Device-Group-name=memory,
...
objectclass: Mds
objectclass: MdsDevice
objectclass: MdsMemoryRam
Mds-Device-name: physical memory
Mds-Memory-Ram-sizeMB: 751
Mds-Memory-Ram-freeMB: 642
Mds-validfrom: 200110030128.12Z
Mds-validto: 200110030128.12Z
Mds-keepto: 200110030128.12Z
dn: Mds-Device-name=virtual memory, Mds-Device-Group-name=memory,
...
objectclass: Mds
objectclass:
MdsDevice
objectclass: MdsMemoryVm
Mds-Device-name: virtual memory
Mds-Memory-Vm-sizeMB: 1600
Mds-Memory-Vm-freeMB: 1592
Mds-validfrom: 200110030128.12Z
Mds-validto: 200110030128.12Z
Mds-keepto: 200110030128.12Z
This
ability to merge multiple types allows the parent object to
The
GRIS service provides a hierarchy of such objects for an SMP
The
default MDS 2.1 GRIS providers create a hierarchy with the following
<hostname>
/
|
|
\ \
processors
memory filesystems
networks OS
/
\
/ \
/ \
/ \
cpu 0
... RAM
VM /dev0 ...
iface ...
Where
the well-known MdsDeviceGroup object names "processors",
The
schema design includes support for clusters of SMPs, i.e. typical distributed
memory processors, via other compute elements such as
An
index of schema definitions and descriptions of object classes and
attribute types can be found in MDS
Schemas.
Creating Platform-specific Core GRIS Providers
There could be a mechanism-specific variant for each:
grid-info-cpu-<method>
grid-info-mem-<method>
grid-info-net-<method>
grid-info-fs-<method>
For a totally esoteric platform which doesn't even have uptime and
uname functionality, we might have to introduce variants
grid-info-platform-<method>
grid-info-cpufast-<method>
<method> should uniquely refer to how the information is acquired.
In all the existing cases, we have methods
named either after a common mechanism or the platform for which they've been completely tailored:
linux
irix
solaris
uname
posix
netstat
uptime
The *-common scripts contain the generic code that is used by all
platforms. They would NEVER be modified for a new platform. They
correspond to the structure of the schema. Each mechanism-variant probe
script basically does some mechanism-specific activity which
initializes a shell variable environment in which the generic code can
be executed to output the actual LDAP objects. The common code defines
the particular variables that may be set by a probe to pass information
for the standardized LDAP values. For example, the cpu common script
looks for these variables:
### variables used to store probed data
# _cpu_N_vendor=name
# _cpu_N_model=name
# _cpu_N_version=name
# _cpu_N_features=name
# _cpu_N_speed_mhertz=number
# _cpu_N_l2cache_kbytes=number
# _cpu_free1X100=number
# _cpu_free5X100=number
# _cpu_free15X100=number
# _cpu_count=0
When a probe detects CPUs, it sets the _cpu_count value to the number, e.g. "2" on crater.
Then it sets the cpu_N_* values for each CPU individually, e.g. on crater:
_cpu_0_speed=1700
_cpu_1_speed=1700
This allows the individual probed devices to have distinct probed properties.
This is not well documented so anyone trying to work on these should definitely correspond over an appropriate
MDS developers mailing list.
Creating Custom GRIS Providers
You
can create your own information providers by following the procedures
described in MDS
GRIS Specification Document: Creating New Information Providers (PDF).