Commit eaece9c
committed
fix(RAWVDI): define vdi_type for RAWVDI (#151)
Add `vdi_type` as `phy` for `drivers/LUNperVDI.py:RAWVDI.load()`.
If we don't define a vdi_type, the VDI activation in blktap2.py will fail with error:
```
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] ***** generic exception: vdi_attach: EXCEPTION <class 'blktap2.VDI.UnexpectedVDIType'>, Target <class '__ma
in__.ISCSIVDI'> has unexpected VDI type ''
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/SRCommand.py", line 113, in run
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] return self._run_locked(sr)
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/SRCommand.py", line 163, in _run_locked
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] rv = self._run(sr, target)
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/SRCommand.py", line 260, in _run
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] writable, caching_params=caching_params)
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/blktap2.py", line 1616, in attach
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] {"rdonly": not writable})
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/blktap2.py", line 1854, in _activate
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] if self.tap_wanted():
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/blktap2.py", line 1154, in tap_wanted
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] vdi_type = self.target.get_vdi_type()
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/blktap2.py", line 1207, in get_vdi_type
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] raise VDI.UnexpectedVDIType(_type, self.vdi)
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread]
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] ***** iSCSI: EXCEPTION <class 'blktap2.VDI.UnexpectedVDIType'>, Target <class '__main__.ISCSIVDI'> has unex
pected VDI type ''
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/SRCommand.py", line 392, in run
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] ret = cmd.run(sr)
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/SRCommand.py", line 113, in run
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] return self._run_locked(sr)
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/SRCommand.py", line 163, in _run_locked
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] rv = self._run(sr, target)
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/SRCommand.py", line 260, in _run
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] writable, caching_params=caching_params)
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/blktap2.py", line 1616, in attach
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] {"rdonly": not writable})
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/blktap2.py", line 1854, in _activate
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] if self.tap_wanted():
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/blktap2.py", line 1154, in tap_wanted
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] vdi_type = self.target.get_vdi_type()
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] File "/opt/xensource/sm/blktap2.py", line 1207, in get_vdi_type
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread] raise VDI.UnexpectedVDIType(_type, self.vdi)
Aug 4 17:21:28 r620-x1 SM: [202712][MainThread]
```
Signed-off-by: Damien Thenot <damien.thenot@vates.tech>1 parent 4a0a1e5 commit eaece9c
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
0 commit comments