Add wait support to more commands #72

Closed
opened 2020-01-12 23:29:56 -05:00 by JoshuaBoniface · 14 comments
JoshuaBoniface commented 2020-01-12 23:29:56 -05:00 (Migrated from git.bonifacelabs.ca)

Several more CLI (and API) commands would benefit from a --wait flag to block them until the task is complete.

Off-hand some examples:

  • pvc vm shutdown/pvc vm restart (wait until out of shutdown state)
  • pvc vm migrate/pvc vm move/pvc vm unmigrate (wait until out of migrate state)
  • pvc node primary/pvc node secondary (wait until new primary is established; might be tricky as this is not relayed)
Several more CLI (and API) commands would benefit from a `--wait` flag to block them until the task is complete. Off-hand some examples: * `pvc vm shutdown`/`pvc vm restart` (wait until out of `shutdown` state) * `pvc vm migrate`/`pvc vm move`/`pvc vm unmigrate` (wait until out of `migrate` state) * `pvc node primary`/`pvc node secondary` (wait until new primary is established; might be tricky as this is not relayed)
JoshuaBoniface commented 2020-01-12 23:33:18 -05:00 (Migrated from git.bonifacelabs.ca)

changed milestone to %1

changed milestone to %1
JoshuaBoniface commented 2020-01-12 23:34:44 -05:00 (Migrated from git.bonifacelabs.ca)

changed the description

changed the description
JoshuaBoniface commented 2020-01-15 18:28:10 -05:00 (Migrated from git.bonifacelabs.ca)

changed milestone to %2

changed milestone to %2
JoshuaBoniface commented 2020-02-19 10:21:22 -05:00 (Migrated from git.bonifacelabs.ca)

mentioned in commit 78780039de

mentioned in commit 78780039de9ed093d710b7aab23290de4d6ee928
JoshuaBoniface commented 2020-02-19 10:21:22 -05:00 (Migrated from git.bonifacelabs.ca)

mentioned in commit 45040a5635

mentioned in commit 45040a56359d3f60103d90a171862e500832f5b4
JoshuaBoniface commented 2020-02-19 10:21:22 -05:00 (Migrated from git.bonifacelabs.ca)

mentioned in commit 07577a52a9

mentioned in commit 07577a52a9542cc67964190075eb9758b62928ce
JoshuaBoniface commented 2020-02-19 10:21:22 -05:00 (Migrated from git.bonifacelabs.ca)

mentioned in commit 99f579e41a

mentioned in commit 99f579e41a108800c1f5b4c5add47c8aa8d9a9ba
JoshuaBoniface commented 2020-02-19 10:22:24 -05:00 (Migrated from git.bonifacelabs.ca)

Implemented the first two options; the third will require more work, investigating.

Implemented the first two options; the third will require more work, investigating.
JoshuaBoniface commented 2020-02-19 10:55:42 -05:00 (Migrated from git.bonifacelabs.ca)

mentioned in commit 0aefafa7f7

mentioned in commit 0aefafa7f777157776084db846240dd027b81fe3
JoshuaBoniface commented 2020-02-19 10:55:42 -05:00 (Migrated from git.bonifacelabs.ca)

mentioned in commit 8678dedfea

mentioned in commit 8678dedfead6899cfd432c49ac38cbdfe1588b4d
JoshuaBoniface commented 2020-02-19 10:56:21 -05:00 (Migrated from git.bonifacelabs.ca)

Option 3 on the API side turned out to not be possible, since the API terminates during the state transition. It might be possible to implement as a client-only function.

Option 3 on the API side turned out to not be possible, since the API terminates during the state transition. It might be possible to implement as a client-only function.
JoshuaBoniface commented 2020-02-19 11:01:53 -05:00 (Migrated from git.bonifacelabs.ca)

Option 3 might work better if the domain state was set to "transitioning" on the primary node during the cutover; would be a bit more complex but provide better visibility into the state on both sides of the API switchover.

Flow would be something like:

  1. Call transition; new primary goes into "transition" coordinator state
  2. Wait 1-2 seconds for transition to begin
  3. Ping the API until it returns
  4. Block until new primary goes into "primary" state
Option 3 might work better if the domain state was set to "transitioning" on the primary node during the cutover; would be a bit more complex but provide better visibility into the state on both sides of the API switchover. Flow would be something like: 1. Call transition; new primary goes into "transition" coordinator state 2. Wait 1-2 seconds for transition to begin 3. Ping the API until it returns 4. Block until new primary goes into "primary" state
JoshuaBoniface commented 2020-02-19 14:12:58 -05:00 (Migrated from git.bonifacelabs.ca)

mentioned in commit d2a5fe59c0

mentioned in commit d2a5fe59c0e023fd937ef22239c61b7797b048e8
JoshuaBoniface commented 2020-02-19 14:35:19 -05:00 (Migrated from git.bonifacelabs.ca)

closed via commit 39ce704969

closed via commit 39ce7049698c8eab4b2e7f1a2961669f93855e91
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: parallelvirtualcluster/pvc#72
No description provided.