Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(xo-web/XOSTOR): warn if replication count is higher than number of hosts with disks #7625

Merged
merged 9 commits into from
May 6, 2024
4 changes: 3 additions & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

> Users must be able to say: “Nice enhancement, I'm eager to test it”

- [New XOSTOR] Display a warning when replication count is higher than number of hosts with disks (PR [#7625](https://github.com/vatesfr/xen-orchestra/pull/7625))

### Bug fixes

> Users must be able to say: “I had this issue, happy to know it's fixed”
Expand All @@ -33,6 +35,6 @@
<!--packages-start-->

- xo-server patch
- xo-web patch
- xo-web minor

<!--packages-end-->
1 change: 1 addition & 0 deletions packages/xo-web/src/common/intl/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2628,6 +2628,7 @@ const messages = {
pifsNotAttached: 'Not all PIFs are attached',
pifsNotStatic: 'Not all PIFs are static',
replication: 'Replication',
replicationCountHigherThanHostsWithDisks: 'Replication count is higher than number of hosts with disks',
resourceList: 'Resource list',
rpuNoLongerAvailableIfXostor:
'As long as a XOSTOR storage is present in the pool, Rolling Pool Update will not be available',
Expand Down
6 changes: 6 additions & 0 deletions packages/xo-web/src/xo-app/xostor/new-xostor-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ const SummaryCard = decorate([

return (totalSize * state.numberOfHostsWithDisks) / state.replication.value
},
replicationNotValid: state => state.replication.value > state.numberOfHostsWithDisks,
},
}),
injectState,
Expand Down Expand Up @@ -549,6 +550,11 @@ const SummaryCard = decorate([
<Icon icon='alarm' /> {_('hostsNotSameNumberOfDisks')}
</p>
)}
{state.replicationNotValid && (
<p className='text-warning'>
<Icon icon='alarm' /> {_('replicationCountHigherThanHostsWithDisks')}
</p>
)}
<Row>
<Col size={6}>{_('keyValue', { key: _('name'), value: state.srName })}</Col>
<Col size={6}>
Expand Down
Loading