quads icon indicating copy to clipboard operation
quads copied to clipboard

(RFE) Add --replace-host functionality

Open sadsfae opened this issue 5 years ago • 0 comments

This is an RFE to provide a command-set to replace one running host's current (or future, specific cloud) schedule with a replacement host. The real-world usage of this would occur if hardware issues or supplanting one model with a more preferred model in an active or future assignment would occur.

Due to the potentially disruptive nature of this command if it were typo'd or used incorrectly we should consider confirmation if we are operating on a currently-running cloud.

NOTE The replacement host must not conflict with the schedule from the old host being replaced, this must be checked in all occasions.

NOTE For using --replace-host against currently-running assignments shorten the schedule, do not remove it - that way we have the record on books for partial usage of the system before it was swapped.

There are two scenarios here that come to mind:

1A) Replacing a host with another host in a currently-running cloud, confirm

# quads-cli --replace-host --oldhost host01 --newhost host02
(remove old host) host01 -> cloud03 start:2020-11-01 22:00 end:2020-11-18 15:20
(new schedule host) host02 -> cloud03 start:2020-11-18 15:20 end:2020-11-22 22:00
Confirm?  Y/N

1B) Replacing a host with another host in a currently-running cloud, no confirmation via --force

# quads-cli --replace-host --oldhost host01 --newhost host02 --force
(remove host) host01 -> cloud03 start:2020-11-01 22:00 end:2020-11-18 15:20
(new schedule host) host02 -> cloud03 start:2020-11-18 15:20 end:2020-11-22 22:00

2A) Replace host in the next occurring future cloud assignment specified

# quads-cli --replace-host --oldhost host01 --newhost host02 --cloud cloud02
(remove host) host01 -> cloud02 start:2021-11-01 22:00 end:2021-11-15 22:00
(new schedule host) host02 -> cloud02 start:2021-11-01 22:00 end:2021-11-15 22:00
  • Check the schedule entered on oldhost for the first future occurence of it being in cloud02, and replicate this to anotehr host to swap it, checking availability

sadsfae avatar Nov 10 '20 17:11 sadsfae