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

storage: Robustify thin pool resizing #19443

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/storaged/crypto-keyslots.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export function get_existing_passphrase(block, just_type) {

export function request_passphrase_on_error_handler(dlg, vals, recovered_passphrase, block) {
return function (error) {
if (vals.passphrase === undefined) {
if (vals.passphrase === undefined && block) {
return (passphrase_test(block, recovered_passphrase)
.then(good => {
if (!good)
Expand Down
16 changes: 15 additions & 1 deletion pkg/storaged/lvol-tabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ function perc(ratio) {
export class PoolVolTab extends React.Component {
render() {
const self = this;
const client = self.props.client;
const lvol = self.props.lvol;
const vgroup = client.vgroups[lvol.VolumeGroup];

function rename() {
lvol_rename(self.props.lvol);
Expand All @@ -143,6 +146,17 @@ export class PoolVolTab extends React.Component {
grow_dialog(self.props.client, self.props.lvol, { });
}

let grow_excuse = null;
if (vgroup.FreeSize == 0) {
grow_excuse = (
<div>
{_("Not enough space to grow.")}
<br />
{_("Free up space in this group: Shrink or delete other logical volumes or add another physical volume.")}
</div>
);
}

return (
<DescriptionList className="pf-m-horizontal-on-sm">
<DescriptionListGroup>
Expand All @@ -160,7 +174,7 @@ export class PoolVolTab extends React.Component {
<DescriptionListDescription>
{utils.fmt_size(this.props.lvol.Size)}
<DescriptionListDescription className="tab-row-actions">
<StorageButton onClick={grow}>{_("Grow")}</StorageButton>
<StorageButton excuse={grow_excuse} onClick={grow}>{_("Grow")}</StorageButton>
</DescriptionListDescription>
</DescriptionListDescription>
</DescriptionListGroup>
Expand Down