Next Previous Contents

3. Policy tables

There is only one default policy table, and one meta table for how to determine the policy to any one job given the user/group/account the job is running as!

3.1 policy_default

mysql> desc policy_default;
+--------------+------------------+------+-----+---------+-------+
| Field        | Type             | Null | Key | Default | Extra |
+--------------+------------------+------+-----+---------+-------+
| auth         | char(255)        |      | PRI |         |       |
| max_slots    | int(10) unsigned |      |     | 512     |       |
| max_duration | int(10) unsigned |      |     | 172800  |       |
| max_jobs     | int(10) unsigned |      |     | 16      |       |
+--------------+------------------+------+-----+---------+-------+

Example values you might see in the table:

+----------------+-----------+--------------+----------+
| auth           | max_slots | max_duration | max_jobs |
+----------------+-----------+--------------+----------+
| systems        |       512 |       172800 |       16 |
| FOOBA-R900-444 |       512 |     99999999 |       16 |
| 31337-H4X0-R69 |       512 |     99999999 |       16 |
| genieb         |       128 |       172800 |       16 |
| frankg         |       512 |     99999999 |       16 |
+----------------+-----------+--------------+----------+

3.2 policy_default_auth

For each user, given a job, this table controls the calculation of policy based on an arrangement of the values in the policy_default table. We specify here whether we are logical ANDing or logical ORing the values from the policy_default table for the user, group, and account that the job in consideration is running as.

mysql> desc policy_default_auth;
+--------------------+----------------------------+------+-----+-----------------+-------+
| Field              | Type                       | Null | Key | Default         | Extra |
+--------------------+----------------------------+------+-----+-----------------+-------+
| uuser              | char(64)                   |      | PRI |                 |       |
| max_slots_order    | enum('AND','OR')           |      |     | OR              |       |
| max_slots_auth     | set('user','group','acct') |      |     | user,group,acct |       |
| max_duration_order | enum('AND','OR')           |      |     | OR              |       |
| max_duration_auth  | set('user','group','acct') |      |     | user,group,acct |       |
| max_jobs_order     | enum('AND','OR')           |      |     | AND             |       |
| max_jobs_auth      | set('user','group','acct') |      |     | user,acct       |       |
+--------------------+----------------------------+------+-----+-----------------+-------+

Example values you might see in the table:

mysql> select * from policy_default_auth limit 5;
+----------+-----------------+-----------------+--------------------+-------------------+----------------+---------------+
| uuser    | max_slots_order | max_slots_auth  | max_duration_order | max_duration_auth | max_jobs_order | max_jobs_auth |
+----------+-----------------+-----------------+--------------------+-------------------+----------------+---------------+
| steviek  | OR              | user,acct       | OR                 | user,group,acct   | AND            | user,acct     |
| frankg   | OR              | user,group,acct | OR                 | group             | AND            | user          |
| testhelp | OR              | user,group      | OR                 | user,group,acct   | OR             | user,acct     |
| genieb   | OR              | user,group,acct | AND                | user,group,acct   | AND            | user,acct     |
| testfoo  | AND             | user,group,acct | OR                 | user,group,acct   | AND            | user,group    |
+----------+-----------------+-----------------+--------------------+-------------------+----------------+---------------+


Next Previous Contents