Created
March 8, 2017 16:37
-
-
Save lazypower/2e8ae364639504250499c838a33a20e1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def determine_storage_location(self): | |
''' Storage mounts are limited in snap confinement. Default behavior | |
is to version the database files in $SNAP_DATA. However the user can | |
attach durable storage, which is mounted in /media. We need a common | |
method to determine which storage path we are concerned with ''' | |
if is_state('storage.volume.attached'): | |
return "/media/etcd-data/" | |
else: | |
return "/var/snap/etcd/current" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment