Skip to content

Commit db1cc11

Browse files
Google APIscopybara-github
authored andcommitted
feat: Adds named reservation to InstancePolicy
--- docs:Remove "not yet implemented" for Accelerator & Refine Volume API docs --- docs: update the job id format requirement PiperOrigin-RevId: 489502315
1 parent 488a4bd commit db1cc11

5 files changed

Lines changed: 34 additions & 27 deletions

File tree

google/cloud/batch/v1/batch.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ message CreateJobRequest {
107107
];
108108

109109
// ID used to uniquely identify the Job within its parent scope.
110-
// This field should contain at most 63 characters.
111-
// Only alphanumeric characters or '-' are accepted.
110+
// This field should contain at most 63 characters and must start with
111+
// lowercase characters.
112+
// Only lowercase characters, numbers and '-' are accepted.
112113
// The '-' character cannot be the first or the last one.
113114
// A system generated ID will be used if the field is not set.
114115
//

google/cloud/batch/v1/batch_v1.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,6 @@ authentication:
117117
oauth:
118118
canonical_scopes: |-
119119
https://www.googleapis.com/auth/cloud-platform
120+
121+
publishing:
122+
organization: CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED

google/cloud/batch/v1/job.proto

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ message AllocationPolicy {
263263
string disk_interface = 6;
264264
}
265265

266-
// A new or an existing persistent disk or a local ssd attached to a VM
266+
// A new or an existing persistent disk (PD) or a local ssd attached to a VM
267267
// instance.
268268
message AttachedDisk {
269269
oneof attached {
@@ -280,7 +280,7 @@ message AllocationPolicy {
280280
string device_name = 3;
281281
}
282282

283-
// Accelerator describes Compute Engine accelerators to be attached to VMs.
283+
// Accelerator describes Compute Engine accelerators to be attached to the VM.
284284
message Accelerator {
285285
// The accelerator type. For example, "nvidia-tesla-t4".
286286
// See `gcloud compute accelerator-types list`.
@@ -309,11 +309,10 @@ message AllocationPolicy {
309309
ProvisioningModel provisioning_model = 4;
310310

311311
// The accelerators attached to each VM instance.
312-
// Not yet implemented.
313312
repeated Accelerator accelerators = 5;
314313

315314
// Non-boot disks to be attached for each VM created by this InstancePolicy.
316-
// New disks will be deleted when the attached VM is deleted.
315+
// New disks will be deleted when the VM is deleted.
317316
repeated AttachedDisk disks = 6;
318317
}
319318

google/cloud/batch/v1/task.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ message Runnable {
126126
bool block_external_network = 9;
127127

128128
// Optional username for logging in to a docker registry. If username
129-
// matches `projects/*/secrets/*/versions/*` then Batch will read the
129+
// matches "projects/*/secrets/*/versions/*" then Batch will read the
130130
// username from the Secret Manager.
131131
string username = 10;
132132

133133
// Optional password for logging in to a docker registry. If password
134-
// matches `projects/*/secrets/*/versions/*` then Batch will read the
134+
// matches "projects/*/secrets/*/versions/*" then Batch will read the
135135
// password from the Secret Manager;
136136
string password = 11;
137137
}

google/cloud/batch/v1/volume.proto

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,46 +25,50 @@ option objc_class_prefix = "GCB";
2525
option php_namespace = "Google\\Cloud\\Batch\\V1";
2626
option ruby_package = "Google::Cloud::Batch::V1";
2727

28-
// Volume and mount parameters to be associated with a TaskSpec. A TaskSpec
29-
// might describe zero, one, or multiple volumes to be mounted as part of the
30-
// task.
28+
// Volume describes a volume and parameters for it to be mounted to a VM.
3129
message Volume {
3230
// The source for the volume.
3331
oneof source {
34-
// An NFS source for the volume (could be a Filestore, for example).
32+
// A Network File System (NFS) volume. For example, a
33+
// Filestore file share.
3534
NFS nfs = 1;
3635

37-
// A Google Cloud Storage source for the volume.
36+
// A Google Cloud Storage (GCS) volume.
3837
GCS gcs = 3;
3938

40-
// Device name of an attached disk
39+
// Device name of an attached disk volume, which should align with a
40+
// device_name specified by
41+
// job.allocation_policy.instances[0].policy.disks[i].device_name or
42+
// defined by the given instance template in
43+
// job.allocation_policy.instances[0].instance_template.
4144
string device_name = 6;
4245
}
4346

44-
// Mount path for the volume, e.g. /mnt/share
47+
// The mount path for the volume, e.g. /mnt/disks/share.
4548
string mount_path = 4;
4649

47-
// Mount options
48-
// For Google Cloud Storage, mount options are the global options supported by
49-
// gcsfuse tool. Batch will use them to mount the volume with the following
50-
// command:
51-
// "gcsfuse [global options] bucket mountpoint".
52-
// For PD, NFS, mount options are these supported by /etc/fstab. Batch will
53-
// use Fstab to mount such volumes.
54-
// https://help.ubuntu.com/community/Fstab
50+
// For Google Cloud Storage (GCS), mount options are the options supported by
51+
// the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse).
52+
// For existing persistent disks, mount options provided by the
53+
// mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except
54+
// writing are supported. This is due to restrictions of multi-writer mode
55+
// (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms).
56+
// For other attached disks and Network File System (NFS), mount options are
57+
// these supported by the mount command
58+
// (https://man7.org/linux/man-pages/man8/mount.8.html).
5559
repeated string mount_options = 5;
5660
}
5761

58-
// Represents an NFS server and remote path: <server>:<remote_path>
62+
// Represents an NFS volume.
5963
message NFS {
60-
// URI of the NFS server, e.g. an IP address.
64+
// The IP address of the NFS.
6165
string server = 1;
6266

63-
// Remote source path exported from NFS, e.g., "/share".
67+
// Remote source path exported from the NFS, e.g., "/share".
6468
string remote_path = 2;
6569
}
6670

67-
// Represents a Google Cloud Storage volume source config.
71+
// Represents a Google Cloud Storage volume.
6872
message GCS {
6973
// Remote path, either a bucket name or a subdirectory of a bucket, e.g.:
7074
// bucket_name, bucket_name/subdirectory/

0 commit comments

Comments
 (0)