Closed zhoubofsy closed 7 years ago
Hi, I try vdi copy , but failed when tap-ctl unpause.
source code version : master branch -> 9b977dc
9b977dc
SMlog:
Dec 19 10:38:17 xenserver90 SM: [28113] RBDVDI.snapshot: sr_uuid=a04f4451-3761-415b-a6c2-2b12656cb13a, vdi_uuid=8499f57e-ae12-499d-837f-8dbc4157b91a Dec 19 10:38:17 xenserver90 SM: [28113] RBDVDI._snapshot: sr_uuid=a04f4451-3761-415b-a6c2-2b12656cb13a, vdi_uuid=8499f57e-ae12-499d-837f-8dbc4157b91a Dec 19 10:38:17 xenserver90 SM: [28113] ['uuidgen', '-r'] Dec 19 10:38:17 xenserver90 SM: [28113] pread SUCCESS Dec 19 10:38:17 xenserver90 SM: [28113] Calling cephutils.VDI._get_vdi_info: vdi_uuid=8499f57e-ae12-499d-837f-8dbc4157b91a Dec 19 10:38:17 xenserver90 SM: [28113] ['rbd', 'image-meta', 'list', 'VHD-8499f57e-ae12-499d-837f-8dbc4157b91a', '--pool', 'RBD_XenStorage-a04f4451-3761-415b-a6c2-2b12656cb13a', '--format', 'json', '--name', 'client.admin'] Dec 19 10:38:17 xenserver90 SM: [28113] pread SUCCESS Dec 19 10:38:17 xenserver90 SM: [28113] RBDVDI.load: vdi_uuid=84678ede-bcb3-462a-b58a-89c9f2a2b3ed Dec 19 10:38:17 xenserver90 SM: [28113] Calling cephutils.SR._get_path: vdi_uuid=84678ede-bcb3-462a-b58a-89c9f2a2b3ed Dec 19 10:38:17 xenserver90 SM: [28113] Calling cephutils.VDI.load: vdi_uuid=84678ede-bcb3-462a-b58a-89c9f2a2b3ed Dec 19 10:38:17 xenserver90 SM: [28113] Calling cephutils.VDI._do_snapshot: vdi_uuid=8499f57e-ae12-499d-837f-8dbc4157b91a, snap_uuid=84678ede-bcb3-462a-b58a-89c9f2a2b3ed Dec 19 10:38:17 xenserver90 SM: [28113] Pause request for 8499f57e-ae12-499d-837f-8dbc4157b91a Dec 19 10:38:17 xenserver90 SM: [28113] Calling tap-pause on host OpaqueRef:698b2548-bdbe-91ea-35e7-76c7a49c3b4f Dec 19 10:38:18 xenserver90 SM: [28210] lock: opening lock file /var/lock/sm/8499f57e-ae12-499d-837f-8dbc4157b91a/vdi Dec 19 10:38:18 xenserver90 SM: [28210] lock: acquired /var/lock/sm/8499f57e-ae12-499d-837f-8dbc4157b91a/vdi Dec 19 10:38:18 xenserver90 SM: [28210] Pause for 8499f57e-ae12-499d-837f-8dbc4157b91a Dec 19 10:38:18 xenserver90 SM: [28210] Calling tap pause with minor 6 Dec 19 10:38:18 xenserver90 SM: [28210] ['/usr/sbin/tap-ctl', 'pause', '-p', '12010', '-m', '6'] Dec 19 10:38:18 xenserver90 SM: [28210] = 0 Dec 19 10:38:18 xenserver90 SM: [28210] lock: released /var/lock/sm/8499f57e-ae12-499d-837f-8dbc4157b91a/vdi Dec 19 10:38:18 xenserver90 SM: [28210] lock: closed /var/lock/sm/8499f57e-ae12-499d-837f-8dbc4157b91a/vdi Dec 19 10:38:18 xenserver90 SM: [28113] Calling cephutills.VDI._unmap_VHD: vdi_uuid=8499f57e-ae12-499d-837f-8dbc4157b91a, dm=none, sharable=false Dec 19 10:38:18 xenserver90 SM: [28113] Calling cephutils.VDI._call_plugin: op=_unmap Dec 19 10:38:18 xenserver90 SM: [28113] Calling ceph_plugin Dec 19 10:38:18 xenserver90 SM: [28113] Calling rbd/nbd map/unmap on host OpaqueRef:698b2548-bdbe-91ea-35e7-76c7a49c3b4f Dec 19 10:38:18 xenserver90 SM: [28232] ['realpath', '/dev/nbd/RBD_XenStorage-a04f4451-3761-415b-a6c2-2b12656cb13a/VHD-8499f57e-ae12-499d-837f-8dbc4157b91a'] Dec 19 10:38:18 xenserver90 SM: [28232] pread SUCCESS Dec 19 10:38:18 xenserver90 SM: [28232] ['rbd-nbd', 'unmap', '/dev/nbd5', '--name', 'client.admin'] Dec 19 10:38:18 xenserver90 SM: [28232] pread SUCCESS Dec 19 10:38:18 xenserver90 SM: [28113] ['rbd', 'snap', 'create', 'VHD-8499f57e-ae12-499d-837f-8dbc4157b91a@SNAP-84678ede-bcb3-462a-b58a-89c9f2a2b3ed', '--pool', 'RBD_XenStorage-a04f4451-3761-415b-a6c2-2b12656cb13a', '--name', 'client.admin'] Dec 19 10:38:18 xenserver90 SM: [28113] pread SUCCESS Dec 19 10:38:18 xenserver90 SM: [28113] ['rbd', 'snap', 'protect', 'VHD-8499f57e-ae12-499d-837f-8dbc4157b91a@SNAP-84678ede-bcb3-462a-b58a-89c9f2a2b3ed', '--pool', 'RBD_XenStorage-a04f4451-3761-415b-a6c2-2b12656cb13a', '--name', 'client.admin'] Dec 19 10:38:19 xenserver90 SM: [28113] pread SUCCESS Dec 19 10:38:19 xenserver90 SM: [28113] Calling cephutills.VDI._map_VHD: vdi_uuid=8499f57e-ae12-499d-837f-8dbc4157b91a, dm=none, sharable=false Dec 19 10:38:19 xenserver90 SM: [28113] Calling cephutils.VDI._call_plugin: op=_map Dec 19 10:38:19 xenserver90 SM: [28113] Calling ceph_plugin Dec 19 10:38:19 xenserver90 SM: [28113] Calling rbd/nbd map/unmap on host OpaqueRef:698b2548-bdbe-91ea-35e7-76c7a49c3b4f Dec 19 10:38:19 xenserver90 SM: [28301] ['rbd-nbd', '--nbds_max', '64', 'map', 'RBD_XenStorage-a04f4451-3761-415b-a6c2-2b12656cb13a/VHD-8499f57e-ae12-499d-837f-8dbc4157b91a', '--name', 'client.admin'] Dec 19 10:38:19 xenserver90 SM: [28301] pread SUCCESS Dec 19 10:38:19 xenserver90 SM: [28113] Unpause request for 8499f57e-ae12-499d-837f-8dbc4157b91a secondary=None Dec 19 10:38:19 xenserver90 SM: [28113] Calling tap-unpause on host OpaqueRef:698b2548-bdbe-91ea-35e7-76c7a49c3b4f Dec 19 10:38:19 xenserver90 SM: [28333] lock: opening lock file /var/lock/sm/8499f57e-ae12-499d-837f-8dbc4157b91a/vdi Dec 19 10:38:19 xenserver90 SM: [28333] lock: acquired /var/lock/sm/8499f57e-ae12-499d-837f-8dbc4157b91a/vdi Dec 19 10:38:19 xenserver90 SM: [28333] Unpause for 8499f57e-ae12-499d-837f-8dbc4157b91a Dec 19 10:38:19 xenserver90 SM: [28333] Realpath: /run/sr-mount/a04f4451-3761-415b-a6c2-2b12656cb13a/8499f57e-ae12-499d-837f-8dbc4157b91a Dec 19 10:38:19 xenserver90 SM: [28333] Calling tap unpause with minor 6 Dec 19 10:38:19 xenserver90 SM: [28333] ['/usr/sbin/tap-ctl', 'unpause', '-p', '12010', '-m', '6', '-a', 'vhd:/run/sr-mount/a04f4451-3761-415b-a6c2-2b12656cb13a/8499f57e-ae12-499d-837f-8dbc4157b91a'] Dec 19 10:38:29 xenserver90 SM: [28333] = 22 Dec 19 10:38:29 xenserver90 SM: [28333] ***** TAP-PAUSE:<function Unpause at 0x1794938>: EXCEPTION <class 'blktap2.CommandFailure'>, ['/usr/sbin/tap-ctl', 'unpause', '-p', '12010', '-m', '6', '-a', 'vhd:/run/sr-mount/a04f4451-3761-415b-a6c2-2b12656cb13a/8499f57e-ae12-499d-837f-8dbc4157b91a'] failed: status=22, pid=28345, errmsg=Invalid argument Dec 19 10:38:29 xenserver90 SM: [28333] File "/etc/xapi.d/plugins/tapdisk-pause", line 46, in wrapper Dec 19 10:38:29 xenserver90 SM: [28333] ret = op(self, *args) Dec 19 10:38:29 xenserver90 SM: [28333] File "/etc/xapi.d/plugins/tapdisk-pause", line 195, in Unpause Dec 19 10:38:29 xenserver90 SM: [28333] tapdisk.unpause(self.vdi_type, self.realpath, self.secondary) Dec 19 10:38:29 xenserver90 SM: [28333] File "/opt/xensource/sm/blktap2.py", line 872, in unpause Dec 19 10:38:29 xenserver90 SM: [28333] TapCtl.unpause(self.pid, self.minor, _type, path, mirror=mirror) Dec 19 10:38:29 xenserver90 SM: [28333] File "/opt/xensource/sm/blktap2.py", line 428, in unpause Dec 19 10:38:29 xenserver90 SM: [28333] cls._pread(args) Dec 19 10:38:29 xenserver90 SM: [28333] File "/opt/xensource/sm/blktap2.py", line 292, in _pread Dec 19 10:38:29 xenserver90 SM: [28333] tapctl._wait(quiet) Dec 19 10:38:29 xenserver90 SM: [28333] File "/opt/xensource/sm/blktap2.py", line 281, in _wait Dec 19 10:38:29 xenserver90 SM: [28333] raise self.CommandFailure(self.cmd, **info) Dec 19 10:38:29 xenserver90 SM: [28333] Dec 19 10:38:29 xenserver90 SM: [28333] lock: released /var/lock/sm/8499f57e-ae12-499d-837f-8dbc4157b91a/vdi Dec 19 10:38:29 xenserver90 SM: [28333] lock: closed /var/lock/sm/8499f57e-ae12-499d-837f-8dbc4157b91a/vdi Dec 19 10:38:29 xenserver90 SM: [28113] ***** BLKTAP2:call_pluginhandler ['XENAPI_PLUGIN_FAILURE', 'unpause', 'CommandFailure', "['/usr/sbin/tap-ctl', 'unpause', '-p', '12010', '-m', '6', '-a', 'vhd:/run/sr-mount/a04f4451-3761-415b-a6c2-2b12656cb13a/8499f57e-ae12-499d-837f-8dbc4157b91a'] failed: status=22, pid=28345, errmsg=Invalid argument"]: EXCEPTION <class 'XenAPI.Failure'>, ['XENAPI_PLUGIN_FAILURE', 'unpause', 'CommandFailure', "['/usr/sbin/tap-ctl', 'unpause', '-p', '12010', '-m', '6', '-a', 'vhd:/run/sr-mount/a04f4451-3761-415b-a6c2-2b12656cb13a/8499f57e-ae12-499d-837f-8dbc4157b91a'] failed: status=22, pid=28345, errmsg=Invalid argument"] Dec 19 10:38:29 xenserver90 SM: [28113] File "/opt/xensource/sm/blktap2.py", line 1406, in call_pluginhandler Dec 19 10:38:29 xenserver90 SM: [28113] args) Dec 19 10:38:29 xenserver90 SM: [28113] File "/usr/lib/python2.7/site-packages/XenAPI.py", line 248, in __call__ Dec 19 10:38:29 xenserver90 SM: [28113] return self.__send(self.__name, args) Dec 19 10:38:29 xenserver90 SM: [28113] File "/usr/lib/python2.7/site-packages/XenAPI.py", line 150, in xenapi_request Dec 19 10:38:29 xenserver90 SM: [28113] result = _parse_result(getattr(self, methodname)(*full_params)) Dec 19 10:38:29 xenserver90 SM: [28113] File "/usr/lib/python2.7/site-packages/XenAPI.py", line 222, in _parse_result Dec 19 10:38:29 xenserver90 SM: [28113] raise Failure(result['ErrorDescription']) Dec 19 10:38:29 xenserver90 SM: [28113] Dec 19 10:38:29 xenserver90 SM: [28113] Calling cephutils.SR._get_path: vdi_uuid=84678ede-bcb3-462a-b58a-89c9f2a2b3ed Dec 19 10:38:29 xenserver90 SM: [28113] RBDSR._updateStats: sr_uuid=a04f4451-3761-415b-a6c2-2b12656cb13a, virtAllocDelta=1073741824 Dec 19 10:38:29 xenserver90 SM: [28453] RBDSR.load: sr_uuid=a04f4451-3761-415b-a6c2-2b12656cb13a Dec 19 10:38:29 xenserver90 SM: [28453] Calling cephutils.SR.load: sr_uuid=a04f4451-3761-415b-a6c2-2b12656cb13a, ceph_user=admin Dec 19 10:38:29 xenserver90 SM: [28453] Calling cephutils.SR._get_srlist Dec 19 10:38:29 xenserver90 SM: [28453] ['ceph', 'df', '--format', 'json', '--name', 'client.admin'] Dec 19 10:38:30 xenserver90 SM: [28453] pread SUCCESS Dec 19 10:38:30 xenserver90 SM: [28453] Calling cephutils.SR._get_sr_uuid_by_name: pool=RBD_XenStorage-a04f4451-3761-415b-a6c2-2b12656cb13a Dec 19 10:38:30 xenserver90 SM: [28453] Calling cephutils.SR._get_sr_uuid_by_name: pool=RBD_XenStorage-36a078c3-f5e1-4eab-b095-9dea93261baa Dec 19 10:38:30 xenserver90 SM: [28453] Calling cephutils.SR._get_sr_uuid_by_name: pool=RBD_XenStorage-8c016c8c-cd0d-4a56-95ca-71f6d6bcf3f6 Dec 19 10:38:30 xenserver90 SM: [28453] RBDVDI.load: vdi_uuid=84678ede-bcb3-462a-b58a-89c9f2a2b3ed Dec 19 10:38:30 xenserver90 SM: [28453] Calling cephutils.SR._get_path: vdi_uuid=84678ede-bcb3-462a-b58a-89c9f2a2b3ed Dec 19 10:38:30 xenserver90 SM: [28453] Calling cephutils.VDI.load: vdi_uuid=84678ede-bcb3-462a-b58a-89c9f2a2b3ed Dec 19 10:38:30 xenserver90 SM: [28453] vdi_update {'sr_uuid': 'a04f4451-3761-415b-a6c2-2b12656cb13a', 'subtask_of': 'DummyRef:|4d3a80e5-130b-86a3-0990-3585957cdddc|VDI.update', 'vdi_ref': 'OpaqueRef:7a56c6aa-a51f-fdea-4275-baa0df0e9713', 'vdi_on_boot': 'persist', 'args': [], 'vdi_location': '84678ede-bcb3-462a-b58a-89c9f2a2b3ed', 'host_ref': 'OpaqueRef:698b2548-bdbe-91ea-35e7-76c7a49c3b4f', 'session_ref': 'OpaqueRef:19420815-70e3-1850-7a41-0e106ec52109', 'device_config': {'SRmaster': 'true'}, 'command': 'vdi_update', 'vdi_allow_caching': 'false', 'sr_ref': 'OpaqueRef:c2bc7247-9c5d-b110-7704-625513d0d50a', 'vdi_uuid': '84678ede-bcb3-462a-b58a-89c9f2a2b3ed'} Dec 19 10:38:30 xenserver90 SM: [28453] RBDVDI.update: sr_uuid=a04f4451-3761-415b-a6c2-2b12656cb13a, vdi_uuid=84678ede-bcb3-462a-b58a-89c9f2a2b3ed Dec 19 10:38:30 xenserver90 SM: [28453] Calling cephutils.VDI.update: sr_uuid=a04f4451-3761-415b-a6c2-2b12656cb13a, vdi_uuid=8499f57e-ae12-499d-837f-8dbc4157b91a Dec 19 10:38:30 xenserver90 SM: [28453] ['rbd', 'image-meta', 'set', 'VHD-8499f57e-ae12-499d-837f-8dbc4157b91a', 'VDI_LABEL', 'i-2-2650-VM-DATA', '--pool', 'RBD_XenStorage-a04f4451-3761-415b-a6c2-2b12656cb13a', '--name', 'client.admin'] Dec 19 10:38:30 xenserver90 SM: [28453] pread SUCCESS Dec 19 10:38:30 xenserver90 SM: [28453] ['rbd', 'image-meta', 'set', 'VHD-8499f57e-ae12-499d-837f-8dbc4157b91a', 'SNAP-84678ede-bcb3-462a-b58a-89c9f2a2b3ed', '20161219T02:38:17Z', '--pool', 'RBD_XenStorage-a04f4451-3761-415b-a6c2-2b12656cb13a', '--name', 'client.admin'] Dec 19 10:38:30 xenserver90 SM: [28453] pread SUCCESS Dec 19 10:38:50 xenserver90 SM: [28943] ['uuidgen', '-r'] Dec 19 10:38:50 xenserver90 SM: [28943] pread SUCCESS Dec 19 10:38:50 xenserver90 SM: [28943] RBDSR.load: sr_uuid=a04f4451-3761-415b-a6c2-2b12656cb13a Dec 19 10:38:50 xenserver90 SM: [28943] Calling cephutils.SR.load: sr_uuid=a04f4451-3761-415b-a6c2-2b12656cb13a, ceph_user=admin Dec 19 10:38:50 xenserver90 SM: [28943] Calling cephutils.SR._get_srlist Dec 19 10:38:50 xenserver90 SM: [28943] ['ceph', 'df', '--format', 'json', '--name', 'client.admin'] Dec 19 10:38:51 xenserver90 SM: [28943] pread SUCCESS
Hi, Please check the latest version (commit d7b62cf) Thank you for you help with testing. Roman
Hi, I try vdi copy , but failed when tap-ctl unpause.
source code version : master branch ->
9b977dc
SMlog: