1// Copyright 2022 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.osconfig.logging; 18 19import "google/protobuf/timestamp.proto"; 20 21option go_package = "cloud.google.com/go/osconfig/logging/loggingpb;loggingpb"; 22option java_multiple_files = true; 23option java_outer_classname = "PatchJobLogProto"; 24option java_package = "com.google.cloud.osconfig.logging"; 25 26message PatchJobCompletedLog { 27 // Enumeration of the various states a patch job passes through as it 28 // executes. 29 enum State { 30 // State must be specified. 31 STATE_UNSPECIFIED = 0; 32 33 // The patch job was successfully initiated. 34 STARTED = 1; 35 36 // The patch job is looking up instances to run the patch on. 37 INSTANCE_LOOKUP = 2; 38 39 // Instances are being patched. 40 PATCHING = 3; 41 42 // Patch job completed successfully. 43 SUCCEEDED = 4; 44 45 // Patch job completed but there were errors. 46 COMPLETED_WITH_ERRORS = 5; 47 48 // The patch job was canceled. 49 CANCELED = 6; 50 51 // The patch job has timed out. 52 TIMED_OUT = 7; 53 } 54 55 // A summary of the current patch state across all instances this patch job 56 // affects. Contains counts of instances in different states. These states map 57 // to InstancePatchState. List patch job instance details to see the specific 58 // states of each instance. 59 message InstanceDetailsSummary { 60 // Number of instances pending patch job. 61 int64 instances_pending = 1; 62 63 // Number of instances that are inactive. 64 int64 instances_inactive = 2; 65 66 // Number of instances notified about patch job. 67 int64 instances_notified = 3; 68 69 // Number of instances that have started. 70 int64 instances_started = 4; 71 72 // Number of instances that are downloading patches. 73 int64 instances_downloading_patches = 5; 74 75 // Number of instances that are applying patches. 76 int64 instances_applying_patches = 6; 77 78 // Number of instances rebooting. 79 int64 instances_rebooting = 7; 80 81 // Number of instances that have completed successfully. 82 int64 instances_succeeded = 8; 83 84 // Number of instances that require reboot. 85 int64 instances_succeeded_reboot_required = 9; 86 87 // Number of instances that failed. 88 int64 instances_failed = 10; 89 90 // Number of instances that have acked and will start shortly. 91 int64 instances_acked = 11; 92 93 // Number of instances that exceeded the time out while applying the patch. 94 int64 instances_timed_out = 12; 95 96 // Number of instances that are running the pre-patch step. 97 int64 instances_running_pre_patch_step = 13; 98 99 // Number of instances that are running the post-patch step. 100 int64 instances_running_post_patch_step = 14; 101 } 102 103 // The patch job name. For example: 104 // projects/PROJECT_ID/patchJobs/PATCH_JOB_ID 105 string patch_job = 1; 106 107 // The current state of the PatchJob. 108 State state = 2; 109 110 // Summary of instance details. 111 InstanceDetailsSummary instance_details_summary = 3; 112 113 // If this patch job is a dry run, the agent will report that it has 114 // finished without running any updates on the VM. 115 bool dry_run = 4; 116 117 // If this patch job failed, this message will provide information about the 118 // failure. 119 string error_message = 5; 120 121 // Time this PatchJob was created. 122 google.protobuf.Timestamp create_time = 6; 123 124 // Last time this PatchJob was updated. 125 google.protobuf.Timestamp update_time = 7; 126} 127