Closed carbocation closed 4 years ago
Hi @carbocation!
Thanks for reporting the problem. There's a small mistake in the documentation, which we will fix.
The value for the --mount
parameter needs to be quoted:
--mount MYDISK="https://www.googleapis.com/compute/v1/projects/broad-ml4cvd/global/images/dl-image-2019-05-13 1000"
Thank you @mbookman
That works and permits the job to launch, but I am now getting a new error on the same topic: Error in ls--jamesp--191120-164029-12 - code 2: Execution failed: preparing disks: mounting "MYDISK" disk: invalid argument
Is this something I can fix on my end?
$ dsub --provider google-v2 --project broad-ml4cvd --image ubuntu:18.04 --command '/bin/ls ${MYDISK}' --mount MYDISK="https://www.googleapis.com/compute/v1/projects/broad-ml4cvd/global/images/dl-image-2019-05-13 1000" --logging gs://ukbb_v2/projects/jamesp/tmp/dsub --regions us-central1 --wait
Job: ls--jamesp--191120-164029-12
Provider internal-id (operation): projects/broad-ml4cvd/operations/14334704688626342724
Launched job-id: ls--jamesp--191120-164029-12
To check the status, run:
dstat --provider google-v2 --project broad-ml4cvd --jobs 'ls--jamesp--191120-164029-12' --users 'jamesp' --status '*'
To cancel the job, run:
ddel --provider google-v2 --project broad-ml4cvd --jobs 'ls--jamesp--191120-164029-12' --users 'jamesp'
Waiting for job to complete...
Waiting for: ls--jamesp--191120-164029-12.
ls--jamesp--191120-164029-12: FAILURE
['Error in ls--jamesp--191120-164029-12 - code 2: Execution failed: preparing disks: mounting "MYDISK" disk: invalid argument']
JobExecutionError: One or more jobs finished with status FAILURE or CANCELED during wait.
ls--jamesp--191120-164029-12
Hi @carbocation
Curious - how was this disk/image created? Is this an image that you have used and has data on it, or is this something new you made for the purposes of testing?
I ask because we have been running tests regularly that confirms that this feature works. So I'm thinking that the issue has something to do with the disk/image itself.
@wnojopra It's a real disk image that I have used before, though not recently. I'll try other disk images (we have a bunch).
@carbocation I've confirmed by testing just now that images from unformatted disks cause the exact same error you are seeing. After formatting the disk and re-creating the image, dsub works just fine.
If you're seeing issues with disk images you expect to be working fine, perhaps you could share some how the image was created and we can try to reproduce?
@wnojopra Interesting. I've retried with an image that I know is formatted (which I know because it's the image used to create a machine that I launch dsub
from) and I get the same error. Note the new project because this image isn't available on the other project.
dsub --provider google-v2 --project ukbb-analyses --image ubuntu:18.04 --command '/bin/ls ${MYDISK}' --mount MYDISK="https://www.googleapis.com/compute/v1/projects/ukbb-analyses/global/images/ukbb-8 1000" --logging gs://ukbb_v2/projects/jamesp/tmp/dsub --regions us-central1 --wait
Job: ls--jamesp--191120-195728-93
Provider internal-id (operation): projects/ukbb-analyses/operations/4879679752608393772
Launched job-id: ls--jamesp--191120-195728-93
To check the status, run:
dstat --provider google-v2 --project ukbb-analyses --jobs 'ls--jamesp--191120-195728-93' --users 'jamesp' --status '*'
To cancel the job, run:
ddel --provider google-v2 --project ukbb-analyses --jobs 'ls--jamesp--191120-195728-93' --users 'jamesp'
Waiting for job to complete...
Waiting for: ls--jamesp--191120-195728-93.
ls--jamesp--191120-195728-93: FAILURE
['Error in ls--jamesp--191120-195728-93 - code 2: Execution failed: preparing disks: mounting "MYDISK" disk: invalid argument']
JobExecutionError: One or more jobs finished with status FAILURE or CANCELED during wait.
ls--jamesp--191120-195728-93
I tried it again with a random public disk image (CENTOS v8) but got the same error:
dsub --provider google-v2 --project ukbb-analyses --image ubuntu:18.04 --command '/bin/ls ${MYDISK}' --mount MYDISK="https://www.googleapis.com/compute/v1/projects/centos-cloud/global/images/centos-8-v20191115 1000" --logging gs://ukbb_v2/projects/jamesp/tmp/dsub --regions us-central1 --wait
Job: ls--jamesp--191120-200326-39
Provider internal-id (operation): projects/ukbb-analyses/operations/6975660736633687107
Launched job-id: ls--jamesp--191120-200326-39
To check the status, run:
dstat --provider google-v2 --project ukbb-analyses --jobs 'ls--jamesp--191120-200326-39' --users 'jamesp' --status '*'
To cancel the job, run:
ddel --provider google-v2 --project ukbb-analyses --jobs 'ls--jamesp--191120-200326-39' --users 'jamesp'
Waiting for job to complete...
Waiting for: ls--jamesp--191120-200326-39.
ls--jamesp--191120-200326-39: FAILURE
['Error in ls--jamesp--191120-200326-39 - code 2: Execution failed: preparing disks: mounting "MYDISK" disk: invalid argument']
JobExecutionError: One or more jobs finished with status FAILURE or CANCELED during wait.
ls--jamesp--191120-200326-39
Ah, are those boot disk images? Mounting a boot disk image won't work. You'll need to mount a data disk image.
Oh. That's interesting, helpful, and not intuitive to me. (I say not intuitive because, for example, I can rip the boot disk out of my machine at home and plug it in elsewhere as a non-boot device and still read/write. So it's not immediately obvious that this wouldn't be the case here.)
Might be worth mentioning that limitation in the docs?
PS - Looping back to confirm that dsub
does work for me when I use --mount
for a non-boot disk. Thank you for your help!
The docs have been updated, closing out.
I am trying to mount a disk image (ideally, I'd mount a disk snapshot, but that's a secondary issue). However, I can't seem to get the mount to work. Error message is below. Presumably I'm passing the argument incorrectly or missing something in my incantation, but it's not obvious to me what I've done wrong. It seems that the python code being executed is invalid, but maybe this is an issue with my local python installation. Any pointers?