On Wed, Nov 17, 2021 at 10:32 AM Francesco Lorenzini <francesco@shellrent.com> wrote:
Hi Nir,

sadly in the vdsm log there aren't more useful info:

2021-11-17 09:27:59,419+0100 INFO  (Reactor thread) [ProtocolDetector.AcceptorImpl] Accepted connection from ::1:56392 (protocoldetector:61)
2021-11-17 09:27:59,426+0100 WARN  (Reactor thread) [vds.dispatcher] unhandled write event (betterAsyncore:184)
2021-11-17 09:27:59,427+0100 INFO  (Reactor thread) [ProtocolDetector.Detector] Detected protocol stomp from ::1:56392 (protocoldetector:125)
2021-11-17 09:27:59,427+0100 INFO  (Reactor thread) [Broker.StompAdapter] Processing CONNECT request (stompserver:95)
2021-11-17 09:27:59,427+0100 INFO  (JsonRpc (StompReactor)) [Broker.StompAdapter] Subscribe command received (stompserver:124)
2021-11-17 09:27:59,448+0100 INFO  (jsonrpc/0) [vdsm.api] START deleteVolume(sdUUID='e25db7d0-060a-4046-94b5-235f38097cd8', spUUID='c0e7a0c5-8048-4f30-af08-cbd17d797e3b', imgUUID='4d79c1da-34f0-44e3-8b92-c4bcb8524d83', volumes=['5cb3fe58-3e01-4d32-bc7c-5907a4f858a8'], postZero='False', force='true', discard=False) from=::1,56392, task_id=33647125-f8b5-494e-a8e8-17a6fc8aad4d (api:48)
2021-11-17 09:27:59,448+0100 INFO  (jsonrpc/0) [vdsm.api] FINISH deleteVolume error=Unknown pool id, pool not connected: ('c0e7a0c5-8048-4f30-af08-cbd17d797e3b',) from=::1,56392, task_id=33647125-f8b5-494e-a8e8-17a6fc8aad4d (api:52)
2021-11-17 09:27:59,448+0100 INFO  (jsonrpc/0) [storage.TaskManager.Task] (Task='33647125-f8b5-494e-a8e8-17a6fc8aad4d') aborting: Task is aborted: "value=Unknown pool id, pool not connected: ('c0e7a0c5-8048-4f30-af08-cbd17d797e3b',) abortedcode=309" (task:1182)
2021-11-17 09:27:59,448+0100 INFO  (jsonrpc/0) [storage.Dispatcher] FINISH deleteVolume error=Unknown pool id, pool not connected: ('c0e7a0c5-8048-4f30-af08-cbd17d797e3b',) (dispatcher:81)
2021-11-17 09:27:59,448+0100 INFO  (jsonrpc/0) [jsonrpc.JsonRpcServer] RPC call Volume.delete failed (error 309) in 0.00 seconds (__init__:312)


I know the vdsm-client is maintained by the infra team, should I open a new thread there?

No, this is not vdsm-client issue.

Can you share a complete vdsm log from this host?

The only possible reason this can fail is:
- pool id is incorrect (do you have multiple DCs?)
- the host is not connected to storage (is host UP in engine?)

Correction for my previous reply - the fact that Volume.getInfo() works does not
prove that the pool is correct or the host is connected to storage. This call does
not check the pool id and does not depend on host being active.

If the host is connected to the pool, you should see:

# ls -lh /rhev/data-center/c0e7a0c5-8048-4f30-af08-cbd17d797e3b/mastersd/
total 8.0K
drwxr-xr-x.  2 vdsm kvm  103 Jun  4 01:49 dom_md
drwxr-xr-x. 67 vdsm kvm 4.0K Nov 16 16:37 images
drwxr-xr-x.  5 vdsm kvm 4.0K Oct 10 13:33 master

Francesco

Il 16/11/2021 18:19, Nir Soffer ha scritto:
On Tue, Nov 16, 2021 at 4:07 PM francesco--- via Users <users@ovirt.org> wrote:
Hi all,

I'm trying to delete via vdsm-client toolan illegal volume that is not listed in the engine database. The volume ID is 5cb3fe58-3e01-4d32-bc7c-5907a4f858a8:

[root@ovirthost ~]# vdsm-tool dump-volume-chains e25db7d0-060a-4046-94b5-235f38097cd8

