do we even handle volume metadata in the engine?

Hi, It seems I was able to get my setup working for NFS storage, thanks for your advices! Now I'm afraid I am stuck again: what I need to do is to add validation for volume metadata to a certain command (to be exact, that VOLTYPE is LEAF). But I can't find examples of us dealing with this data in the engine part at all. I understand this is in the end executed by VDSM, but nevertheless - in what format are we even reading and writing volume metadata? Even class/method name would be helpful. Thanks, Fedor

You could check Volume.getInfo output: # vdsm-client Volume getInfo storagepoolID=None storagedomainID=91630622-c645-4397-a9fe-9ddf26690500 imageID=9f36c5ff-2ed1-4d1a-a7ad-365e5e1fb7b6 volumeID=4093e21a-73f7-451a-90d1-2b8d41685164 { "apparentsize": "3489660928", "capacity": "6442450944", "children": [], "ctime": "1581807371", "description": "{\"DiskAlias\":\"fedora-30.qcow2\",\"DiskDescription\":\"Uploaded disk\"}", "disktype": "DATA", "domain": "91630622-c645-4397-a9fe-9ddf26690500", "format": "COW", "generation": 0, "image": "9f36c5ff-2ed1-4d1a-a7ad-365e5e1fb7b6", "lease": { "offset": 105906176, "owners": [], "path": "/dev/91630622-c645-4397-a9fe-9ddf26690500/leases", "version": null }, "legality": "LEGAL", "mtime": "0", "parent": "00000000-0000-0000-0000-000000000000", "pool": "", "status": "OK", "truesize": "3489660928", "type": "SPARSE", "uuid": "4093e21a-73f7-451a-90d1-2b8d41685164", "voltype": "LEAF" } On Tuesday, February 18, 2020, Fedor Gavrilov <fgavrilo@redhat.com> wrote:
Hi,
It seems I was able to get my setup working for NFS storage, thanks for your advices!
Now I'm afraid I am stuck again: what I need to do is to add validation for volume metadata to a certain command (to be exact, that VOLTYPE is LEAF). But I can't find examples of us dealing with this data in the engine part at all. I understand this is in the end executed by VDSM, but nevertheless - in what format are we even reading and writing volume metadata? Even class/method name would be helpful.
Thanks, Fedor _______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/communit y/about/community-guidelines/ List Archives: https://lists.ovirt.org/archiv es/list/devel@ovirt.org/message/EBNNYCDNFV35SSSS3HN4HZK3XSIX5ABC/

Whether a volume is a leaf can be easily computed since it's the last volume in the chain, see[1] [1] https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bl... On Tue, Feb 18, 2020 at 5:14 PM Fedor Gavrilov <fgavrilo@redhat.com> wrote:
Hi,
It seems I was able to get my setup working for NFS storage, thanks for your advices!
Now I'm afraid I am stuck again: what I need to do is to add validation for volume metadata to a certain command (to be exact, that VOLTYPE is LEAF). But I can't find examples of us dealing with this data in the engine part at all. I understand this is in the end executed by VDSM, but nevertheless - in what format are we even reading and writing volume metadata? Even class/method name would be helpful.
Thanks, Fedor _______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/EBNNYCDNFV35SS...

Amit, Benny, thanks for your help! So does that mean that there can only be at most one leaf in the chain at any moment? Do we also expect at least one leaf? Fedor ----- Original Message ----- From: "Benny Zlotnik" <bzlotnik@redhat.com> To: "Fedor Gavrilov" <fgavrilo@redhat.com> Cc: "devel" <devel@ovirt.org> Sent: Wednesday, February 19, 2020 8:50:00 AM Subject: Re: [ovirt-devel] do we even handle volume metadata in the engine? Whether a volume is a leaf can be easily computed since it's the last volume in the chain, see[1] [1] https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bl... On Tue, Feb 18, 2020 at 5:14 PM Fedor Gavrilov <fgavrilo@redhat.com> wrote:
Hi,
It seems I was able to get my setup working for NFS storage, thanks for your advices!
Now I'm afraid I am stuck again: what I need to do is to add validation for volume metadata to a certain command (to be exact, that VOLTYPE is LEAF). But I can't find examples of us dealing with this data in the engine part at all. I understand this is in the end executed by VDSM, but nevertheless - in what format are we even reading and writing volume metadata? Even class/method name would be helpful.
Thanks, Fedor _______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/EBNNYCDNFV35SS...

well, a disk is a chain, so there has to be only one leaf On Wed, Feb 19, 2020 at 9:58 AM Fedor Gavrilov <fgavrilo@redhat.com> wrote:
Amit, Benny, thanks for your help!
So does that mean that there can only be at most one leaf in the chain at any moment? Do we also expect at least one leaf?
Fedor
----- Original Message ----- From: "Benny Zlotnik" <bzlotnik@redhat.com> To: "Fedor Gavrilov" <fgavrilo@redhat.com> Cc: "devel" <devel@ovirt.org> Sent: Wednesday, February 19, 2020 8:50:00 AM Subject: Re: [ovirt-devel] do we even handle volume metadata in the engine?
Whether a volume is a leaf can be easily computed since it's the last volume in the chain, see[1]
[1] https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bl...
On Tue, Feb 18, 2020 at 5:14 PM Fedor Gavrilov <fgavrilo@redhat.com> wrote:
Hi,
It seems I was able to get my setup working for NFS storage, thanks for your advices!
Now I'm afraid I am stuck again: what I need to do is to add validation for volume metadata to a certain command (to be exact, that VOLTYPE is LEAF). But I can't find examples of us dealing with this data in the engine part at all. I understand this is in the end executed by VDSM, but nevertheless - in what format are we even reading and writing volume metadata? Even class/method name would be helpful.
Thanks, Fedor _______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/EBNNYCDNFV35SS...

there are special cases though, like preview and such On Wed, Feb 19, 2020 at 10:28 AM Benny Zlotnik <bzlotnik@redhat.com> wrote:
well, a disk is a chain, so there has to be only one leaf
On Wed, Feb 19, 2020 at 9:58 AM Fedor Gavrilov <fgavrilo@redhat.com> wrote:
Amit, Benny, thanks for your help!
So does that mean that there can only be at most one leaf in the chain at any moment? Do we also expect at least one leaf?
Fedor
----- Original Message ----- From: "Benny Zlotnik" <bzlotnik@redhat.com> To: "Fedor Gavrilov" <fgavrilo@redhat.com> Cc: "devel" <devel@ovirt.org> Sent: Wednesday, February 19, 2020 8:50:00 AM Subject: Re: [ovirt-devel] do we even handle volume metadata in the engine?
Whether a volume is a leaf can be easily computed since it's the last volume in the chain, see[1]
[1] https://github.com/oVirt/ovirt-engine/blob/master/backend/manager/modules/bl...
On Tue, Feb 18, 2020 at 5:14 PM Fedor Gavrilov <fgavrilo@redhat.com> wrote:
Hi,
It seems I was able to get my setup working for NFS storage, thanks for your advices!
Now I'm afraid I am stuck again: what I need to do is to add validation for volume metadata to a certain command (to be exact, that VOLTYPE is LEAF). But I can't find examples of us dealing with this data in the engine part at all. I understand this is in the end executed by VDSM, but nevertheless - in what format are we even reading and writing volume metadata? Even class/method name would be helpful.
Thanks, Fedor _______________________________________________ Devel mailing list -- devel@ovirt.org To unsubscribe send an email to devel-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/EBNNYCDNFV35SS...
participants (3)
-
Amit Bawer
-
Benny Zlotnik
-
Fedor Gavrilov