-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sriov provider, etcd in memory: create unique directory
In order to prevent leftovers and overwriting existing data esopecially on local environments it is necessary to create directory for ectd data with unique name. This commit presents '$BASE_ETCD_DATA_DIR' env variable it is the path for the directory that will be mounted. Now '$ETCD_DATA_DIR' env var is the current cluster etcd data directory unique name. The uniqness of the name is defined by concating then number of seconds since 1970-01-01 to the cluster name. The function 'ensure_memory_dir_for_etcd_data' creates and mounts the directory 'BASE_ETCD_DATA_DIR' (e.g: /mnt/cluster-etcd). Then creates 'BASE_ETCD_DATA_DIR/ETCD_DATA_DIR' (e.g: /mnt/cluster-etcd/sriov-123211), which is actually on the RAM memory at this point,it means that it will be disposed once '$BASE_ETCD_DATA_DIR' (/mnt/cluster-etcd) is unmounted. The function 'cleanup_dir_for_etcd_data' unmount and deletes '$BASE_ETCD_DATA_DIR' (which containers '$ETCD_DATA_DIR'). Signed-off-by: Or Mergi <[email protected]>
- Loading branch information
Showing
2 changed files
with
41 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters