[RFC] Changes to "disks" attribute of template creation API to support s390 architecture

Hi All, Since currently s390 does not support libvirt storage pools, we propose to provide an additional parameter "path" in disks section to specify the path for a default IMG file to be created in. if "path" attribute is specified, size parameter should be mandatory. Two possible ways to implement default values, keeping the current option of 'pool' as well: 1. If both path and pool options are found in default config file, path always takes higher precedence over pool irrespective of arch (incase of s390 pool is ignored) 2. Have a different config file if arch is s390 where only default path is found (no pool option). Let me know what you think. Regards, Pooja Kulkarni

Hi Pooja, I think option (2) is less intrusive and is easier to rollback when/if libvirt for s390x start supporting storage pools. However, isn't it too restrictive? If I understood it right this would mean that the disks would be created always in the default path. Also, as I said in the other RFC, do not take my word as a 'go ahead' because I am not the official Kimchi maintainer and Aline's opinion may differ from mine. Daniel On 08/10/2016 03:28 AM, Pooja Kulkarni wrote:
Hi All,
Since currently s390 does not support libvirt storage pools, we propose to provide an additional parameter "path" in disks section to specify the path for a default IMG file to be created in. if "path" attribute is specified, size parameter should be mandatory.
Two possible ways to implement default values, keeping the current option of 'pool' as well: 1. If both path and pool options are found in default config file, path always takes higher precedence over pool irrespective of arch (incase of s390 pool is ignored) 2. Have a different config file if arch is s390 where only default path is found (no pool option).
Let me know what you think.
Regards, Pooja Kulkarni
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

On 8/11/16 12:24 AM, Daniel Henrique Barboza wrote:
Hi Pooja,
I think option (2) is less intrusive and is easier to rollback when/if libvirt for s390x start supporting storage pools. However, isn't it too restrictive? If I understood it right this would mean that the disks would be created always in the default path.
Also, as I said in the other RFC, do not take my word as a 'go ahead' because I am not the official Kimchi maintainer and Aline's opinion may differ from mine.
Default template config file (template.conf) at the moment supports addition of disks via only storage pool. In case of platform s390x, storage pools are not fully supported. By default right now IMG file’s for storage are supported. As per my understanding this option would still valid in case of other platforms too, if user interested in creating IMG file for storage in the specified path. Hence, template config file can have another option which can contain additional parameter called path; # Storage path used to handle the guest IMG files #path = /var/lib/libvirt/images/ Now using of this option can be limited to s390x in the first place. Once it is stabilized and if works well on the other platforms, we can extend this option. From s390x point of view I would recommend the following: a. by default path can be presented from the UI. b. user can provide pool over path if he/she interested in. c. If both options are present path can be can be given priority over the pool. d. In any case we can mandate one option. Regards Chandra
Daniel
On 08/10/2016 03:28 AM, Pooja Kulkarni wrote:
Hi All,
Since currently s390 does not support libvirt storage pools, we propose to provide an additional parameter "path" in disks section to specify the path for a default IMG file to be created in. if "path" attribute is specified, size parameter should be mandatory.
Two possible ways to implement default values, keeping the current option of 'pool' as well: 1. If both path and pool options are found in default config file, path always takes higher precedence over pool irrespective of arch (incase of s390 pool is ignored) 2. Have a different config file if arch is s390 where only default path is found (no pool option).
Let me know what you think.
Regards, Pooja Kulkarni
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel

Hi All, (I am back \o/) I'd recommend to find a solution which affects as less as possible the current design we have today as the community code freeze for 2.3 release is on next week. Said that, the solution we agree in this RFC will be specific for s390x systems. Any problem on that? That means, that in the code we will need to check the system arch to identify on which way to follow. For this storage pool specific issue, I'd say to have a template.conf file for s390x systems and change the 'pool' parameter for 'dirpath' Something like: [storage] # Specify multiple [[disk.X]] sub-sections to add multiples disks to guest # Each disk files will be created in respective storage pool set [[disk.0]] # Disk size in GB #size = 10 # Disk format #format = qcow2 *# Directory to handle the guest disk ** **#dirpath = /var/lib/kimchi/images** * When parsing the template.conf file, make sure to validate the data according to system arch. if s390x: if not dirpath: raise InvalidOperation('You need to specify the directory to handle the guest disk') elif not pool: raise InvalidOperation('You need to specify the pool to handle the guest disk') That will imply in changing the way the templates and the guests are created. Today we have the 'disks' parameter which also needs pool information. Following the same approach, the pool information would be replaced by dirpath only for s390x systems. What do you think about that? Maybe we need to think more about the details but the overall idea is that. I will check the RFC about virtual networks and reply separated there. Regards, Aline Manera On 08/10/2016 03:28 AM, Pooja Kulkarni wrote:
Hi All,
Since currently s390 does not support libvirt storage pools, we propose to provide an additional parameter "path" in disks section to specify the path for a default IMG file to be created in. if "path" attribute is specified, size parameter should be mandatory.
Two possible ways to implement default values, keeping the current option of 'pool' as well: 1. If both path and pool options are found in default config file, path always takes higher precedence over pool irrespective of arch (incase of s390 pool is ignored) 2. Have a different config file if arch is s390 where only default path is found (no pool option).
Let me know what you think.
Regards, Pooja Kulkarni
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
participants (4)
-
Aline Manera
-
Chandra Shekhar Reddy Potula
-
Daniel Henrique Barboza
-
Pooja Kulkarni