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

PWX-37959: [Cherry-pick] honour force flag over node status (#2479) #2483

Closed
wants to merge 1 commit into from

Conversation

sanjain-px
Copy link
Collaborator

What this PR does / why we need it:
This PR allows deleting nodes irrespective of their status when force flag is passed.
This allows deletion of faulty node which are online but can't be used.

Which issue(s) this PR fixes (optional)
PWX-37959

Testing Notes

  1. Delete faulty node
pxctl status
Status: PX is operational
Telemetry: Disabled or Unhealthy
Metering: Disabled or Unhealthy
License: Trial (expires in 30 days)
Node ID: f88492c5-1f7b-4868-bb28-c6495d1e2f87
        IP: <ip>
        Local Storage Pool: 1 pool
        POOL    IO_PRIORITY     RAID_LEVEL      USABLE  USED    STATUS  ZONE    REGION
        0       HIGH            raid0           381 GiB 12 GiB  Online  default default
        Local Storage Devices: 3 devices
        Device  Path            Media Type              Size            Last-Scan
        0:1     /dev/sdc2       STORAGE_MEDIUM_SSD      125 GiB         29 Aug 24 07:16 CDT
        0:2     /dev/sdd        STORAGE_MEDIUM_SSD      128 GiB         29 Aug 24 07:16 CDT
        0:3     /dev/sde        STORAGE_MEDIUM_SSD      128 GiB         29 Aug 24 07:16 CDT
        total                   -                       381 GiB
        Cache Devices:
         * No cache devices
        Kvdb Device:
        Device Path     Size
        /dev/sdb        64 GiB
         * Internal kvdb on this node is using this dedicated kvdb device to store its data.
        Journal Device:
        1       /dev/sdc1       STORAGE_MEDIUM_SSD      3.0 GiB
Cluster Summary
        Cluster ID: instant-tb-91137
        Cluster UUID: a0dd6862-7c42-477b-aeb3-244093383483
        Scheduler: kubernetes
        Total Nodes: 3 node(s) with storage (3 online)
        IP              ID                                      SchedulerNodeName          Auth             StorageNode     Used            Capacity        Status  StorageStatus   Version             Kernel                          OS
        Unavailable     fb1a5758-e374-4024-8e74-22cd668b0058    N/A                        Unknown          Yes             Unavailable     Unavailable     Online  Up              Unavailable Unavailable                     Unavailable
        <ip>   f88492c5-1f7b-4868-bb28-c6495d1e2f87    ip-.pwx.purestorage.com        Disabled        Yes             12 GiB          381 GiB         Online  Up (This node)      3.2.0.0-db23d8e 5.14.0-284.23.1.el9_2.x86_64    Red Hat Enterprise Linux 9.2 (Plow)
        Unavailable     39689fa6-6075-406c-9e39-88ca27739f05    N/A                        Unknown          Yes             Unavailable     Unavailable     Online  Up              Unavailable Unavailable                     Unavailable
Global Storage Pool
        Total Used      :  12 GiB
        Total Capacity  :  381 GiB
Warning: Error occurred during capacity calculation. The overall capacity and usage numbers may not be accurate.
  1. PX asked for an approval
pxctl cluster delete fb1a5758-e374-4024-8e74-22cd668b0058 -f
This is a disruptive operation.
Volumes which reside only on this node or which have latest data only on this node will be irrevocably deleted or reset to a previous state.
Are you sure you want to proceed ? (Y/N): Y
Node fb1a5758-e374-4024-8e74-22cd668b0058 successfully deleted.
  1. Node removed
pxctl status
Status: PX is operational
Telemetry: Disabled or Unhealthy
Metering: Disabled or Unhealthy
License: Trial (expires in 30 days)
Node ID: f88492c5-1f7b-4868-bb28-c6495d1e2f87
        IP: <ip>
        Local Storage Pool: 1 pool
        POOL    IO_PRIORITY     RAID_LEVEL      USABLE  USED    STATUS  ZONE    REGION
        0       HIGH            raid0           381 GiB 12 GiB  Online  default default
        Local Storage Devices: 3 devices
        Device  Path            Media Type              Size            Last-Scan
        0:1     /dev/sdc2       STORAGE_MEDIUM_SSD      125 GiB         29 Aug 24 07:16 CDT
        0:2     /dev/sdd        STORAGE_MEDIUM_SSD      128 GiB         29 Aug 24 07:16 CDT
        0:3     /dev/sde        STORAGE_MEDIUM_SSD      128 GiB         29 Aug 24 07:16 CDT
        total                   -                       381 GiB
        Cache Devices:
         * No cache devices
        Kvdb Device:
        Device Path     Size
        /dev/sdb        64 GiB
         * Internal kvdb on this node is using this dedicated kvdb device to store its data.
        Journal Device:
        1       /dev/sdc1       STORAGE_MEDIUM_SSD      3.0 GiB
Cluster Summary
        Cluster ID: instant-tb-91137
        Cluster UUID: a0dd6862-7c42-477b-aeb3-244093383483
        Scheduler: kubernetes
        Total Nodes: 2 node(s) with storage (2 online)
        IP              ID                                      SchedulerNodeName          Auth             StorageNode     Used            Capacity        Status  StorageStatus   Version             Kernel                          OS
        <ip>   f88492c5-1f7b-4868-bb28-c6495d1e2f87    ip-.pwx.purestorage.com        Disabled        Yes             12 GiB          381 GiB         Online  Up (This node)      3.2.0.0-db23d8e 5.14.0-284.23.1.el9_2.x86_64    Red Hat Enterprise Linux 9.2 (Plow)
        Unavailable     39689fa6-6075-406c-9e39-88ca27739f05    N/A                        Unknown          Yes             Unavailable     Unavailable     Online  Up              Unavailable Unavailable                     Unavailable
Global Storage Pool
        Total Used      :  12 GiB
        Total Capacity  :  381 GiB
Warning: Error occurred during capacity calculation. The overall capacity and usage numbers may not be accurate.
  1. Observed PX status for ~15 min. PX was healthy for the entire duration
    Special notes for your reviewer:
    Add any notes for the reviewer here.

* PWX-37959: honour force flag over node status

Signed-off-by: sanjain <[email protected]>

* minor changes

Signed-off-by: sanjain <[email protected]>

* minor changes

Signed-off-by: sanjain <[email protected]>

* added cluster listner mock

Signed-off-by: sanjain <[email protected]>

---------

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

Successfully merging this pull request may close these issues.

1 participant