Images volume chains (base volume first)

   image:    4d79c1da-34f0-44e3-8b92-c4bcb8524d83

             Error: more than one volume pointing to the same parent volume e.g: (_BLANK_UUID<-a), (a<-b), (a<-c)

             Unordered volumes and children:

             - 00000000-0000-0000-0000-000000000000 <- 5aad30c7-96f0-433d-95c8-2317e5f80045
               status: OK, voltype: INTERNAL, format: COW, legality: LEGAL, type: SPARSE, capacity: 214748364800, truesize: 165493616640

             - 5aad30c7-96f0-433d-95c8-2317e5f80045 <- 5cb3fe58-3e01-4d32-bc7c-5907a4f858a8
               status: OK, voltype: LEAF, format: COW, legality: ILLEGAL, type: SPARSE, capacity: 214748364800, truesize: 8759619584

             - 5aad30c7-96f0-433d-95c8-2317e5f80045 <- 674e85d8-519a-461f-9dd6-aca44798e088
               status: OK, voltype: LEAF, format: COW, legality: LEGAL, type: SPARSE, capacity: 214748364800, truesize: 200704

With the command vdsm-client Volume getInfo I can retrieve the info about the volume 5cb3fe58-3e01-4d32-bc7c-5907a4f858a8:

 vdsm-client Volume getInfo storagepoolID=c0e7a0c5-8048-4f30-af08-cbd17d797e3b volumeID=5cb3fe58-3e01-4d32-bc7c-5907a4f858a8 storagedomainID=e25db7d0-060a-4046-94b5-235f38097cd8 imageID=4d79c1da-34f0-44e3-8b92-c4bcb8524d83
{
    "apparentsize": "8759676160",
    "capacity": "214748364800",
    "children": [],
    "ctime": "1634958924",
    "description": "",
    "disktype": "DATA",
    "domain": "e25db7d0-060a-4046-94b5-235f38097cd8",
    "format": "COW",
    "generation": 0,
    "image": "4d79c1da-34f0-44e3-8b92-c4bcb8524d83",
    "lease": {
        "offset": 0,
        "owners": [],
        "path": "/rhev/data-center/mnt/ovirthost.com:_data/e25db7d0-060a-4046-94b5-235f38097cd8/images/4d79c1da-34f0-44e3-8b92-c4bcb8524d83/5cb3fe58-3e01-4d32-bc7c-5907a4f858a8.lease",
        "version": null
    },
    "legality": "ILLEGAL",
    "mtime": "0",
    "parent": "5aad30c7-96f0-433d-95c8-2317e5f80045",
    "pool": "",
    "status": "ILLEGAL",
    "truesize": "8759619584",
    "type": "SPARSE",
    "uuid": "5cb3fe58-3e01-4d32-bc7c-5907a4f858a8",
    "voltype": "LEAF"
}

I can't remove it due to the following error:

vdsm-client Volume delete storagepoolID=c0e7a0c5-8048-4f30-af08-cbd17d797e3b volumeID=5cb3fe58-3e01-4d32-bc7c-5907a4f858a8 storagedomainID=e25db7d0-060a-4046-94b5-235f38097cd8 imageID=4d79c1da-34f0-44e3-8b92-c4bcb8524d83 force=true
vdsm-client: Command Volume.delete with args {'storagepoolID': 'c0e7a0c5-8048-4f30-af08-cbd17d797e3b', 'volumeID': '5cb3fe58-3e01-4d32-bc7c-5907a4f858a8', 'storagedomainID': 'e25db7d0-060a-4046-94b5-235f38097cd8', 'imageID': '4d79c1da-34f0-44e3-8b92-c4bcb8524d83', 'force': 'true'} failed:
(code=309, message=Unknown pool id, pool not connected: ('c0e7a0c5-8048-4f30-af08-cbd17d797e3b',))
If the pool id works in Volume getInfo, it should be correct.

I'm performing the operation directly on the SPM. I searched for a while but I didn't find anything usefull. Any tips or doc that I missed?
What you do looks right. Did you look in vdsm.log? I'm sure there is
more info there
about the error.

Nir
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/4GKETEMAYDMHF2KU6T6FFDSX7KAN6EXV/

--
--    
Shellrent - Il primo hosting italiano Security
                    First
Francesco Lorenzini
System Administrator & DevOps Engineer
Shellrent Srl
Via dell'Edilizia, 19 - 36100 Vicenza
Tel. 0444321155 | Fax 04441492177