taucmdr.cf.storage.levels module¶
TAU Commander hierarchical file and record storage system.
System-level records are globally readable and writable, depending on the user’s
system access level. System-level is a good place for software package installations
and some system-specific configurations, e.g. target or compiler configurations.
The system level exists only when SYSTEM_PREFIX is set. A system prefix that doesn’t
exist is treated as an empty, read-only level until it is created.
User-level records are readable and writable by (at least) the user. User-level is also where software is installed when there is no system level or the user doesn’t have write access to it. It’s a good place for user-specific records, i.e. preferences or encrypted login credentials.
Project-level records define the project and its member components. The user may also
want to install software packages at the project level to avoid quotas or in situations
where USER_PREFIX is not accessible from cluster compute nodes.
- taucmdr.cf.storage.levels.ORDERED_LEVELS = (<taucmdr.cf.storage.storage_dispatch.ProjectStorageDispatch object>, <taucmdr.cf.storage.storage_dispatch.StorageDispatch object>, <taucmdr.cf.storage.storage_dispatch.StorageDispatch object>)¶
All storage levels in their preferred order.
- taucmdr.cf.storage.levels.PROJECT_STORAGE = <taucmdr.cf.storage.storage_dispatch.ProjectStorageDispatch object>¶
Project-level data storage.
- taucmdr.cf.storage.levels.STORAGE_LEVELS = {'project': <taucmdr.cf.storage.storage_dispatch.ProjectStorageDispatch object>, 'system': <taucmdr.cf.storage.storage_dispatch.StorageDispatch object>, 'user': <taucmdr.cf.storage.storage_dispatch.StorageDispatch object>}¶
All storage levels indexed by their names.
- taucmdr.cf.storage.levels.SYSTEM_STORAGE = <taucmdr.cf.storage.storage_dispatch.StorageDispatch object>¶
System-level data storage, or None if there is no system level.
- taucmdr.cf.storage.levels.USER_STORAGE = <taucmdr.cf.storage.storage_dispatch.StorageDispatch object>¶
User-level data storage.
- taucmdr.cf.storage.levels.build_level(storage)[source]¶
Find, download and install software packages only in storage while the context is active.
Packages already installed at other levels are ignored, so everything the context builds ends up in storage.
- Parameters:
storage – The storage level, e.g.
SYSTEM_STORAGE.
- taucmdr.cf.storage.levels.highest_writable_storage()[source]¶
Return the highest-priority writable storage level, caching the result.
Searches
ORDERED_LEVELSin reverse (system, user, project) and returns the first writable level found.- Raises:
StorageError – No writable storage levels are available.
- taucmdr.cf.storage.levels.require_system_storage()[source]¶
Return the system storage level.
- Raises:
ConfigurationError – No system level exists.
- taucmdr.cf.storage.levels.search_levels()[source]¶
Return the storage levels to search for installed software packages and their source archives.
This is
ORDERED_LEVELS, or only the level given tobuild_levelwhile that is active.
- taucmdr.cf.storage.levels.writable_system_storage()[source]¶
Return the system storage level for a command, creating its prefix if needed. Guarantees that a returned level is writable, or else raises an error.
- Raises:
ConfigurationError – No system level exists, or it can’t be written.