Skip to content

feature: Add support for data disks on Azure Stack Hub #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

gcampbell12
Copy link

Azure Stack Hub currently does not handle the dataDisks from the provider spec and silently ignores this configuration, this PR will now handle these disks allowing Machines to be launched with attached data disks on Azure Stack Hub the handling of the data disks is largely mirrored from https://github.com/openshift/machine-api-provider-azure/blob/main/pkg/cloud/azure/services/virtualmachines/virtualmachines.go, with the addition of throwing an error if the user specifies an UltraDisk or disk encryption set since these do not appear to be supported used by the model currently used by the stack hub client.

@openshift-ci openshift-ci bot requested review from elmiko and racheljpg May 22, 2025 14:30
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 22, 2025
Copy link
Contributor

openshift-ci bot commented May 22, 2025

Hi @gcampbell12. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Contributor

openshift-ci bot commented May 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign radekmanak for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
Copy link
Contributor

openshift-ci bot commented May 22, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign radekmanak for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

@mdbooth mdbooth left a comment

Choose a reason for hiding this comment

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

This is fine in principal. I suspect that the only reason Stack Hub doesn't have this support is that there's a large amount of copy/paste in this repo and we just forgot Stack Hub when adding support for data disks.

With that in mind, assuming we don't want to backport this new feature I would prefer to merge #155 first, which eliminates a lot of the Stack Hub cut/paste in this package. With 2 exceptions that I've queried below, this would also allow the Stack Hub implementation to simply call the existing generateDataDisks method rather than creating yet another cut/paste.

If the 2 highlighted omissions aren't supported on Stack Hub, my preference would be to guard them in the common implementation with an if !stackHub and a comment explaining why rather than a full copy paste.

I'm fine with this feature as long as we can test it.

"A Data Disk with `lun`: %d, already exists. `lun` must be unique.",
dataDiskName, vmSpec.Name, disk.Lun)
}

Copy link
Contributor

Choose a reason for hiding this comment

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


dataDisks[i].ManagedDisk = &compute.ManagedDiskParameters{
StorageAccountType: compute.StorageAccountTypes(disk.ManagedDisk.StorageAccountType),
}
Copy link
Contributor

@mdbooth mdbooth Jun 4, 2025

Choose a reason for hiding this comment

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

Was there a specific reason to omit support for Disk Encryption Set here?

https://github.com/mdbooth/machine-api-provider-azure/blob/afd0f3f9fdf04a106ae0be1a05e19c54171e5c28/pkg/cloud/azure/services/virtualmachines/virtualmachines.go#L624-L629

Guessing DES support is too new for Stack Hub's older API version?

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 5, 2025
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mdbooth
Copy link
Contributor

mdbooth commented Jul 31, 2025

Is this a thing?

/close

Superceded by #156

@openshift-ci openshift-ci bot closed this Jul 31, 2025
Copy link
Contributor

openshift-ci bot commented Jul 31, 2025

@mdbooth: Closed this PR.

In response to this:

Is this a thing?

/close

Superceded by #156

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants