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

fix(csi/stage): fetch uri via REST #903

Merged
merged 5 commits into from
Dec 11, 2024
Merged

fix(csi/stage): fetch uri via REST #903

merged 5 commits into from
Dec 11, 2024

Conversation

tiagolobocastro
Copy link
Contributor

On a NodeStage call, it's possible that the publish_context URI is out of date. This can happen when the volume has been moved to another node, and the app pod is pinned to a node and the node restarts.
See Mayastor Issue 1781 for more details.

For this fix, we add a new option to enable rest client for the csi-node. Ideally we'd like to strictly adhere to CSI spec, and avoid doing any mayastor specific operations (effectively being a mostly generic nvme-connect csi-driver but the immutability of the publish_context makes this a bit difficult.

Anyways, we add a new flag --enable-rest which is optional, thus still allowing us to run without this layer.
This will be enabled by default on the helm chart.

We also further check for the Nexus Online/Degraded state, which should help avoid a bunch of nvme connect errors in the kernel.

With this, we can also improve a few things down the line, such as ensuring resize before publish, etc... but we should take these 1 at a time and not suddendly do everything via rest...

On a NodeStage call, it's possible that the publish_context URI is out of date.
This can happen when the volume has been moved to another node, and the app pod
is pinned to a node and the node restarts.
See Mayastor Issue 1781 for more details.

For this fix, we add a new option to enable rest client for the csi-node.
Ideally we'd like to strictly adhere to CSI spec, and avoid doing any mayastor
specific operations (effectively being a mostly generic nvme-connect csi-driver
but the immutability of the publish_context makes this a bit difficult.

Anyways, we add a new flag --enable-rest which is optional, thus still allowing
us to run without this layer.
This will be enabled by default on the helm chart.

We also further check for the Nexus Online/Degraded state, which should help
avoid a bunch of nvme connect errors in the kernel.

With this, we can also improve a few things down the line, such as ensuring
resize before publish, etc... but we should take these 1 at a time and not
suddendly do everything via rest...

Signed-off-by: Tiago Castro <[email protected]>
Copy link
Member

@niladrih niladrih left a comment

Choose a reason for hiding this comment

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

Semantics and choice of syntax looks good to me :)

@tiagolobocastro
Copy link
Contributor Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Dec 11, 2024
903: fix(csi/stage): fetch uri via REST r=tiagolobocastro a=tiagolobocastro

On a NodeStage call, it's possible that the publish_context URI is out of date. This can happen when the volume has been moved to another node, and the app pod is pinned to a node and the node restarts.
See Mayastor Issue 1781 for more details.

For this fix, we add a new option to enable rest client for the csi-node. Ideally we'd like to strictly adhere to CSI spec, and avoid doing any mayastor specific operations (effectively being a mostly generic nvme-connect csi-driver but the immutability of the publish_context makes this a bit difficult.

Anyways, we add a new flag --enable-rest which is optional, thus still allowing us to run without this layer.
This will be enabled by default on the helm chart.

We also further check for the Nexus Online/Degraded state, which should help avoid a bunch of nvme connect errors in the kernel.

With this, we can also improve a few things down the line, such as ensuring resize before publish, etc... but we should take these 1 at a time and not suddendly do everything via rest...

Co-authored-by: Tiago Castro <[email protected]>
@bors-openebs-mayastor
Copy link

Build failed:

@tiagolobocastro
Copy link
Contributor Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Dec 11, 2024
903: fix(csi/stage): fetch uri via REST r=tiagolobocastro a=tiagolobocastro

On a NodeStage call, it's possible that the publish_context URI is out of date. This can happen when the volume has been moved to another node, and the app pod is pinned to a node and the node restarts.
See Mayastor Issue 1781 for more details.

For this fix, we add a new option to enable rest client for the csi-node. Ideally we'd like to strictly adhere to CSI spec, and avoid doing any mayastor specific operations (effectively being a mostly generic nvme-connect csi-driver but the immutability of the publish_context makes this a bit difficult.

Anyways, we add a new flag --enable-rest which is optional, thus still allowing us to run without this layer.
This will be enabled by default on the helm chart.

We also further check for the Nexus Online/Degraded state, which should help avoid a bunch of nvme connect errors in the kernel.

With this, we can also improve a few things down the line, such as ensuring resize before publish, etc... but we should take these 1 at a time and not suddendly do everything via rest...

Co-authored-by: Tiago Castro <[email protected]>
@bors-openebs-mayastor
Copy link

Build failed:

Use common script for linting, rather than spread commands...

Signed-off-by: Tiago Castro <[email protected]>
@tiagolobocastro
Copy link
Contributor Author

bors merge

@bors-openebs-mayastor
Copy link

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit 0c08411 into develop Dec 11, 2024
4 checks passed
@bors-openebs-mayastor bors-openebs-mayastor bot deleted the csi-uri branch December 11, 2024 14:24
tiagolobocastro added a commit that referenced this pull request Dec 11, 2024
903: fix(csi/stage): fetch uri via REST r=tiagolobocastro a=tiagolobocastro

On a NodeStage call, it's possible that the publish_context URI is out of date. This can happen when the volume has been moved to another node, and the app pod is pinned to a node and the node restarts.
See Mayastor Issue 1781 for more details.

For this fix, we add a new option to enable rest client for the csi-node. Ideally we'd like to strictly adhere to CSI spec, and avoid doing any mayastor specific operations (effectively being a mostly generic nvme-connect csi-driver but the immutability of the publish_context makes this a bit difficult.

Anyways, we add a new flag --enable-rest which is optional, thus still allowing us to run without this layer.
This will be enabled by default on the helm chart.

We also further check for the Nexus Online/Degraded state, which should help avoid a bunch of nvme connect errors in the kernel.

With this, we can also improve a few things down the line, such as ensuring resize before publish, etc... but we should take these 1 at a time and not suddendly do everything via rest...

Co-authored-by: Tiago Castro <[email protected]>
Signed-off-by: Tiago Castro <[email protected]>
bors-openebs-mayastor bot pushed a commit that referenced this pull request Dec 11, 2024
901: Cherry pick csi-trace and csi-node uri fixes to develop r=tiagolobocastro a=tiagolobocastro

    chore(bors): merge pull request #903

    903: fix(csi/stage): fetch uri via REST r=tiagolobocastro a=tiagolobocastro

    On a NodeStage call, it's possible that the publish_context URI is out of date. This can happen when the volume has been moved to another node, and the app pod is pinned to a node and the node restarts.
    See Mayastor Issue 1781 for more details.

    For this fix, we add a new option to enable rest client for the csi-node. Ideally we'd like to strictly adhere to CSI spec, and avoid doing any mayastor specific operations (effectively being a mostly generic nvme-connect csi-driver but the immutability of the publish_context makes this a bit difficult.

    Anyways, we add a new flag --enable-rest which is optional, thus still allowing us to run without this layer.
    This will be enabled by default on the helm chart.

    We also further check for the Nexus Online/Degraded state, which should help avoid a bunch of nvme connect errors in the kernel.

    With this, we can also improve a few things down the line, such as ensuring resize before publish, etc... but we should take these 1 at a time and not suddendly do everything via rest...

    Co-authored-by: Tiago Castro <[email protected]>
    Signed-off-by: Tiago Castro <[email protected]>

---

    fix(csi-driver): trace was mistakenly added as info

    Signed-off-by: Tiago Castro <[email protected]>

Co-authored-by: Tiago Castro <[email protected]>
Co-authored-by: mayastor-bors <[email protected]>
Abhinandan-Purkait pushed a commit that referenced this pull request Dec 12, 2024
903: fix(csi/stage): fetch uri via REST r=tiagolobocastro a=tiagolobocastro

On a NodeStage call, it's possible that the publish_context URI is out of date. This can happen when the volume has been moved to another node, and the app pod is pinned to a node and the node restarts.
See Mayastor Issue 1781 for more details.

For this fix, we add a new option to enable rest client for the csi-node. Ideally we'd like to strictly adhere to CSI spec, and avoid doing any mayastor specific operations (effectively being a mostly generic nvme-connect csi-driver but the immutability of the publish_context makes this a bit difficult.

Anyways, we add a new flag --enable-rest which is optional, thus still allowing us to run without this layer.
This will be enabled by default on the helm chart.

We also further check for the Nexus Online/Degraded state, which should help avoid a bunch of nvme connect errors in the kernel.

With this, we can also improve a few things down the line, such as ensuring resize before publish, etc... but we should take these 1 at a time and not suddendly do everything via rest...

Co-authored-by: Tiago Castro <[email protected]>
Signed-off-by: Tiago Castro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants