Skip to content

Commit dc9293e

Browse files
committed
roachtest: create data dir without disk
Previously, some tests will fail because they still expect `/mnt/data1` to be present even if it is not used as a node disk, but for other reasons like installing Kafka, or a directory based request run across all nodes including the workload node. Hence, we now create the directory even if the VM only has a boot disk to support these scenarios. Epic: None Release note: None
1 parent 252ec90 commit dc9293e

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

pkg/roachprod/vm/aws/support.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const awsStartupScriptTemplate = `#!/usr/bin/env bash
3131
3232
function setup_disks() {
3333
{{ if .BootDiskOnly }}
34+
mkdir -p /mnt/data1 && chmod 777 /mnt/data1
3435
echo "VM has no disk attached other than the boot disk."
3536
return 0
3637
{{ end }}

pkg/roachprod/vm/azure/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const azureStartupTemplate = `#!/bin/bash
3232
3333
function setup_disks() {
3434
{{ if .BootDiskOnly }}
35+
mkdir -p /mnt/data1 && chmod 777 /mnt/data1
3536
echo "VM has no disk attached other than the boot disk."
3637
return 0
3738
{{ end }}

pkg/roachprod/vm/gce/utils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function setup_disks() {
2929
first_setup=$1
3030
3131
{{ if .BootDiskOnly }}
32+
mkdir -p /mnt/data1 && chmod 777 /mnt/data1
3233
echo "VM has no disk attached other than the boot disk."
3334
return 0
3435
{{ end }}

pkg/roachprod/vm/ibm/startup.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const startupTemplate = `#!/usr/bin/env bash
2929
3030
function setup_disks() {
3131
{{ if .BootDiskOnly }}
32+
mkdir -p /mnt/data1 && chmod 777 /mnt/data1
3233
echo "VM has no disk attached other than the boot disk."
3334
return 0
3435
{{ end }}

0 commit comments

Comments
 (0)