Skip to content

Add support for increased block storage volume limits#757

Open
dawiddzhafarov wants to merge 3 commits intolinode:proj/block-storage-volume-limit-increasefrom
dawiddzhafarov:feature/TPT-4041-ansible-support-increased-block-storage-volume-limits
Open

Add support for increased block storage volume limits#757
dawiddzhafarov wants to merge 3 commits intolinode:proj/block-storage-volume-limit-increasefrom
dawiddzhafarov:feature/TPT-4041-ansible-support-increased-block-storage-volume-limits

Conversation

@dawiddzhafarov
Copy link

📝 Description

This PR adds support for configuring up to 64 devices (volumes/disks) per Linode Instance Configuration, depending on the Linode's RAM.
Previously you could define 8 slots: sda-sdh.
Now you can define sda-sdz, sdaa-sdaz and sdba-sdbl.

There was also a bug in the logic, when if you have skipped consecutive device from configuration, it was added anyway as a Null object.

✔️ How to Test

In order to utilize the logic for increased block storage volume limits, make sure to use proj/block-storage-volume-limit-increase branch inside linode_api4-python repository. (I have used: pip install -e .)

To run unit tests (1 new unit test case):
make test-unit

To run Integration tests:
make integration-test TEST_SUITE=instance_volumes_limit

@dawiddzhafarov dawiddzhafarov marked this pull request as ready for review February 13, 2026 13:33
@dawiddzhafarov dawiddzhafarov requested a review from a team as a code owner February 13, 2026 13:33
@dawiddzhafarov dawiddzhafarov requested review from ezilber-akamai and yec-akamai and removed request for a team February 13, 2026 13:33
@dawiddzhafarov dawiddzhafarov added the new-feature for new features in the changelog. label Feb 13, 2026
@yec-akamai yec-akamai requested a review from Copilot February 13, 2026 19:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the Linode Instance module’s configuration device mapping from 8 slots (sdasdh) up to 64 slots (up to sdbl), and adds logic intended to avoid passing unintended null devices while also enforcing a per-instance-type device limit derived from RAM.

Changes:

  • Add generate_device_suffixes() helper to produce the expanded device suffix set (64 total).
  • Update the instance module’s device schema and config creation logic to use the expanded suffix set and enforce a calculated device limit.
  • Add a unit test for suffix generation and a new integration test target for validating volume attachment limits.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
plugins/module_utils/linode_helper.py Adds a constant and helper to generate supported device suffixes up to 64.
plugins/modules/instance.py Expands device spec keys to 64 and adds device reconciliation/limit enforcement before config creation.
tests/unit/module_utils/test_linode_helper.py Adds a unit test validating the generated suffix list.
tests/integration/targets/instance_volumes_limit/tasks/main.yaml New integration test validating attachment up to a limit and failure beyond it.
docs/modules/instance.md Documents the expanded set of device keys in the module docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running the integration test locally, it failed at Create a Linode instance with 16 volumes: /linode_api4/objects/linode.py\", line 1307, in config_create\n device_map[device_names[i]] = {\"volume_id\": d.id}\n ~~~~~~~~~~~~^^^\n\nIndexError: list index out of range\n"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants