Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Build up targets from device-scanner output #2107

Merged
merged 7 commits into from
Aug 20, 2020
Merged

Build up targets from device-scanner output #2107

merged 7 commits into from
Aug 20, 2020

Conversation

jgrund
Copy link
Member

@jgrund jgrund commented Jul 27, 2020

The device-scanner has all the needed info to determine targets at
runtime.

This patch finds those targets and figures out all the hosts they can be
mounted on. We can then persist that info to the database and use it
instead of having to detect manually.

Signed-off-by: Joe Grund jgrund@whamcloud.io


This change is Reviewable

@johnsonw johnsonw force-pushed the build-targets branch 3 times, most recently from 0c0a194 to 5a51b90 Compare August 5, 2020 15:25
@johnsonw
Copy link
Contributor

johnsonw commented Aug 5, 2020

This video highlights the following details:

  1. The chroma_core_targets table is updated to reflect the active host and failover host information when the cluster is put into standby mode.
  2. When a target is unmounted, the table will be updated such that the:
    a. The mount_path column is set to NULL
    b. The active_host_id column is set to NULL
    c. The state column is set to "unmounted"

targets_failover

@johnsonw johnsonw force-pushed the build-targets branch 2 times, most recently from dde0ff1 to 4fb1f70 Compare August 5, 2020 16:57
@johnsonw johnsonw marked this pull request as ready for review August 5, 2020 22:54
@johnsonw johnsonw force-pushed the build-targets branch 2 times, most recently from b3b7fcb to 8cce169 Compare August 10, 2020 17:29
@johnsonw
Copy link
Contributor

Latest tests running here: https://build.whamcloud.com/job/manager-for-lustre/1657/

@johnsonw johnsonw force-pushed the build-targets branch 2 times, most recently from e730f9c to a540cc6 Compare August 12, 2020 14:38
ip1981
ip1981 previously approved these changes Aug 12, 2020
device-scanner/device-types/src/devices.rs Outdated Show resolved Hide resolved
iml-services/iml-device/Cargo.toml Outdated Show resolved Hide resolved
@johnsonw johnsonw force-pushed the build-targets branch 2 times, most recently from a6c6b76 to 0e2ab3e Compare August 19, 2020 15:08
@jgrund jgrund force-pushed the build-targets branch 2 times, most recently from 73a2ad9 to 5a335cd Compare August 19, 2020 15:26
@jgrund jgrund requested a review from a team August 19, 2020 17:32
Copy link
Member Author

@jgrund jgrund left a comment

Choose a reason for hiding this comment

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

I think the API wrapping collections would be cleaner if they were implemented as traits or free fns instead.

When you wrap a collection, you need to write methods for everything the collection that you want to expose or otherwise reach inside the wrapper to use it.

iml-services/iml-device/src/main.rs Outdated Show resolved Hide resolved
iml-services/iml-device/src/lib.rs Outdated Show resolved Hide resolved
iml-services/iml-device/src/lib.rs Outdated Show resolved Hide resolved
@johnsonw johnsonw changed the base branch from master to change-crate August 20, 2020 14:32
johnsonw
johnsonw previously approved these changes Aug 20, 2020
Base automatically changed from change-crate to master August 20, 2020 17:28
@jgrund jgrund dismissed johnsonw’s stale review August 20, 2020 17:28

The base branch was changed.

jgrund and others added 5 commits August 20, 2020 14:03
The device-scanner has all the needed info to determine targets at
runtime.

This patch finds those targets and figures out all the hosts they can be
mounted on. We can then persist that info to the database and use it
instead of having to detect manually.

Signed-off-by: Joe Grund <jgrund@whamcloud.io>
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
Signed-off-by: Joe Grund <jgrund@whamcloud.io>
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
@jgrund jgrund requested a review from johnsonw August 20, 2020 18:40
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
@jgrund jgrund requested a review from a team August 20, 2020 23:05
@jgrund
Copy link
Member Author

jgrund commented Aug 20, 2020

LGTM

@jgrund jgrund merged commit a0f8d70 into master Aug 20, 2020
@jgrund jgrund deleted the build-targets branch August 20, 2020 23:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants