Skip to content

Commit

Permalink
scylla_conifgure.py: skip construct data volume on dev_instance_type
Browse files Browse the repository at this point in the history
Since dev_instance_type does not have local SSD, we should skip running
scylla_create_devices.

Fixes #551
  • Loading branch information
syuu1228 committed Nov 21, 2024
1 parent 26ef84f commit 39213f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions common/scylla_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ def start_scylla_on_first_boot(self):
subprocess.run("/usr/bin/systemctl stop scylla-server.service", shell=True, check=True)

def create_devices(self):
if self.cloud_instance.is_dev_instance_type():
LOGGER.info("Skipping setup data devices")
return
device_type = self.instance_user_data.get("data_device", self.CONF_DEFAULTS['data_device'])
raid_level = self.instance_user_data.get("raid_level", self.CONF_DEFAULTS['raid_level'])
cmd_create_devices = f"/opt/scylladb/scylla-machine-image/scylla_create_devices --data-device {device_type} --raid-level {raid_level}"
Expand Down
2 changes: 1 addition & 1 deletion common/scylla_image_setup
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ if __name__ == '__main__':
# some distro has fstrim enabled by default, since we are using XFS with online discard, we don't need fstrim
run('systemctl is-active -q fstrim.timer && systemctl disable fstrim.timer', shell=True, check=True)

if not os.path.ismount('/var/lib/scylla'):
if not os.path.ismount('/var/lib/scylla') and not cloud_instance.is_dev_instance_type():
print('Failed to initialize RAID volume!')
machine_image_configured.touch()

0 comments on commit 39213f9

Please sign in to comment.