Skip to content

Commit 4cda202

Browse files
committed
Merge branch 'pevans-merge' of github.com:pauljevans/pcp into pauljevans-pevans-merge
2 parents 1e58594 + dd45dbe commit 4cda202

12 files changed

Lines changed: 580 additions & 8 deletions

File tree

qa/657

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ root=$tmp.root
2525
export DM_SETUP_CACHE="cat $root/dmcache-caches"
2626
export DM_SETUP_THINPOOL="cat $root/dmthin-pool"
2727
export DM_SETUP_THIN="cat $root/dmthin-thin"
28+
export DM_SETUP_CRYPT="cat $root/dmsetup-crypt"
29+
export DM_SETUP_CRYPTSETUP="cat $root/cryptsetup-status"
2830

2931
# don't want Install to possibly restart pmcd via systemctl, as this
3032
# will clobber the environment, ...
@@ -118,6 +120,18 @@ echo 'zz_cache: 0 1677721600 cache 8 10162/262144 128 39839/3276800 1087840 8217
118120
echo 'yy_pool: 0 409600 thin-pool 0 13/65536 0/3200 - rw no_discard_passdown queue_if_no_space' > $root/dmthin-pool
119121
echo 'vg_1-lv3: 0 8388608 thin 7000704 8388607
120122
vg_1-lv2: 0 8388608 thin 6832768 8388607' > $root/dmthin-thin
123+
echo 'luks-4456fe89-d09e-416f-8721-bedb66abda85: 0 996853760 crypt' > $root/dmsetup-crypt
124+
echo '/dev/mapper/luks-4456fe89-d09e-416f-8721-bedb66abda85 is disabled and is not in use.
125+
type: LUKS2
126+
cipher: aes-xts-plain64
127+
keysize: 512 [bits]
128+
key location: keyring
129+
device: /dev/nvme0n1p3
130+
sector size: 512 [bytes]
131+
offset: 32768 [512-byte units] (16777216 [bytes])
132+
size: 996853760 [512-byte units] (510389125120 [bytes])
133+
mode: read/write
134+
flags: discards' > $root/cryptsetup-status
121135
cd $here
122136

123137
echo
@@ -137,6 +151,10 @@ echo
137151
echo "=== Check dm-thin metrics for thin vol metrics ==="
138152
pminfo -dfmtT dmthin.vol
139153

154+
echo
155+
echo "=== Check dm-crypt metrics for crypt metrics ==="
156+
pminfo -dfmtT dmcrypt
157+
140158
# cleanup
141159
_remove_pmda
142160

qa/657.out

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Updating the PMCD control file, and notifying PMCD ...
1010
Check dmcache metrics have appeared ... 16 metrics and X values
1111
Check dmthin metrics have appeared ... 13 metrics and X values
1212
Check dmstats metrics have appeared ... 15 metrics and X values
13+
Check dmcrypt metrics have appeared ... 13 metrics and X values
1314

1415
=== Check dm-cache metrics ===
1516

@@ -228,3 +229,96 @@ Help:
228229
The highest mapped sector of the thin volume.
229230
inst [0 or "vg_1-lv3"] value 8388607
230231
inst [1 or "vg_1-lv2"] value 8388607
232+
233+
=== Check dm-crypt metrics for crypt metrics ===
234+
235+
dmcrypt.active PMID: 129.6.0 [Whether the crypt device is active]
236+
Data Type: 32-bit unsigned int InDom: 129.6 0x20400006
237+
Semantics: instant Units: none
238+
Help:
239+
Whether the crypt device is active
240+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value 0
241+
242+
dmcrypt.type PMID: 129.6.1 [Crypt device type]
243+
Data Type: string InDom: 129.6 0x20400006
244+
Semantics: instant Units: none
245+
Help:
246+
Crypt device type
247+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value "LUKS2"
248+
249+
dmcrypt.cipher PMID: 129.6.2 [Cipher used for the crypt device]
250+
Data Type: string InDom: 129.6 0x20400006
251+
Semantics: instant Units: none
252+
Help:
253+
Cipher used for the crypt device
254+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value "aes-xts-plain64"
255+
256+
dmcrypt.keysize PMID: 129.6.3 [Keysize for the crypt device]
257+
Data Type: 32-bit unsigned int InDom: 129.6 0x20400006
258+
Semantics: instant Units: none
259+
Help:
260+
Keysize for the crypt device
261+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value 512
262+
263+
dmcrypt.key_location PMID: 129.6.4 [Decryption key location for the crypt device]
264+
Data Type: string InDom: 129.6 0x20400006
265+
Semantics: instant Units: none
266+
Help:
267+
Decryption key location for the crypt device
268+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value "keyring"
269+
270+
dmcrypt.device PMID: 129.6.5 [The crypt device]
271+
Data Type: string InDom: 129.6 0x20400006
272+
Semantics: instant Units: none
273+
Help:
274+
The crypt device
275+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value "/dev/nvme0n1p3"
276+
277+
dmcrypt.sector_size PMID: 129.6.6 [Sector size for the crypt device]
278+
Data Type: 32-bit unsigned int InDom: 129.6 0x20400006
279+
Semantics: instant Units: none
280+
Help:
281+
Sector size for the crypt device
282+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value 512
283+
284+
dmcrypt.offset PMID: 129.6.7 [Offset for the crypt device]
285+
Data Type: 64-bit unsigned int InDom: 129.6 0x20400006
286+
Semantics: instant Units: none
287+
Help:
288+
Offset for the crypt device
289+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value 32768
290+
291+
dmcrypt.offset_bytes PMID: 129.6.8 [Offset in bytes for the crypt device]
292+
Data Type: 64-bit unsigned int InDom: 129.6 0x20400006
293+
Semantics: instant Units: none
294+
Help:
295+
Offset in bytes for the crypt device
296+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value 16777216
297+
298+
dmcrypt.size PMID: 129.6.9 [Crypt device size]
299+
Data Type: 64-bit unsigned int InDom: 129.6 0x20400006
300+
Semantics: instant Units: none
301+
Help:
302+
Crypt device size
303+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value 996853760
304+
305+
dmcrypt.size_bytes PMID: 129.6.10 [Crypt device size in bytes]
306+
Data Type: 64-bit unsigned int InDom: 129.6 0x20400006
307+
Semantics: instant Units: none
308+
Help:
309+
Crypt device size in bytes
310+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value 510389125120
311+
312+
dmcrypt.mode PMID: 129.6.11 [Current mode for the crypt device]
313+
Data Type: string InDom: 129.6 0x20400006
314+
Semantics: instant Units: none
315+
Help:
316+
Current mode for the crypt device
317+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value "read/write"
318+
319+
dmcrypt.flags PMID: 129.6.12 [Flags for the crypt device]
320+
Data Type: string InDom: 129.6 0x20400006
321+
Semantics: instant Units: none
322+
Help:
323+
Flags for the crypt device
324+
inst [0 or "luks-4456fe89-d09e-416f-8721-bedb66abda85"] value "discards"

