gluster / gdeploy

gdeploy - an Ansible based tool to deploy GlusterFS
GNU General Public License v3.0
91 stars 69 forks source link

Manual creation of thinpools fail when no size specified. #484

Open devyanikota opened 6 years ago

devyanikota commented 6 years ago

During manual creation of PVs, VGs and thin pools. gdeploy was failing until size was added to the thinpool sections. The docs indicate that the size option should be optional.

johnsimcall commented 6 years ago

Looks like this is resolved here https://github.com/gluster/gdeploy/issues/376#issuecomment-316651019

johnsimcall commented 6 years ago

I looked some more tonight... If the thinpool does not have a size given, it will use the maximum size allowed by the VG. However, the thinlv must have a "virtualsize" parameter given. This seems strange because the code seems to want to allow it to be optional (which would be very convenient!)

modules/lv.py on lines 231-232

        lvcreate['virtualsize'] = self.module.params[
                'virtualsize'] or (str(self.poolsize_compute()) + 'K')

but it's prevented because of gdeployfeatures/lv/lv.py on lines 93-95

    if not (vgname and lvname and poolname and virtualsize):
        msg = "Error: Provide vgname, lvname, poolname, virtualsize to "\
              "create thin lv"