prashanthr2 commented on PR #14861:
URL: https://github.com/apache/cloudstack/pull/14861#issuecomment-7359346669

   Verified working - both the positive and negative paths reproduced.
   
   Verified on CloudStack 4.22.1.1, packages rebuilt from patched source 
(version string unchanged at 4.22.1.1~noble). Management server and both KVM 
hosts on Ubuntu 24.04.4 LTS, kernel 6.8.0-147-generic, OpenJDK 21, MySQL 
8.0.46. Pure FA-X20R4 sv16-x20r4-b06-15, Purity//FA 6.10.6, REST API 2.23, 
FibreChannel 32/16 Gbit, provider Flash Array.
   
   
   Positive path. A healthy attached volume is still recognised as connected — 
worth checking, since multipath -ll more usually takes a WWID, and a rejected 
argument would make hasActivePath false for every device and silently force a 
rescan on every resolution:
   
   `multipath -ll '/dev/mapper/3624a937049646854b0ae410b00011b65' | grep -q 
'active ready'   →  match
   `
   The full /dev/mapper/ path is accepted.
   
   Negative path. Reproduced deterministically with a technique that may be 
useful for the test suite — hold the device open with a shell file descriptor, 
which blocks the flush exactly as an auto-activated guest volume group does, 
then remove the array-side host connection:
   
   ```
   # on the host, one shell throughout
   exec 9</dev/mapper/3624a937049646854b0ae410b00011b61
   
   # on the array
   purevol disconnect --host b08-35 "<pod>::<volume>"
   
   # ~60 s later (dev_loss_tmo), on the host
   multipath -ll '/dev/mapper/3624a937049646854b0ae410b00011b61'
     3624a937049646854b0ae410b00011b61 dm-9 ##,##
     size=5.0G features='0' hwhandler='0' wp=rw
   
   test -b /dev/mapper/3624a937049646854b0ae410b00011b61     →  passes
   multipath -ll ... | grep -q 'active ready'                →  no match
   multipath -f 3624a937049646854b0ae410b00011b61            →  "map in use", 
rc=1
   
   ```
   with no path group is the exact state that produced an empty template for us 
in November. test -b passes on it, so the old isConnected returns true and 
skips discovery.
   
   Bonus confirmation from a real operation. While that map was dead, a 
detachVolume through the API returned:
   
   Failed to detach volume ... CloudRuntimeException:
   Unable to connect to volume /dev/mapper/3624a937049646854b0ae410b00011b61
   
   That is getPhysicalDisk() correctly refusing to operate on a device with no 
live paths. On 4.22.1.1 the same operation would have proceeded silently 
against the dead device.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to