src/pmdas/dm/GNUmakefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015-2021 Red Hat.
2+
# Copyright (c) 2015-2025 Red Hat.
33
#
44
# This program is free software; you can redistribute it and/or modify it
55
# under the terms of the GNU General Public License as published by the
@@ -17,7 +17,7 @@ include $(TOPDIR)/src/include/builddefs
1717

1818
IAM = dm
1919
DOMAIN = DM
20-
PMNSFILES = pmns.dmcache pmns.dmthin pmns.dmstats pmns.vdo
20+
PMNSFILES = pmns.dmcache pmns.dmthin pmns.dmstats pmns.vdo pmns.dmcrypt
2121
CMDTARGET = pmda$(IAM)
2222
LIBTARGET = pmda_$(IAM).$(DSOSUFFIX)
2323
PMDAINIT = $(IAM)_init
@@ -26,8 +26,8 @@ PMDAADMDIR = $(PCP_PMDASADM_DIR)/$(IAM)
2626
PMIEDIR = $(PCP_SYSCONF_DIR)/pmieconf/$(IAM)
2727
PMIEVARDIR = $(PCP_VAR_DIR)/config/pmieconf/$(IAM)
2828

29-
CFILES = pmda.c dmthin.c dmcache.c vdo.c
30-
HFILES = indom.h dmthin.h dmcache.h dmstats.h vdo.h
29+
CFILES = pmda.c dmthin.c dmcache.c vdo.c dmcrypt.c
30+
HFILES = indom.h dmthin.h dmcache.h dmstats.h vdo.h dmcrypt.h
3131
LLDLIBS = $(PCP_PMDALIB)
3232
LCFLAGS = $(INVISIBILITY)
3333

@@ -79,11 +79,12 @@ domain.h: ../../pmns/stdpmid
7979
$(DOMAIN_MAKERULE)
8080

8181
$(OBJECTS): domain.h
82-
pmda.o dmcache.o dmthin.o dm.o vdo.o: indom.h
82+
pmda.o dmcache.o dmthin.o dm.o vdo.o dmcrypt.o: indom.h
8383
pmda.o dmcache.o: dmcache.h
8484
pmda.o dmthin.o: dmthin.h
8585
ifeq "$(HAVE_DEVMAPPER)" "true"
8686
pmda.o dmstats.o: dmstats.h
87+
pmda.o dmcrypt.o: dmcrypt.h
8788
endif
8889
pmda.o vdo.o: vdo.h
8990

src/pmdas/dm/Install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
. $PCP_SHARE_DIR/lib/pmdaproc.sh
2020

2121
iam=dm
22-
pmns_name="dmcache dmthin dmstats vdo"
22+
pmns_name="dmcache dmthin dmstats vdo dmcrypt"
2323

2424
which dmsetup >/dev/null 2>&1
2525
if [ $? -ne 0 ]

src/pmdas/dm/Remove

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
. $PCP_SHARE_DIR/lib/pmdaproc.sh
2020

2121
iam=dm
22-
pmns_name="dmcache dmthin dmstats vdo"
22+
pmns_name="dmcache dmthin dmstats vdo dmcrypt"
2323
pmdaSetup
2424
pmdaRemove
2525
exit

0 commit comments

Comments
 (0)