Skip to content
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

[BUG] Unable to set size when creating Longhorn V2 volume #6791

Closed
tserong opened this issue Oct 16, 2024 · 9 comments
Closed

[BUG] Unable to set size when creating Longhorn V2 volume #6791

tserong opened this issue Oct 16, 2024 · 9 comments
Assignees
Labels
area/ui Harvester standalone UI or Rancher UI extension kind/bug Issues that are defects reported by users or that we know have reached a real release reproduce/always Reproducible 100% of the time severity/3 Function working but has a major issue w/ workaround
Milestone

Comments

@tserong
Copy link
Contributor

tserong commented Oct 16, 2024

Describe the bug
When creating a new volume using a longhorn v2 storage class, the size box is disabled:

image

To Reproduce
Steps to reproduce the behavior:

  1. Enable the Longhorn V2 data engine
  2. Create a longhorn v2 storage class
  3. Try to create a volume using that storage class
  4. Observe that the size box is disabled

Expected behavior
The size box is enabled when creating volumes. It should only be disabled when editing v2 volumes .

Note that it's possible to work around the problem by setting the size before choosing the longhorn v2 storage class.

Environment

  • Harvester ISO version: 650dff1
  • Underlying Infrastructure (e.g. Baremetal with Dell PowerEdge R630): Virtualized

Additional context
Related to #6685

@tserong tserong added kind/bug Issues that are defects reported by users or that we know have reached a real release area/ui Harvester standalone UI or Rancher UI extension severity/3 Function working but has a major issue w/ workaround reproduce/always Reproducible 100% of the time labels Oct 16, 2024
@tserong tserong added this to the v1.4.0 milestone Oct 16, 2024
@harvesterhci-io-github-bot

Pre Ready-For-Testing Checklist

  • If labeled: require/HEP Has the Harvester Enhancement Proposal PR submitted?
    The HEP PR is at:

  • Where is the reproduce steps/test steps documented?
    The reproduce steps/test steps are at:

  • Is there a workaround for the issue? If so, where is it documented?
    The workaround is at:

  • Have the backend code been merged (harvester, harvester-installer, etc) (including backport-needed/*)?
    The PR is at:

    • Does the PR include the explanation for the fix or the feature?

    • Does the PR include deployment change (YAML/Chart)? If so, where are the PRs for both YAML file and Chart?
      The PR for the YAML change is at:
      The PR for the chart change is at:

  • If labeled: area/ui Has the UI issue filed or ready to be merged?
    The UI issue/PR is at:

  • If labeled: require/doc, require/knowledge-base Has the necessary document PR submitted or merged?
    The documentation/KB PR is at:

  • If NOT labeled: not-require/test-plan Has the e2e test plan been merged? Have QAs agreed on the automation test case? If only test case skeleton w/o implementation, have you created an implementation issue?

    • The automation skeleton PR is at:
    • The automation test case PR is at:
  • If the fix introduces the code for backward compatibility Has a separate issue been filed with the label release/obsolete-compatibility?
    The compatibility issue is filed at:

@harvesterhci-io-github-bot

Automation e2e test issue: harvester/tests#1602

@rrajendran17
Copy link
Contributor

@a110605 @tserong I have an 1.4.0-rc2 installed and I believe since its UI changes, I changed my UI settings from "Auto" to "External" so that it could pick the latest UI changes for my verification.
I still see "size" could be edited using edit config after creating the volume.

I also observed that, size field is editable with or without the fix.Please let me know if I am missing something.

6791-img1.png

6791-img2.png

6791-img3.png

6791-img4.png

@a110605
Copy link

a110605 commented Oct 23, 2024

Disable volume size input when isLonghornV2 and edit mode (backport #1198) harvester/dashboard#1199

Hi @rrajendran17 ,
from your second screenshot, lhv2 storage class was chosen Longhorn v1 (CSI) provisioner. So the volume (lhv2volume) created from lhv2 storage class still using LHv1 version. (LHv1 volume allow edit size field after volume created)

Could you create another Longhorn V2 storage class and use that sc to create another LHv2 volume ?
The LHv2 volume should NOT be editable after volume created.
Like screenshot in PR : harvester/dashboard#1198

@rrajendran17
Copy link
Contributor

@a110605 do we have to enable longhorn-v2-data-engine-enabled this for this longhornv2 version ?
I see even after rebooting the node, the error stays.

sc1.png

I see only Longhorn v1(csi) available from the drop down.

sc.png

@a110605
Copy link

a110605 commented Oct 24, 2024

@a110605 do we have to enable longhorn-v2-data-engine-enabled this for this longhornv2 version ? I see even after rebooting the node, the error stays.

sc1.png

I see only Longhorn v1(csi) available from the drop down.

sc.png

hi @tserong , @Vicente-Cheng , could you help take a look ?
Is that need a special disk setting or env to enable Longhorn v2 settings ?

@rrajendran17
Copy link
Contributor

rrajendran17 commented Oct 24, 2024

Thanks @a110605 @Vicente-Cheng.I am able to test this after installing v1.4-rc4 in my setup.
It is working as expected for this bug. But just the volume created is in degraded state due to "Precheck new replica failed"
Is this expected ?

6791-new1.png

6791-new2.png

6791-new3.png

6791-new4.png

@rrajendran17
Copy link
Contributor

@Vicente-Cheng Even storage class with 2 replica, the volume is in degraded state with error "precheck new replica failed".
Since the issue reported in this bug is solved, I am closing this.
For the error seen , please use 172.19.97.190 (v1.4.0-rc4 installed) to check further when you get time

@Vicente-Cheng
Copy link
Contributor

@Vicente-Cheng Even storage class with 2 replica, the volume is in degraded state with error "precheck new replica failed". Since the issue reported in this bug is solved, I am closing this. For the error seen , please use 172.19.97.190 (v1.4.0-rc4 installed) to check further when you get time

Hi @rrajendran17,
I think the error comes from https://github.com/longhorn/longhorn-manager/blob/v1.7.2/controller/volume_controller.go#L2313-L2325

And it still means cannot find new replica backend candidates (REF: https://github.com/longhorn/longhorn-manager/blob/v1.7.2/controller/volume_controller.go#L3658-L3669)

So, that might be the same as I discussed with you.
I will check your environment to confirm that again.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui Harvester standalone UI or Rancher UI extension kind/bug Issues that are defects reported by users or that we know have reached a real release reproduce/always Reproducible 100% of the time severity/3 Function working but has a major issue w/ workaround
Projects
None yet
Development

No branches or pull requests

5 participants