Feature Request: Persistent/Ephemeral Storage Selection for Stemcells
Detailed Description
Currently, virtual machine (VM) data and their disks are stored in datastores. In my setup, these datastores are replicated using storage array mechanisms. To optimize performance, only persistent data is replicated, while ephemeral data, including VM images, remains ephemeral.
In vSphere, VM files and stemcells are similar objects. However, in BOSH, these are treated as separate objects:
- Stemcells are considered persistent and easily restorable.
- VMs are ephemeral and should always be recreated using the stemcell.
To maintain this behavior after restoring an environment from persistent data, while restoring BOSH env (using BBL) we currently have to manually execute:
bosh upload-stemcell --fix
before deployments can proceed.
The requested feature would allow defining a persistent storage option for stemcells, ensuring that after an environment recovery, deployments can automatically use stemcells without requiring manual intervention.
Context:
- This feature is critical for setups where only persistent data is replicated, reducing unnecessary load and storage usage.
- Automating this process would eliminate the need for manual
bosh upload-stemcell --fix, making BOSH more resilient to environment restoration scenarios.
- Other users managing large-scale vSphere environments with replication could benefit from this enhancement by ensuring that stemcells are always available without additional manual steps.
Possible Implementation
- Modify the BOSH vSphere CPI to allow configuration of persistent or ephemeral storage selection for stemcells.
- For exemple at this location in the code Cloud.rb#L219 allow the invocation of:
target_datastore_pattern: StoragePicker.choose_global_stemcell_pattern(@datacenter),
- Implement
StoragePicker.choose_global_stemcell_pattern(@datacenter) to determine whether a persistent or ephemeral storage pattern should be used based on the configuration.
If this feature is accepted, I am willing to implement it and submit a pull request. Let me know if this aligns with the project's vision.
Complexity
Feature Request: Persistent/Ephemeral Storage Selection for Stemcells
Detailed Description
Currently, virtual machine (VM) data and their disks are stored in datastores. In my setup, these datastores are replicated using storage array mechanisms. To optimize performance, only persistent data is replicated, while ephemeral data, including VM images, remains ephemeral.
In vSphere, VM files and stemcells are similar objects. However, in BOSH, these are treated as separate objects:
To maintain this behavior after restoring an environment from persistent data, while restoring BOSH env (using BBL) we currently have to manually execute:
before deployments can proceed.
The requested feature would allow defining a persistent storage option for stemcells, ensuring that after an environment recovery, deployments can automatically use stemcells without requiring manual intervention.
Context:
bosh upload-stemcell --fix, making BOSH more resilient to environment restoration scenarios.Possible Implementation
StoragePicker.choose_global_stemcell_pattern(@datacenter)to determine whether a persistent or ephemeral storage pattern should be used based on the configuration.If this feature is accepted, I am willing to implement it and submit a pull request. Let me know if this aligns with the project's vision.
Complexity