{"action":"closed","issue":{"url":"https://api.github.com/repos/whamcloud/device-scanner/issues/235","repository_url":"https://api.github.com/repos/whamcloud/device-scanner","labels_url":"https://api.github.com/repos/whamcloud/device-scanner/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/whamcloud/device-scanner/issues/235/comments","events_url":"https://api.github.com/repos/whamcloud/device-scanner/issues/235/events","html_url":"https://github.com/whamcloud/device-scanner/issues/235","id":367457016,"node_id":"MDU6SXNzdWUzNjc0NTcwMTY=","number":235,"title":"Fully resolve device graph","user":{"login":"jgrund","id":458717,"node_id":"MDQ6VXNlcjQ1ODcxNw==","avatar_url":"https://avatars0.githubusercontent.com/u/458717?v=4","gravatar_id":"","url":"https://api.github.com/users/jgrund","html_url":"https://github.com/jgrund","followers_url":"https://api.github.com/users/jgrund/followers","following_url":"https://api.github.com/users/jgrund/following{/other_user}","gists_url":"https://api.github.com/users/jgrund/gists{/gist_id}","starred_url":"https://api.github.com/users/jgrund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgrund/subscriptions","organizations_url":"https://api.github.com/users/jgrund/orgs","repos_url":"https://api.github.com/users/jgrund/repos","events_url":"https://api.github.com/users/jgrund/events{/privacy}","received_events_url":"https://api.github.com/users/jgrund/received_events","type":"User","site_admin":false},"labels":[{"id":594273631,"node_id":"MDU6TGFiZWw1OTQyNzM2MzE=","url":"https://api.github.com/repos/whamcloud/device-scanner/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"jgrund","id":458717,"node_id":"MDQ6VXNlcjQ1ODcxNw==","avatar_url":"https://avatars0.githubusercontent.com/u/458717?v=4","gravatar_id":"","url":"https://api.github.com/users/jgrund","html_url":"https://github.com/jgrund","followers_url":"https://api.github.com/users/jgrund/followers","following_url":"https://api.github.com/users/jgrund/following{/other_user}","gists_url":"https://api.github.com/users/jgrund/gists{/gist_id}","starred_url":"https://api.github.com/users/jgrund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgrund/subscriptions","organizations_url":"https://api.github.com/users/jgrund/orgs","repos_url":"https://api.github.com/users/jgrund/repos","events_url":"https://api.github.com/users/jgrund/events{/privacy}","received_events_url":"https://api.github.com/users/jgrund/received_events","type":"User","site_admin":false},"assignees":[{"login":"jgrund","id":458717,"node_id":"MDQ6VXNlcjQ1ODcxNw==","avatar_url":"https://avatars0.githubusercontent.com/u/458717?v=4","gravatar_id":"","url":"https://api.github.com/users/jgrund","html_url":"https://github.com/jgrund","followers_url":"https://api.github.com/users/jgrund/followers","following_url":"https://api.github.com/users/jgrund/following{/other_user}","gists_url":"https://api.github.com/users/jgrund/gists{/gist_id}","starred_url":"https://api.github.com/users/jgrund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgrund/subscriptions","organizations_url":"https://api.github.com/users/jgrund/orgs","repos_url":"https://api.github.com/users/jgrund/repos","events_url":"https://api.github.com/users/jgrund/events{/privacy}","received_events_url":"https://api.github.com/users/jgrund/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-10-06T13:27:12Z","updated_at":"2018-11-14T17:02:09Z","closed_at":"2018-11-14T17:02:09Z","author_association":"MEMBER","body":"Right now device graph resolution is spread across multiple layers.\r\n\r\n- device-scanner outputs somewhat raw list of uevents, pools, datasets and mounts\r\n- device-aggregator massages into vgs, lvs, mds, mpath, pools, datasets, and block-devices. It also performs a first pass that combines pools shared on different hosts.\r\n- device-aggregator output feeds into linux.py which creates concrete device types and persists them to the database (`ScsiDevice`, `UnsharedDevice`, `LinuxDeviceNode`, `Partition`, `MdRaid`, `ZfsPool`, `ZfsDataset`, `ZfsPartition`, `LocalMount`, `LvmGroup`, `LvmVolume`) and sets up parent linkage.\r\n- resource_manager.py creates `Volumes` and `VolumeNodes` based on underlying devices.\r\n\r\nIn addition, the layers underneath device-aggregator operate under a poll-based model, but it doesn't need to as everything up to device-aggregator is push based.\r\n\r\nDue to these many moving layers, there have been some tricky to diagnose and resolve issues that appear in the existing poll based layers (devices not updating as expected).\r\n\r\nInstead of continuing to hunt down sequencing and persistence issues in these layers, the best path forward is to fully realize the device graph as early as possible.\r\n\r\nThe layers can then look like:\r\n\r\n- device-scanner outputs a graph of concrete device types (`ScsiDevice`, `LinuxDeviceNode`, `Partition`, `MdRaid`, `ZfsPool`, `ZfsDataset`, `ZfsPartition`, `LvmGroup`, `LvmVolume`) all descendants of some form of a `Root` struct. It also resolves if any of these devices are currently mounted, their mount point, and the mounted fs type.\r\n- device-aggregator merges these graphs under a `Cluster` struct, and inserts `ZfsPool` and `LvmGroup` to other host graphs if all their backing devices are present in that graph.\r\n- linux.py and resource_manager.py will not need to be used directly, but they will need to stay around to account for upgrade scenarios where only some agents have been upgraded.\r\n\r\nFurther simplifications and enhancements can then flow from this:\r\n\r\n- Discovering existing filesystems can be derived by traversing the graph for selected hosts that contain Lustre mounts.\r\n- Cluster wide device graphs can be easily visualized using both d3 (https://www.jasondavies.com/collatz-graph/), and in a tabular drill-down format.\r\n- near-realtime alerts of persistent storage going offline can be generated.\r\n"}}
{"actor":{"display_login":"jgrund"}}