Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PR #1162 - Review Fix Validation
- 1. Local checks
- $ tox -e pep8,pylint,yamllint,hotyvalidate
- pep8: OK
- pylint: OK (10.00/10)
- yamllint: OK
- hotyvalidate: checked 222 scenarios and 449 tests, all OK!
- $ TESTS_DIR=/bak/work/hotsos/tests/unit/ HOTSOS_ROOT=/bak/work/hotsos/hotsos .tox/py3/bin/stestr run --test-path tests/unit "(test_disks|test_storage|test_cli)"
- Ran: 57 tests in 1.4032 sec.
- - Passed: 57
- - Failed: 0
- $ TESTS_DIR=/bak/work/hotsos/tests/unit/ HOTSOS_ROOT=/bak/work/hotsos/hotsos .tox/py3/bin/stestr run --test-path tests/unit
- Ran: 1030 tests in 17.4336 sec.
- - Passed: 1029
- - Skipped: 1
- - Failed: 0
- $ tox -e functional
- functional: OK (all plugins full and short passed)
- 2. Deploy to Ceph OSD node (ceph-osd/3)
- $ juju scp ~/hotsos-review-1122-20261023.tar.gz ~/hotsos-review-1122-live.py ceph-osd/3:/tmp/
- $ juju ssh ceph-osd/3 "sudo -n rm -rf /tmp/hotsos-review-1122-20261021 && mkdir -p /tmp/hotsos-review-1122-20261021 && tar -xzf /tmp/hotsos-review-1122-20261023.tar.gz -C /tmp/hotsos-review-1122-20261021 && sha256sum /tmp/hotsos-review-1122-20261021/hotsos/core/host_helpers/storage.py /tmp/hotsos-review-1122-20261021/hotsos/core/plugins/storage/disks.py"
- 27474c2a457e6e34f67c0d74070ba7f9776b2530de33fa6cd58209c07d7be6b8 /tmp/hotsos-review-1122-20261021/hotsos/core/host_helpers/storage.py
- 507f42b7be427176efbbb36727835b7cd71aed20acc7a46a39234d9a99e6704c /tmp/hotsos-review-1122-20261021/hotsos/core/plugins/storage/disks.py
- 3. Baseline (00-baseline)
- $ vgs --noheadings -o vg_name
- ceph-563d82c3-59f7-48bb-aaf0-1a8e0b2c90d9
- ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
- {
- "stage": "00-baseline",
- "disks": {
- "unallocated-volume-groups": [
- "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
- ]
- }
- }
- PASS 00-baseline
- 4. Entirely unused disk (01-bare-disk)
- $ modprobe scsi_debug dev_size_mb=512
- $ udevadm settle
- $ blockdev --getsize64 /dev/sdd
- 536870912
- $ lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,MODEL /dev/sdd
- NAME SIZE TYPE FSTYPE MOUNTPOINT MODEL
- sdd 512M disk scsi_debug
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
- {
- "stage": "01-bare-disk",
- "disks": {
- "unallocated-volume-groups": [
- "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
- ],
- "unused-disks": [
- "/dev/sdd (512M)"
- ]
- }
- }
- PASS 01-bare-disk
- 5. GPT with no partitions (02-empty-gpt)
- $ parted -s /dev/sdd mklabel gpt
- $ udevadm settle
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
- {
- "stage": "02-empty-gpt",
- "disks": {
- "unallocated-disks": [
- "/dev/sdd (512M)"
- ],
- "unallocated-volume-groups": [
- "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
- ]
- }
- }
- PASS 02-empty-gpt
- 6. Empty partition + unallocated disk space (03-empty-partition)
- $ parted -s /dev/sdd mkpart primary 1MiB 200MiB
- $ udevadm settle
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
- {
- "stage": "03-empty-partition",
- "disks": {
- "empty-partitions": [
- "/dev/sdd1 (199M)"
- ],
- "unallocated-disks": [
- "/dev/sdd (313M)"
- ],
- "unallocated-volume-groups": [
- "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
- ]
- }
- }
- PASS 03-empty-partition
- 7. Format partition (04-formatted-partial)
- $ mkfs.ext4 -F /dev/sdd1
- Creating filesystem with 50944 4k blocks and 50944 inodes
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
- {
- "stage": "04-formatted-partial",
- "disks": {
- "unallocated-disks": [
- "/dev/sdd (313M)"
- ],
- "unallocated-volume-groups": [
- "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
- ]
- }
- }
- PASS 04-formatted-partial
- 8. Allocate remaining disk space (05-fully-partitioned)
- $ parted -s /dev/sdd mkpart primary 200MiB 100%
- $ udevadm settle
- $ mkfs.ext4 -F /dev/sdd2
- Creating filesystem with 79616 4k blocks and 79632 inodes
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
- {
- "stage": "05-fully-partitioned",
- "disks": {
- "unallocated-volume-groups": [
- "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
- ]
- }
- }
- PASS 05-fully-partitioned
- 9. LVM volume group with free space (06-lvm-free)
- $ wipefs -a /dev/sdd1 /dev/sdd2
- $ parted -s /dev/sdd rm 2 rm 1
- $ wipefs -a /dev/sdd
- $ udevadm settle
- $ pvcreate /dev/sdd
- Physical volume "/dev/sdd" successfully created.
- $ vgcreate hotsos-review1122 /dev/sdd
- Volume group "hotsos-review1122" successfully created
- $ lvcreate -L 200M -n test-lv hotsos-review1122
- Logical volume "test-lv" created.
- $ vgs -v --config=global{metadata_read_only=1} --nolocking --foreign
- VG Attr Ext #PV #LV #SN VSize VFree VG UUID
- ceph-563d82c3-59f7-48bb-aaf0-1a8e0b2c90d9 wz--n- 4.00m 1 1 0 9.98g 0 Koh30S-4b0y-dTR0-0924-QvIi-HYYa-mwTi9X
- ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 wz--n- 4.00m 1 1 0 1004.00m 104.00m j7GUeq-d3MD-oWal-voA6-q949-1R03-B87XMF
- hotsos-review1122 wz--n- 4.00m 1 1 0 508.00m 308.00m eTmr2a-6E2y-0DSy-aXo9-AIcU-PkkN-bnMEJt
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
- {
- "stage": "06-lvm-free",
- "disks": {
- "unallocated-volume-groups": [
- "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)",
- "hotsos-review1122 (308M)"
- ]
- }
- }
- PASS 06-lvm-free
- 10. Allocate remaining VG space (07-lvm-allocated)
- $ lvextend -l +100%FREE /dev/hotsos-review1122/test-lv
- Size of logical volume hotsos-review1122/test-lv changed from 200.00 MiB (50 extents) to 508.00 MiB (127 extents).
- Logical volume hotsos-review1122/test-lv successfully resized.
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
- {
- "stage": "07-lvm-allocated",
- "disks": {
- "unallocated-volume-groups": [
- "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
- ]
- }
- }
- PASS 07-lvm-allocated
- 11. Cleanup and baseline verification (08-cleaned-baseline)
- $ vgremove -f hotsos-review1122
- Logical volume "test-lv" successfully removed
- Volume group "hotsos-review1122" successfully removed
- $ pvremove /dev/sdd
- Labels on physical volume "/dev/sdd" successfully wiped.
- $ udevadm settle
- $ rmmod scsi_debug
- $ test ! -e /sys/module/scsi_debug && test ! -e /dev/sdd
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json
- {
- "stage": "08-cleaned-baseline",
- "disks": {
- "unallocated-volume-groups": [
- "ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)"
- ]
- }
- }
- PASS 08-cleaned-baseline
- 12. Live vgs-only data-root check (no lsblk data)
- $ mkdir -p /tmp/vgs-only-root/sos_commands/lvm2 /tmp/vgs-only-root/sos_commands/date
- $ date > /tmp/vgs-only-root/sos_commands/date/date
- $ cp /proc/uptime /tmp/vgs-only-root/uptime
- $ vgs -v --config=global{metadata_read_only=1} --nolocking --foreign > /tmp/vgs-only-root/sos_commands/lvm2/vgs_-v_-o_vg_mda_count_vg_mda_free_vg_mda_size_vg_mda_used_count_vg_tags_systemid_--config_global_metadata_read_only_1_--nolocking_--foreign 2>&1
- $ PYTHONPATH=/tmp/hotsos-review-1122-20261021 /usr/bin/python3 /tmp/hotsos-review-1122-20261021/hotsos/cli.py --storage --format json /tmp/vgs-only-root | tail -n +2 | python3 -c 'import json,sys; print("VGS_ONLY_DISKS:", json.load(sys.stdin)["storage"].get("disks"))'
- VGS_ONLY_DISKS: {'unallocated-volume-groups': ['ceph-db-c05d0c98-4b50-423b-a7c2-b1ae69bb6216 (104M)']}
- $ rm -rf /tmp/vgs-only-root
- 13. Post-test cluster health
- $ juju status ceph-osd
- Unit Workload Agent Machine Public address Ports Message
- ceph-osd/3* active idle 22 10.149.144.41 Unit is ready (1 OSD)
- ceph-osd/4 active idle 23 10.149.144.12 Unit is ready (1 OSD)
- ceph-osd/5 active idle 24 10.149.144.16 Unit is ready (1 OSD)
- $ juju ssh ceph-mon/0 "sudo -n ceph -s"
- services:
- mon: 1 daemons, quorum juju-b45c2d-ceph-0 (age 8w)
- mgr: juju-b45c2d-ceph-0(active, since 8w)
- osd: 3 osds: 3 up (since 3d), 3 in (since 6w)
- data:
- pools: 4 pools, 69 pgs
- objects: 97 objects, 618 MiB
- usage: 5.0 GiB used, 28 GiB / 33 GiB avail
- pgs: 69 active+clean
Advertisement
Add Comment
Please, Sign In to add comment