Commit Graph

14 Commits

Author SHA1 Message Date
riya-singhal31
44612fe34c ci: fix shell check failures
Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
2023-04-20 15:24:35 +00:00
Madhu Rajanna
697ba8b515 ci: fix pylint error
fixed string format pylint error
show in the CI.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-05-30 06:54:21 +00:00
Niels de Vos
8447a1feab cleanup: address pylint "consider-using-with" in tracevol.py
pylint started to report errors like the following:

    troubleshooting/tools/tracevol.py:97:10: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)

There probably has been an update of Pylint in the test-container that
is more strict than previous versions.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-08-19 09:06:17 +00:00
Santiago Sanchez Paz
6ece9bed92 util: Fix tracevol to use --config for oc only
tracevol.py uses --config instead of --kubeconfig when invoked with
-c kubectl and -k <some_path> at the same time.

Signed-off-by: Santiago Sanchez Paz <sanchezpaz@gmail.com>
2020-08-25 10:04:19 +00:00
Mudit Agarwal
1eff20590d util: restructure tracevol.py function to get_subvol_group()
get_subvol_group() returns empty string if subvolumeGroup is not defined,
changed it to return "csi" as default subvolumeGroup.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-08-03 07:14:02 +00:00
Mudit Agarwal
5fa1be586a cephfs: fix tracevol.py to work with dynamic value of fsname
tracevol.py takes 'myfs' as default fsname, changed it so that it can work with
dynamic values of fsname.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-08-03 07:14:02 +00:00
Mudit Agarwal
6814f598ce util: fix tracevol.py to manage config map created by Rook
If the config map is created by rook then there won't be any provision to
specify subvolumeGroup, tracevol.py should skip looking for subvolumeGroup
in such case.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-08-03 07:14:02 +00:00
Mudit Agarwal
3585b21e80 util: fix tracevol.py to take config map namespace as an option
Added a new option so that user can specify the namespace for config map.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-08-03 07:14:02 +00:00
Mudit Agarwal
b2c9c589aa util: fix tracevol.py to use namespace argument
tracevol.py accepts namespace argument but doesn't use it currently, fixing the same.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-08-03 07:14:02 +00:00
Mudit Agarwal
953cfa508a util: fix tracevol.py to work with volumeNamePrefix in storageclass
tarcevol.py works with a fixed volume name prefix "csi-vol-", this could be changed by the storageclass
and hence tracevol.py should work with the dynamic value rather than the static.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-07-08 14:33:15 +00:00
Mudit Agarwal
2ef5729a28 cleanup: restructure a part of existing code
Have restructered a part of existing code so that it would be useful to get pvdata

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-07-08 14:33:15 +00:00
Mudit Agarwal
e9082768b6 cephfs: enhance tracevol.py script to work with cephfs
tracevol.py script traces a RBD PVC to its RADOS map, key and image.
The script is enhanced to provide the same functionality for cephfs now.

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-06-19 05:48:27 +00:00
Mudit Agarwal
78963737d3 rbd: fix tracevol.py script to work with python 3.x
tracevol.py script traces a RBD PVC to its RADOS map, key and image.
It needs minor fixup in order to work with python 3.x

Signed-off-by: Mudit Agarwal <muagarwa@redhat.com>
2020-06-19 05:48:27 +00:00
Madhu Rajanna
025aec3dd3 Trace backend volume from pvc
logs
```
+----------+------------------------------------------+----------------------------------------------+-----------------+------------------+------------------+
| PVC Name |                 PV Name                  |                  Image Name                  | PV name in omap | Image ID in omap | Image in cluster |
+----------+------------------------------------------+----------------------------------------------+-----------------+------------------+------------------+
| rbd-pvc  | pvc-f1a501dd-03f6-45c9-89f4-85eed7a13ef2 | csi-vol-1b00f5f8-b1c1-11e9-8421-9243c1f659f0 |       True      |       True       |      False       |
| rbd-pvcq | pvc-09a8bceb-0f60-4036-85b9-dc89912ae372 | csi-vol-b781b9b1-b1c5-11e9-8421-9243c1f659f0 |       True      |       True       |       True       |
+----------+------------------------------------------+----------------------------------------------+-----------------+------------------+------------------+
```

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2019-08-26 14:42:12 +00:00