You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: auto-detect the root device name from the AMI (#43)
## what
- This PR removes the current hard-coded block device mapping
configuration value and allows for automatic detection of the root
device name from the provided AMI.
## why
- Currently, the block device configuration has the "/dev/xvda" root
device name hard-coded. Although this setting is true for newer images,
some AMIs use different device names (e.g. Ubuntu often uses
"/dev/sda1".
- This PR fixes the "incompatibility" of the "ami" variable and this
hard-coded setting. For example, if anyone provides an Ubuntu AMI, this
leads to AWS autoscaling group being "stuck" and instances won't spawn,
with the following error:
```
Launching a new EC2 instance. Status Reason: The request must contain the parameter size or snapshotId. Launching EC2 instance failed.
```
## references
-
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- The root volume device name is now set dynamically based on the
selected AMI, allowing for compatibility with custom AMIs.
- **Improvements**
- Enhanced flexibility when specifying a custom AMI by automatically
adjusting the root device name in launch templates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
0 commit comments