Skip to content

Commit

Permalink
Add Google Batch warning when for conflicting disk image config (#5279)…
Browse files Browse the repository at this point in the history
… [ci fast]

When both boot disk image and instance template are specified, the
instance template gets priority, as with many other options covered by
instance templates. Warn the user in this case.

This was missed in #5268.

Signed-off-by: Siddhartha Bagaria <[email protected]>
  • Loading branch information
siddharthab authored Sep 3, 2024
1 parent a0bf8b4 commit 96cb57c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/google.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ process myTask {

:::{note}
Using an instance template will overwrite the `accelerator` and `disk` directives, as well as the following Google Batch
config options: `cpuPlatform`, `preemptible`, and `spot`.
config options: `bootDiskImage`, `cpuPlatform`, `preemptible`, and `spot`.
:::

To use an instance template with GPUs, you must also set the `google.batch.installGpuDrivers` config option to `true`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ class GoogleBatchTaskHandler extends TaskHandler implements FusionAwareTask {
if( task.config.getDisk() )
log.warn1 'Process directive `disk` ignored because an instance template was specified'

if( executor.config.getBootDiskImage() )
log.warn1 'Config option `google.batch.bootDiskImage` ignored because an instance template was specified'

if( executor.config.cpuPlatform )
log.warn1 'Config option `google.batch.cpuPlatform` ignored because an instance template was specified'

Expand Down

0 comments on commit 96cb57c

Please sign in to comment.