@@ -110,8 +110,8 @@ func main() {
110
110
111
111
if * runInProw {
112
112
// Try to get a Boskos project
113
- glog .Infof ("Running in PROW" )
114
- glog .Infof ("Fetching a Boskos loaned project" )
113
+ glog .V ( 4 ). Infof ("Running in PROW" )
114
+ glog .V ( 4 ). Infof ("Fetching a Boskos loaned project" )
115
115
116
116
p , err := boskos .Acquire ("gce-project" , "free" , "busy" )
117
117
if err != nil {
@@ -129,13 +129,13 @@ func main() {
129
129
go func (c * client.Client , proj string ) {
130
130
for range time .Tick (time .Minute * 5 ) {
131
131
if err := c .UpdateOne (p .Name , "busy" , nil ); err != nil {
132
- glog .Infof ("[Boskos] Update %s failed with %v" , p , err )
132
+ glog .Warningf ("[Boskos] Update %s failed with %v" , p , err )
133
133
}
134
134
}
135
135
}(boskos , p .Name )
136
136
137
137
// If we're on CI overwrite the service account
138
- glog .Infof ("Fetching the default compute service account" )
138
+ glog .V ( 4 ). Infof ("Fetching the default compute service account" )
139
139
140
140
c , err := google .DefaultClient (context .TODO (), cloudresourcemanager .CloudPlatformScope )
141
141
if err != nil {
@@ -333,7 +333,7 @@ func createInstance(serviceAccount string) (string, error) {
333
333
334
334
name := "gce-pd-csi-e2e"
335
335
myuuid := string (uuid .NewUUID ())
336
- glog .V (2 ).Infof ("Creating instance: %v" , name )
336
+ glog .V (4 ).Infof ("Creating instance: %v" , name )
337
337
338
338
// TODO: Pick a better boot disk image
339
339
imageURL := "projects/ml-images/global/images/family/tf-1-9"
@@ -370,7 +370,7 @@ func createInstance(serviceAccount string) (string, error) {
370
370
371
371
if _ , err := computeService .Instances .Get (* project , * zone , i .Name ).Do (); err != nil {
372
372
op , err := computeService .Instances .Insert (* project , * zone , i ).Do ()
373
- glog .Infof ("Inserted instance %v in project %v, zone %v" , i .Name , * project , * zone )
373
+ glog .V ( 4 ). Infof ("Inserted instance %v in project %v, zone %v" , i .Name , * project , * zone )
374
374
if err != nil {
375
375
ret := fmt .Sprintf ("could not create instance %s: API error: %v" , name , err )
376
376
if op != nil {
@@ -381,11 +381,11 @@ func createInstance(serviceAccount string) (string, error) {
381
381
return "" , fmt .Errorf ("could not create instance %s: %+v" , name , op .Error )
382
382
}
383
383
} else {
384
- glog .Infof ("Compute service GOT instance %v, skipping instance creation" , i .Name )
384
+ glog .V ( 4 ). Infof ("Compute service GOT instance %v, skipping instance creation" , i .Name )
385
385
}
386
386
387
387
if pubkey , ok := os .LookupEnv ("JENKINS_GCE_SSH_PUBLIC_KEY_FILE" ); ok {
388
- glog .Infof ("JENKINS_GCE_SSH_PUBLIC_KEY_FILE set to %v, adding public key to Instance" , pubkey )
388
+ glog .V ( 4 ). Infof ("JENKINS_GCE_SSH_PUBLIC_KEY_FILE set to %v, adding public key to Instance" , pubkey )
389
389
// If we're on CI add public SSH keys to the instance
390
390
err = addPubKeyToInstance (* project , * zone , i .Name , pubkey )
391
391
if err != nil {
@@ -522,7 +522,7 @@ func getComputeClient() (*compute.Service, error) {
522
522
}
523
523
524
524
func deleteInstance (host string ) {
525
- glog .Infof ("Deleting instance %q" , host )
525
+ glog .V ( 4 ). Infof ("Deleting instance %q" , host )
526
526
_ , err := computeService .Instances .Delete (* project , * zone , host ).Do ()
527
527
if err != nil {
528
528
if gce .IsGCEError (err , "notFound" ) {
0 commit comments