-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
e54d7d6
to
10f3674
Compare
4d2d659
to
0302908
Compare
0302908
to
d8596e2
Compare
in testing this I keep getting an |
could you copy your logs around the log line if os.path.exists(self.mountpoint):
logger.info('Unmounting drive from {}'.format(self.mountpoint))
subprocess.check_call(["sudo", "umount", self.mountpoint]) it's possible that if you restarted the export vm that you forgot to copy the export deb package with my changes. |
or actually looks like i accidentally used rstrip instead of strip here: def mount_volume(self):
# If the drive is already mounted then we don't need to mount it again
output = subprocess.check_output(
["lsblk", "-o", "MOUNTPOINT", "--noheadings", self.device])
mountpoint = output.decode('utf-8').strip()
if mountpoint:
logger.debug('The device is already mounted')
self.mountpoint = mountpoint
return fixed, ready for a retest |
d8596e2
to
089af70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK this looks good now.
For the record, in reproducing #12 I could reproduce that an ERROR_GENERIC occurs but that was after the files are successfully exported (and thus the success message popped up). Regardless, I can confirm on this diff that I no longer see this behavior for both 1. the drive is already mounted/unlocked and 2. the drive is not mounted/unlocked cases - the export is successful in both cases.
Description
Fixes #12, going with option 2 in the expected results: #12 (comment)
We now check if the device is already unlocked and mounted. If the device is mounted, we don't attempt to mount again, instead we use the current mountpoint to copy files to.
We will need to create a followup issue with a new status code to inform the client that the device is already unlocked and no user passphrase is necessary.
**Important: ** If the device is unlocked by an external program we will still lock it after a file transfer. This is to err on the side of caution.
Test Plan