Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TA4346] feat: Adding some more stats using OpenSeaChest library. #185

merged 3 commits into from Dec 7, 2018


None yet
6 participants
Copy link

satbirchhikara commented Dec 6, 2018

This PR is to add more information in Disk-CR using newly integrated OpenSeaChest library.
Red colored fields are newly added:-

satbir@node-disk-manager:$ kubectl describe disk disk-2cd7034c2b3329392ae07eb83bd15fad
Name:         disk-2cd7034c2b3329392ae07eb83bd15fad
Annotations:  <none>
API Version:
Kind:         Disk
  Cluster Name:        
  Creation Timestamp:  2018-11-27T09:46:34Z
  Generation:          1
  Resource Version:    841260
  Self Link:           /apis/
  UID:                 53b9c334-f229-11e8-b598-42010a8000c4
    Physical Sector Size:  4096   <<<Newly added
    Logical Sector Size:   512
    Storage:               10737418240
    Disk Type:          disk
    Rotation Rate:      0             <<<Newly added
    Compliance:         SPC-4
    Firmware Revision:  1   
    Model:              PersistentDisk
    Serial:             satbir-ndm-disk-2
    Vendor:             Google
    Kind:  by-id
    Kind:  by-path
  Path:  /dev/sdc
Stats:  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Newly added
  Device Utilization Rate:  0
  Disk Temperature:
    Current Temperature:   0
    Highest Temperature:   0
    Lowest Temperature:    0
  Percent Endurance Used:  0
  Total Bytes Read:        0
  Total Bytes Written:     0
  State:  Active
Events:   <none> 

@satbirchhikara satbirchhikara requested review from kmova, gila, sagarkrsd and imazik Dec 6, 2018

Copy link

gila left a comment

I feel you deserve a Gopher for your first Go bits @satbirchhikara 👍


This comment has been minimized.

Copy link

codecov-io commented Dec 6, 2018

Codecov Report

Merging #185 into master will decrease coverage by 3.15%.
The diff coverage is 9.83%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #185      +/-   ##
- Coverage   54.31%   51.16%   -3.16%     
  Files          42       43       +1     
  Lines        1598     1720     +122     
+ Hits          868      880      +12     
- Misses        668      777     +109     
- Partials       62       63       +1
Impacted Files Coverage Δ
cmd/probe/smartprobe.go 37.83% <ø> (ø) ⬆️
cmd/probe/probe.go 100% <ø> (ø) ⬆️
cmd/controller/sparsefilegenerator.go 65.85% <ø> (ø) ⬆️
cmd/probe/capacityprobe.go 20.45% <ø> (ø) ⬆️
cmd/probe/seachestprobe.go 0% <0%> (ø)
cmd/probe/udevprobe.go 62.38% <100%> (+0.34%) ⬆️
cmd/controller/disk.go 94.8% <73.33%> (-5.2%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3bbd9f6...36ea480. Read the comment docs.

return 0

func (I *Identifier) IsRotational(driveInfo *C.driveInformationSAS_SATA) string {

This comment has been minimized.

Copy link

richardelling Dec 6, 2018


you're getting closer, I think this should return a boolean. Given the way we often see this in the field, I think we can safely say:

if driveInfo.rotationRate > 1 {
  return True
return false

This comment has been minimized.

Copy link

satbirchhikara Dec 7, 2018

Author Collaborator

Since we are filling drive type "SSD" or "HDD", I renamed function to driveType. This is something inline with OpenSeaChest Utility. They classify deive exactly the way we are doing here.

@@ -34,7 +34,7 @@ type smartProbe struct {

const (
smartConfigKey = "smart-probe"
smartProbePriority = 2
smartProbePriority = 3

This comment has been minimized.

Copy link

vishnuitta Dec 7, 2018


should we have similar change for udevProbePriority as well from 1 to 2?

This comment has been minimized.

Copy link

vishnuitta Dec 7, 2018


ok.. seaChestProbePriority is set to 2.. so, udevProbePriority should be fine then

satbirchhikara added some commits Dec 7, 2018

Fixing autogen update script.
Signed-off-by: satbir <>
Autogen code for SeaChest integration.
Signed-off-by: satbir <>
[TA4157]Integration of SeaChest library.
Signed-off-by: satbir <>

@satbirchhikara satbirchhikara force-pushed the satbirchhikara:morestats branch from 5c87687 to 36ea480 Dec 7, 2018

@@ -1,3 +1,4 @@
dist: xenial
language: go

This comment has been minimized.

Copy link

pawanpraka1 Dec 7, 2018


we should probably compile it in a docker. We need dapper for ndm probably in future PR.

@@ -28,6 +28,7 @@ const (

// RegisteredProbes contains register function of probes which we want to register
var RegisteredProbes = []func(){

This comment has been minimized.

Copy link

pawanpraka1 Dec 7, 2018


for better code readability please reorder this list in the priority order (next PR).

Copy link

pawanpraka1 left a comment

changes are good.

@pawanpraka1 pawanpraka1 merged commit d0bbab3 into openebs:master Dec 7, 2018

3 of 5 checks passed

codecov/patch 9.83% of diff hit (target 54.31%)
codecov/project 51.16% (-3.16%) compared to 3bbd9f6
Better Code Hub ☕ Don’t forget to refactor
DCO All commits are signed off!
continuous-integration/travis-ci/pr The Travis CI build passed

@satbirchhikara satbirchhikara deleted the satbirchhikara:morestats branch Dec 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.