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

Harvest should collect LUNs in Qtrees #2500

Closed
cgrinds opened this issue Nov 21, 2023 · 1 comment · Fixed by #2502
Closed

Harvest should collect LUNs in Qtrees #2500

cgrinds opened this issue Nov 21, 2023 · 1 comment · Fixed by #2502
Assignees
Labels

Comments

@cgrinds
Copy link
Collaborator

cgrinds commented Nov 21, 2023

Thanks to ben on Discord for raising.

There can be multiple luns in the same qtree.

@cgrinds cgrinds added bug Something isn't working customer 24.02 labels Nov 21, 2023
@cgrinds cgrinds self-assigned this Nov 21, 2023
cgrinds added a commit that referenced this issue Nov 21, 2023
cgrinds added a commit that referenced this issue Nov 21, 2023
cgrinds added a commit that referenced this issue Nov 21, 2023
cgrinds added a commit that referenced this issue Nov 21, 2023
cgrinds added a commit that referenced this issue Nov 27, 2023
cgrinds added a commit that referenced this issue Nov 28, 2023
cgrinds added a commit that referenced this issue Nov 28, 2023
* fix: Harvest should collect luns in qtress

Fixes: #2500
@Hardikl Hardikl self-assigned this Feb 13, 2024
@Hardikl
Copy link
Contributor

Hardikl commented Feb 13, 2024

Tested in main with commit febb62c

validated this lun naming convention

<root>
<attributes-list>
<lun-info><node>umeng-aff300-02</node><online>true</online><path>/vol/osc_iscsi_vol01/lun:d32abf06-0327-4d06-bb9d-1c19c8eeea01</path><qtree></qtree><size>2147483648</size><size-used>68349952</size-used><state>online</state><uuid>98ba5831-06a3-44cb-ac9b-b9cc631cf850</uuid><volume>osc_iscsi_vol01</volume><vserver>ostack-iscsi-dnd</vserver></lun-info>
<lun-info><node>umeng-aff300-01</node><online>true</online><path>/vol/osc_iscsi_vol01/qtree1/lun:1c19c8ee-0327-4d06-bb9d-d32abf069081</path><qtree>qtree1</qtree><size>1073741824</size><size-used>0</size-used><state>online</state><uuid>be36e895-f62f-48e8-940f-c8deb98c877f</uuid><volume>osc_iscsi_vol01</volume><vserver>ostack-iscsi-dnd</vserver></lun-info>
</attributes-list>
</root>

Harvest can able to parse those 2 lun path formats

harvest % curl -s http://localhost:14001/metrics | grep -Ev "#|metadata_"
lun_labels{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:d32abf06-0327-4d06-bb9d-1c19c8eeea01",node="umeng-aff300-02",qtree="",state="online",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 1.0
lun_new_status{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:d32abf06-0327-4d06-bb9d-1c19c8eeea01",node="umeng-aff300-02",qtree="",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 1
lun_size{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:d32abf06-0327-4d06-bb9d-1c19c8eeea01",node="umeng-aff300-02",qtree="",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 2147483648
lun_size_used{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:d32abf06-0327-4d06-bb9d-1c19c8eeea01",node="umeng-aff300-02",qtree="",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 68349952
lun_size_used_percent{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:d32abf06-0327-4d06-bb9d-1c19c8eeea01",node="umeng-aff300-02",qtree="",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 3.1827926635742188
lun_labels{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:1c19c8ee-0327-4d06-bb9d-d32abf069081",node="umeng-aff300-01",qtree="qtree1",state="online",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 1.0
lun_size{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:1c19c8ee-0327-4d06-bb9d-d32abf069081",node="umeng-aff300-01",qtree="qtree1",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 1073741824
lun_size_used{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:1c19c8ee-0327-4d06-bb9d-d32abf069081",node="umeng-aff300-01",qtree="qtree1",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 0
lun_size_used_percent{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:1c19c8ee-0327-4d06-bb9d-d32abf069081",node="umeng-aff300-01",qtree="qtree1",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 0
lun_new_status{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:1c19c8ee-0327-4d06-bb9d-d32abf069081",node="umeng-aff300-01",qtree="qtree1",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 1

harvest % curl -s http://localhost:14001/metrics | grep -Ev "#|metadata_" | grep lun_label
lun_labels{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:d32abf06-0327-4d06-bb9d-1c19c8eeea01",node="umeng-aff300-02",qtree="",state="online",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 1.0
lun_labels{cluster="umeng-aff300-01-02",datacenter="rest",lun="lun:1c19c8ee-0327-4d06-bb9d-d32abf069081",node="umeng-aff300-01",qtree="qtree1",state="online",svm="ostack-iscsi-dnd",volume="osc_iscsi_vol01"} 1.0

harvest % 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants