Skip to content

Commit 603dec0

Browse files
committed
Remove method that mounted missing ephemeral disk (it's done in ec2autorun.py instead (if not, this method would mount the new FS over existing data): galaxyproject/ansible-cloudman-image@0566b51)
1 parent 2c4479d commit 603dec0

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

cm/services/data/transient_storage.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ def add(self):
5454
and exporting it over NFS. Set the owner of the repo as ``ubuntu`` user.
5555
"""
5656
log.debug("Adding a transient FS at {0}".format(self.fs.mount_point))
57-
# transient_nfs gets created first - make sure it's on a dedicated device
58-
if self.fs.name == 'transient_nfs' and self.app.cloud_type == 'ec2':
59-
self._ensure_ephemeral_disk_mounted()
6057
misc.make_dir(self.fs.mount_point, owner='ubuntu')
6158
# Set the device ID
6259
cmd = "df %s | grep -v Filesystem | awk '{print $1}'" % self.fs.mount_point
@@ -85,25 +82,6 @@ def remove(self):
8582
self.fs.remove_nfs_share()
8683
self.fs.state = service_states.SHUT_DOWN
8784

88-
def _ensure_ephemeral_disk_mounted(self):
89-
"""
90-
Make sure `/mnt` is a mounted device vs. just being part of `/`.
91-
92-
At least some AWS instance types (e.g., r3) do not auto-mount what's in
93-
`/ets/fstab` so make sure the ephemeral disks are in fact mounted.
94-
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html#InstanceStoreTrimSupport
95-
"""
96-
if not misc.run('mountpoint -q /mnt'):
97-
device = '/dev/xvdb' # Most of AWS instances have this device
98-
if os.path.exists(device):
99-
log.debug("/mnt is not a mountpoint; will try to mount it from {0}"
100-
.format(device))
101-
misc.run('mkfs.xfs {0}'.format(device))
102-
misc.run('mount -o discard {0} /mnt'.format(device))
103-
else:
104-
log.warning("Mountpoint /mnt not available and no device {0}"
105-
.format(device))
106-
10785
def status(self):
10886
"""
10987
Update the status of this data service: ake sure the mount point exists

0 commit comments

Comments
 (0)