mandriva

MSC database documentation

Nicolas Rueff

$Id$

my licence here

Revision History
Revision 152008-10-06NN

Documentation updated for schema v.15

Abstract

Documentation for Pulse2 MSC schema.


1. The MSC database design

2. The "commands" table

This table holds a whole command, one command per line.

id

The table primary key

state

Represents whenever a command is archived (or not), not yet used,

creation_date

The command date creation

start_file

The command to launch to start installation of the package

parameters

The command line switches

start_script

Do we run command line on client, mainly used for packages debug purpose

clean_on_success

Do we erase copied files after a successful run, mainly used for packages debug purpose

files

The list of files for the package, with MD5 control sums

start_date

Date from which we may run our command

end_date

Date until which we may run our command

connect_as

Login name used to connect our client

creator

Holds the command initiator name

dispatched

Tell if the command has been field into relevant computers

title

The command title

do_inventory

Whether to start an inventory command on the client once the command has suceeded

do_wol

Whether to perform a Wake On Lan (WOL) on the client before attempting to connect to it

next_connection_delay

Interval between two connection attempts

max_connection_attempt

How many time do we try to perform a command before giving up

pre_command_hook

?

post_command_hook

?

pre_run_hook

?

post_run_hook

?

on_success_hook

?

on_failure_hook

?

maxbw

When we have something to send to the client, do not go over this BW rate (b/s), default is 0

deployment_intervals

The interval of time between two deployment attempts

do_reboot

Whether to reboot the machine after the command succeeded

do_halt

Whether to halt the machine after the command succeeded

fk_bundle

The Bundle ID the command belongs to

order_in_bundle

The command's order inside its bundle

package_id

The identifier of the package deployed by the command, or NULL in case the command is a quick action

proxy_mode

used to store the commande proxy mode (can be none, split, queue)

3. The "commands_on_host" table

This table contains the running status of a command for a particular host.

It is linked to the "commands" table using fk_commands as constraint.

It is linked to the "target" table using fk_target as constraint.

id

The table primary key

fk_commands

A FK to the commands table

host

The target host to run the command on.

start_date

The command **effective** start date (??)

end_date

The command **effective** end date (??)

current_state

Used to hold our command status on this client

stage

Another representaion os the command state, used by the interface

awoken

Tell if we already did something in WOL stage

uploaded

Tell if we already did something in upload stage

executed

Tell if we already did something in execution stage

deleted

Tell if we already did something in deletion stage

inventoried

Tell if we already did something in inventory stage

rebooted

Tell if we already did something in reboot stage

halted

Tell if we already did something in halt stage

next_launch_date

If for any reason the command has been postponed, the command may be run from this time

attempts_left

The amount of tries left

next_attempt_date_time

A command can't be scheduled before this timestamp

current_launcher

The in-charge launcher

fk_target

A foreign key to the "target" table

scheduler

The scheduler in charge of this command

last_wol_attempt

Keep track of when the last WOL impulsion was done

fk_use_as_proxy

A (self) FK to the commands_on_host rows used as proxy

order_in_proxy

Describe when activate this command_on_host as proxy

max_clients_per_proxy

If this command_on_host is becoming a proxy, store how much max clients it may serve

4. The "commands_history" table

This table contains the stdout/stderr of each stage of a command for a particular host.

It is linked to the "commands_on_host" table using fk_commands_on_host as constraint.

id

The table primary key

fk_commands_on_host

A FK to the commands_on_host table

date

The time at which the command was run

stderr

The command error (mostly a Python TB)

stdout

The command output

state

The command state

error code

The command error code (if relevant)

5. The "target" table

This table contains directions to deploy a package.

id

The table primary key

target_name

the target fqdn

mirrors

the packages location. This field must be formatted as follow:

  • several tockens, separator is '||' (double-pipe)

  • tockens are URI formatted like this:

    <protocol>://<login>:<pass>@<server><path>

    Protocol may be one of the following: ssh, http, ftp, smb, file. Each protocol corresponds to a different way to gather a package:

    HTTP

    Package is pulled by the client (using for exemple wget). the URI represents exacty the root place from where to download package components.

    FTP

    Same as HTTP.

    SSH

    Same as HTTP, using scp to dowload components. Password unsupported.

    SMB

    Same as HTTP, using SAMBA (CIFS) protocol. Currently unsupported.

    FILE

    Package is pushed on the client by the server, using scp. In this case, the rightmost part of the URI represent the full package root path on the server.

id_group

Commands may be grouped using some criteria (IP adress, ...), this field holds their group id

scheduler

The scheduler for this target

target_uuid

The target UUID

target_ipaddr

The target IP adresses, with '||' as separator, the first one beeing the most relevant

target_macaddr

The target MAC adresses, with '||' as separator, used to perform WOL

target_bcast

The target's broadcast IP, if relevant

target_network

The target's netmask, if relevant

6. The "bundle" table

This table holds Bundle (sets of commands) IDs.

id

The table's primary key.

title

The bundle's title

do_reboot

Whether the target should be rebooted once the bundle has been deployed

7. The "version" table

Used to hold the database version, in the table Number.