Skip to content

Conversation

@smitterl
Copy link
Contributor

No description provided.

Our devices have been 'disappearing' that is, ending up in unusable
state. This might be a timing issue due to delayed CRW.
Add a 1 second absolute wait to double check.

Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
After the introduced sleep, log the device listing with lscss.

Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@smitterl
Copy link
Contributor Author

smitterl commented Dec 16, 2025

With this the full.log can be filtered with cat /var/log/avocado/job-results/latest/full.log|sed -e 's;:;|;g'|cut -d"|" -f 1,5|grep -B2 -A8 CRW to contain the command that was executed and the logged device state, e.g.

01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| [stdout] ECKD DASD 0.0.401c already configured
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| Command 'chzdev -e 0.0.401c' finished with 0 after 0.009293203s
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| Sleep for 1 sec accounting for delayed CRW.
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| Running 'lscss -t 3390'
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| [stdout] Device   Subchan.  DevType CU Type Use  PIM PAM POM  CHPIDs           
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| [stdout] ----------------------------------------------------------------------
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| [stdout] 0.0.401c 0.0.0028  3390/0c 3990/ec yes  f0  f0  ff   01020506 00000000
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| [stdout] 0.0.401d 0.0.0029  3390/0c 3990/ec yes  f0  f0  ff   01020506 00000000
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| [stdout] 0.0.401e 0.0.002a  3390/0c 3990/ec yes  f0  f0  ff   01020506 00000000
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| [stdout] 0.0.401f 0.0.002b  3390/0c 3990/ec yes  f0  f0  ff   01020506 00000000
01-type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table| Command 'lscss -t 3390' finished with 0 after 0.002021307s
--
02-type_specific.io-github-autotest-libvirt.libvirt_ccw_passthrough.read_write.coldplug_unplug.happy_path| Running 'driverctl -b css set-override 0.0.0028 vfio_ccw'
02-type_specific.io-github-autotest-libvirt.libvirt_ccw_passthrough.read_write.coldplug_unplug.happy_path| Command 'driverctl -b css set-override 0.0.0028 vfio_ccw' finished with 0 after 0.193659783s

we've been logging after changing but it's cumbersome to confirm the
previous test finished in the desired state; so let's log before, too,
to see if this makes it easier.

Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
Previously, the code relied on an error message to decide if a device
was online already and if so, not set it offline during teardown.

However, this message wasn't shown always; possibly because of https://issues.redhat.com/browse/RHEL-90213

Instead, use the lszdev tool to detect if the device is already online.

Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
@smitterl
Copy link
Contributor Author

virtual_disk change tested with

a. devid = dasd and no online disk

JOB ID     : f5fb63f4a9bc220e1e7260c8129d51a86a29aefb
JOB LOG    : /var/log/avocado/job-results/job-2025-12-18T03.39-f5fb63f/job.log
 (1/1) type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table: STARTED
 (1/1) type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table:  ERROR: 'NoneType' object is not subscriptable (21.25 s)
RESULTS    : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/log/avocado/job-results/job-2025-12-18T03.39-f5fb63f/results.html
JOB TIME   : 22.30 s

b. devid = dasd and some online disk - confirm disk is not disabled

JOB ID     : c2d78258e54d9f254b53375df83a59f20fff3d58                                                                                                                                      
JOB LOG    : /var/log/avocado/job-results/job-2025-12-18T03.38-c2d7825/job.log                                                                                                             
 (1/1) type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table: STARTED                                                                                    
t (1/1) type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table:  PASS (21.25 s)                                                                           
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0                                                                                                          
JOB HTML   : /var/log/avocado/job-results/job-2025-12-18T03.38-c2d7825/results.html                                                                                                        
JOB TIME   : 22.20 s 

c. devid = and dev at not online; confirm not online after execution

JOB ID     : 56f965ff9f4ffc5042b23c58205c9d0572a656ab
JOB LOG    : /var/log/avocado/job-results/job-2025-12-18T03.40-56f965f/job.log
 (1/1) type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table: STARTED
 (1/1) type_specific.io-github-autotest-libvirt.virtual_disks.dasd.read_native_partition_table:  PASS (20.20 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/log/avocado/job-results/job-2025-12-18T03.40-56f965f/results.html
JOB TIME   : 21.36 s

With 1 seconds the observed behavior still reproduces; try with 2.

Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant