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 25e13c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions common/scylla_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,12 @@ def create_devices(self):
LOGGER.info(f"Create scylla data devices as {device_type}")
subprocess.run(cmd_create_devices, shell=True, check=True)
except Exception as e:
scylla_excepthook(*sys.exc_info())
LOGGER.error("Failed to create devices: %s", e)
sys.exit(1)
if self.cloud_instance.is_dev_instance_type():
LOGGER.info("Skipping to create devices: %s", e)
else:
scylla_excepthook(*sys.exc_info())
LOGGER.error("Failed to create devices: %s", e)
sys.exit(1)

def configure(self):
self.configure_scylla_yaml()
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 25e13c4

Please sign in to comment.