Trees | Indices | Help |
|
---|
|
User-id pool related functions.
The user-id pool is cluster-wide configuration option. It is stored as a list of user-id ranges. This module contains functions used for manipulating the user-id pool parameter and for requesting/returning user-ids from the pool.
|
|||
LockedUid Class representing a locked user-id in the uid-pool. |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Imports: errno, logging, os, random, errors, constants, utils, pathutils
|
Parse a user-id pool definition.
|
Add a list of user-ids/user-id ranges to a user-id pool.
|
Remove a list of user-ids/user-id ranges from a user-id pool.
|
Convert the internal representation of the user-id pool into a string. The output format is also accepted by ParseUidPool()
|
Sanity check user-id pool range definition values.
|
Expands a uid-pool definition to a list of uids.
|
Check if there is any process in the system running with the given user-id
|
Tries to find an unused uid from the uid-pool, locks it and returns it. Usage pattern
|
This should be called when the given user-id is no longer in use.
|
Execute a callable and provide an unused user-id in its kwargs. This wrapper function provides a simple way to handle the requesting, unlocking and releasing a user-id. "fn" is called by passing a "uid" keyword argument that contains an unused user-id (as an integer) selected from the set of user-ids passed in all_uids. If there is an error while executing "fn", the user-id is returned to the pool.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Apr 4 13:43:46 2016 | http://epydoc.sourceforge.net |