diff --git a/starlingx-dashboard/centos/build_srpm.data b/starlingx-dashboard/centos/build_srpm.data index cb45a03a..523e66bd 100644 --- a/starlingx-dashboard/centos/build_srpm.data +++ b/starlingx-dashboard/centos/build_srpm.data @@ -1,2 +1,2 @@ SRC_DIR="starlingx-dashboard" -TIS_PATCH_VER=13 +TIS_PATCH_VER=14 diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/sysinv.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/sysinv.py index b87f9ae2..32061ee3 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/sysinv.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/api/sysinv.py @@ -97,9 +97,9 @@ USER_PARTITION_PHYS_VOL = constants.USER_PARTITION_PHYSICAL_VOLUME PARTITION_STATUS_MSG = constants.PARTITION_STATUS_MSG PARTITION_IN_USE_STATUS = constants.PARTITION_IN_USE_STATUS -# The default size of a stor's journal. This should be the same value as -# journal_default_size from sysinv.conf. -JOURNAL_DEFAULT_SIZE = 1024 +# The default size of a stor's journal in GB. This should be the +# same value as journal_default_size from sysinv.conf. +JOURNAL_DEFAULT_SIZE = 1 # Platform configuration PLATFORM_CONFIGURATION = '/etc/platform/platform.conf' diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/forms.py index 8fb333bf..71d2f550 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/storages/forms.py @@ -72,11 +72,11 @@ class EditStorageVolume(forms.SelfHandlingForm): help_text=_("Assign disk to journal " "storage volume.")) - journal_size_mib = forms.CharField(label=_("Journal Size MiB"), + journal_size_gib = forms.CharField(label=_("Journal Size GiB"), required=False, initial=stx_api.sysinv.JOURNAL_DEFAULT_SIZE, widget=forms.TextInput(attrs={ - 'data-slug': 'journal_size_mib'}), + 'data-slug': 'journal_size_gib'}), help_text=_("Journal's size for the " "current OSD.")) @@ -127,10 +127,11 @@ class EditStorageVolume(forms.SelfHandlingForm): data['journal_location'] = journal else: data['journal_location'] = None - data['journal_size_mib'] = stx_api.sysinv.JOURNAL_DEFAULT_SIZE + data['journal_size_mib'] = stx_api.sysinv.JOURNAL_DEFAULT_SIZE * 1024 del data['journal_locations'] del data['id'] + del data['journal_size_gib'] # The REST API takes care of updating the stor journal information. stor = stx_api.sysinv.host_stor_update(request, stor_id, **data) @@ -215,14 +216,14 @@ class AddStorageVolume(forms.SelfHandlingForm): "journal storage " "volume.")) - journal_size_mib = forms.CharField(label=_("Journal Size MiB"), + journal_size_gib = forms.CharField(label=_("Journal Size GiB"), required=False, initial=stx_api.sysinv.JOURNAL_DEFAULT_SIZE, widget=forms.TextInput(attrs={ 'class': 'switched', 'data-switch-on': 'function', 'data-function-osd': - _("Journal Size MiB")}), + _("Journal Size GiB")}), help_text=_("Journal's size for the" "current OSD.")) @@ -285,7 +286,7 @@ class AddStorageVolume(forms.SelfHandlingForm): journal_tuple_list.append((j.uuid, "%s " % j.uuid)) else: journal_tuple_list.append((None, "Collocated with OSD")) - self.fields['journal_size_mib'].widget.attrs['disabled'] = \ + self.fields['journal_size_gib'].widget.attrs['disabled'] = \ 'disabled' self.fields['disks'].choices = disk_tuple_list @@ -320,7 +321,7 @@ class AddStorageVolume(forms.SelfHandlingForm): data['journal_location'] = journal else: data['journal_location'] = None - data['journal_size_mib'] = stx_api.sysinv.JOURNAL_DEFAULT_SIZE + data['journal_size_mib'] = stx_api.sysinv.JOURNAL_DEFAULT_SIZE * 1024 try: del data['host_id'] @@ -328,6 +329,7 @@ class AddStorageVolume(forms.SelfHandlingForm): del data['tiers'] del data['hostname'] del data['journal_locations'] + del data['journal_size_gib'] # The REST API takes care of creating the stor # and updating disk.foristorid diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/storages/_editstoragevolume.html b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/storages/_editstoragevolume.html index 8ba25997..3d4ef360 100755 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/storages/_editstoragevolume.html +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/inventory/templates/inventory/storages/_editstoragevolume.html @@ -13,14 +13,14 @@