Merge pull request #4103 from aws-lumberyard-dev/pipelines/nvme-volume-support

Add support for NVMe volumes to mounting script
This commit is contained in:
Brian Herrera
2021-09-14 15:30:27 -07:00
committed by GitHub
@@ -320,10 +320,14 @@ def mount_volume_to_device(created):
time.sleep(1)
else:
subprocess.call(['file', '-s', '/dev/xvdf'])
device_name = '/dev/xvdf'
nvme_device_name = '/dev/nvme1n1'
if os.path.exists(nvme_device_name):
device_name = nvme_device_name
subprocess.call(['file', '-s', device_name])
if created:
subprocess.call(['mkfs', '-t', 'ext4', '/dev/xvdf'])
subprocess.call(['mount', '/dev/xvdf', MOUNT_PATH])
subprocess.call(['mkfs', '-t', 'ext4', device_name])
subprocess.call(['mount', device_name, MOUNT_PATH])
def attach_volume_to_ec2_instance(volume, volume_id, instance_id, timeout_duration=DEFAULT_TIMEOUT):
@@ -515,4 +519,4 @@ def main(action, snapshot_hint, repository_name, project, pipeline, branch, plat
if __name__ == "__main__":
args = parse_args()
ret = main(args.action, args.snapshot_hint, args.repository_name, args.project, args.pipeline, args.branch, args.platform, args.build_type, args.disk_size, args.disk_type)
sys.exit(ret)
sys.exit(ret)