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

fix(xo-server,xo-web/SR/new): fix reattach button not displayed for HBA #7986

Merged
merged 6 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 3 additions & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

> Users must be able to say: “I had this issue, happy to know it's fixed”

- [SR/New] Fix reattach button not displayed for HBA (PR [#7986](https://github.com/vatesfr/xen-orchestra/pull/7986))

### Packages to release

> When modifying a package, add it here with its release type.
Expand All @@ -33,5 +35,6 @@

- @xen-orchestra/log minor
- xo-server minor
- xo-web patch

<!--packages-end-->
2 changes: 1 addition & 1 deletion packages/xo-server/src/api/sr.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export async function createHba({ host, nameLabel, nameDescription, scsiId, srUu
uuid: srUuid,
nameLabel,
nameDescription,
type: 'hba',
type: 'lvmohba', // SR LVM over HBA https://team.vates.fr/vates/pl/wuedob5cj3bfbmbzeyjjpnxpda
deviceConfig,
})
}
Expand Down
18 changes: 2 additions & 16 deletions packages/xo-web/src/xo-app/new/sr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,22 +281,7 @@ export default class New extends Component {
srUuid
),
smb: () => createSrSmb(host.id, name.value, description.value, server.value, username.value, password.value),
hba: async () => {
if (srUuid === undefined) {
const previous = await probeSrHbaExists(host.id, scsiId)
if (previous && previous.length > 0) {
try {
await confirm({
title: _('existingLunModalTitle'),
body: <p>{_('existingLunModalText')}</p>,
})
} catch (error) {
return
}
}
}
return createSrHba(host.id, name.value, description.value, scsiId, srUuid)
},
hba: async () => createSrHba(host.id, name.value, description.value, scsiId, srUuid),
MathieuRA marked this conversation as resolved.
Show resolved Hide resolved
iscsi: async () => {
if (srUuid === undefined) {
const previous = await probeSrIscsiExists(
Expand Down Expand Up @@ -415,6 +400,7 @@ export default class New extends Component {

_handleSrHbaSelection = async scsiId => {
this.setState({
existingSrs: await probeSrHbaExists(this.state.host.id, scsiId),
scsiId,
usage: true,
})
Expand Down
Loading