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

Ingest lnet data from storage servers into management db #2362

Merged
merged 28 commits into from
Nov 19, 2020

Conversation

johnsonw
Copy link
Contributor

@johnsonw johnsonw commented Nov 3, 2020

In addition to collecting network interface information we should also
collect lnet data from lnetctl net show from each storage server. This
information should then be ingested into the database on the manager
through the iml-network service.

Signed-off-by: johnsonw wjohnson@whamcloud.com


This change is Reviewable

@johnsonw johnsonw self-assigned this Nov 3, 2020
@johnsonw
Copy link
Contributor Author

johnsonw commented Nov 3, 2020

Sample output from the postgres database after ingesting lnet data from the storage servers:

chroma=> select * from lnet;
 id  |       nid       | host_id | net_type | status | interfaces
-----+-----------------+---------+----------+--------+------------
 751 | 10.73.20.22@tcp |       4 | tcp      | up     | {eth1}
 752 | 10.73.20.21@tcp |       3 | tcp      | up     | {eth1}
 753 | 10.73.20.11@tcp |       1 | tcp      | up     | {eth1}
 754 | 10.73.20.12@tcp |       2 | tcp      | up     | {eth1}

@johnsonw johnsonw marked this pull request as ready for review November 3, 2020 22:06
@johnsonw johnsonw requested review from jgrund and a team November 3, 2020 22:06
ip1981
ip1981 previously approved these changes Nov 4, 2020
@johnsonw johnsonw force-pushed the lnetctl-net-output branch 2 times, most recently from b0b8b3d to e924fc2 Compare November 4, 2020 22:31
@johnsonw
Copy link
Contributor Author

johnsonw commented Nov 5, 2020

Two tables are created and updated according to the lnet data spanning across the storage servers:

  1. lnet
  2. nid

The nid table contains all of the nid information for a particular host. There will likely be multiple entries for a single host. The lnet table on the other hand, will have a single entry for each host and contain a list of nid id's the correspond to the matching nids for the host in context.

Example output:

chroma=> select * from lnet;
 id | host_id | nids
----+---------+------
  3 |       6 | {6}
  4 |       5 | {1}
  1 |       7 | {7}
  2 |       8 | {8}
(4 rows)

chroma=> select * from nid;
 id | net_type | host_id |       nid       | status | interfaces
----+----------+---------+-----------------+--------+------------
  6 | tcp      |       6 | 10.73.20.12@tcp | up     | {eth1}
  1 | tcp      |       5 | 10.73.20.11@tcp | up     | {eth1}
  7 | tcp      |       7 | 10.73.20.21@tcp | up     | {eth1}
  8 | tcp      |       8 | 10.73.20.22@tcp | up     | {eth1}
(4 rows)

@johnsonw
Copy link
Contributor Author

johnsonw commented Nov 5, 2020

As discussed, I added state to the lnet table. Here is the new output:

chroma=> select * from lnet;
 id | host_id | state | nids
----+---------+-------+------
  4 |       4 | up    | {4}
  1 |       2 | up    | {1}
  2 |       1 | up    | {2}
  3 |       3 | up    | {3}
(4 rows)

chroma=> select * from nid;
 id | net_type | host_id |       nid       | status | interfaces
----+----------+---------+-----------------+--------+------------
  4 | tcp      |       4 | 10.73.20.22@tcp | up     | {eth1}
  1 | tcp      |       2 | 10.73.20.12@tcp | up     | {eth1}
  2 | tcp      |       1 | 10.73.20.11@tcp | up     | {eth1}
  3 | tcp      |       3 | 10.73.20.21@tcp | up     | {eth1}
(4 rows)

Base automatically changed from integrate-network-interfaces to master November 6, 2020 13:12
@jgrund jgrund dismissed ip1981’s stale review November 6, 2020 13:12

The base branch was changed.

In addition to collecting network interface information we should also
collect lnet data from `lnetctl net show` from each storage server. This
information should then be ingested into the database on the manager
through the iml-network service.

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
… would require an update to rabbit. This is also testing the ids coming back from the instert.

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: 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: johnsonw <wjohnson@whamcloud.com>
… are removed. influx stats should also be removed.

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: 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: 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: johnsonw <wjohnson@whamcloud.com>
…nd don't make the host_id unique on the lnet table.

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
…t is removed.

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
…entries) from influx associated with the removed host.

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
@jgrund jgrund requested a review from a team November 19, 2020 15:37
@jgrund jgrund merged commit b17a59c into master Nov 19, 2020
@jgrund jgrund deleted the lnetctl-net-output branch November 19, 2020 16:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants