Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISO SR is confused by unreadable files #5643

Open
ydirson opened this issue May 21, 2024 · 0 comments
Open

ISO SR is confused by unreadable files #5643

ydirson opened this issue May 21, 2024 · 0 comments

Comments

@ydirson
Copy link
Contributor

ydirson commented May 21, 2024

When a file is created on an ISO SR with no read access, the file is discovered by SR scan and a VDI is created, but on attempts to use it the user faces a non-obvious diagnostic, as shown below. Let the SR just warn and skip it instead would likely be a better behavior?

  • commands like a xe vm-start for a VM with that ISO inserted fail with Error code: SR_BACKEND_FAILURE_1200 Error parameters: , No such Tapdisk(minor=1)
  • we can see in SMlog:
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322] ['/usr/sbin/tap-ctl', 'attach', '-p', '6335', '-m', '1']
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]  = 0
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322] ['/usr/sbin/tap-ctl', 'open', '-p', '6335', '-m', '1', '-a', 'aio:/var/run/sr-mount/364d8fbc-f587-52e6-8499-382c4d3bdbc8/tmpdi2m5lzx.iso', '-R']
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]  = 13
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322] ['/usr/sbin/tap-ctl', 'close', '-p', '6335', '-m', '1', '-t', '120']
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]  = 0
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322] ['/usr/sbin/tap-ctl', 'detach', '-p', '6335', '-m', '1']
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]  = 0
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322] ['/usr/sbin/tap-ctl', 'free', '-m', '1']
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]  = 0
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322] ***** generic exception: vdi_attach: EXCEPTION <class 'blktap2.TapdiskNotRunning'>, No such Tapdisk(minor=1)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/SRCommand.py", line 111, in run
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     return self._run_locked(sr)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/SRCommand.py", line 161, in _run_locked
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     rv = self._run(sr, target)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/SRCommand.py", line 253, in _run
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     writable, caching_params=caching_params)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 1567, in attach
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     {"rdonly": not writable})
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 1730, in _activate
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     self._get_pool_config(sr_uuid).get("mem-pool-size"))
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 1351, in _tap_activate
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     options)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 842, in launch_on_tap
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     tapdisk = cls.__from_blktap(blktap)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 737, in __from_blktap
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     tapdisk = cls.from_minor(minor=blktap.minor)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 733, in from_minor
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     return cls.get(minor=minor)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 723, in get
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     raise TapdiskNotRunning( ** attrs)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322] ***** ISO: EXCEPTION <class 'blktap2.TapdiskNotRunning'>, No such Tapdisk(minor=1)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/SRCommand.py", line 385, in run
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     ret = cmd.run(sr)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/SRCommand.py", line 111, in run
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     return self._run_locked(sr)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/SRCommand.py", line 161, in _run_locked
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     rv = self._run(sr, target)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/SRCommand.py", line 253, in _run
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     writable, caching_params=caching_params)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 1567, in attach
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     {"rdonly": not writable})
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 1730, in _activate
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     self._get_pool_config(sr_uuid).get("mem-pool-size"))
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 1351, in _tap_activate
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     options)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 842, in launch_on_tap
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     tapdisk = cls.__from_blktap(blktap)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 737, in __from_blktap
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     tapdisk = cls.from_minor(minor=blktap.minor)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 733, in from_minor
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     return cls.get(minor=minor)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]   File "/opt/xensource/sm/blktap2.py", line 723, in get
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]     raise TapdiskNotRunning( ** attrs)
May 21 11:30:25 xcpng83-bzkcpvhy SM: [6322]
  • only daemon.log then can give the hint to the user (assuming the user can make the link between -13 and EPERM):
tapdisk[6335]: Unable to open [/var/run/sr-mount/364d8fbc-f587-52e6-8499-382c4d3bdbc8/tmpdi2m5lzx.iso] (-13)!
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

No branches or pull requests

1 participant