Skip to content

Change default of RAIDInterface#829

Merged
metal3-io-bot merged 1 commit intometal3-io:masterfrom
iurygregory:fix_raid
Mar 24, 2021
Merged

Change default of RAIDInterface#829
metal3-io-bot merged 1 commit intometal3-io:masterfrom
iurygregory:fix_raid

Conversation

@iurygregory
Copy link
Copy Markdown
Member

@iurygregory iurygregory commented Mar 23, 2021

Instead of using "" we will be using no-raid.
The support for RAID was considering RAIDInterface defaul value as ""
to generate the clean steps, this is causing errors in vmedia
deployments with idrac because it uses no-raid:

"Node failed to start the first cleaning step. Error: node does not support
this clean step: {'interface': 'raid', 'step': 'delete_configuration'}"

@metal3-io-bot metal3-io-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 23, 2021
@iurygregory
Copy link
Copy Markdown
Member Author

/test-integration

Comment thread pkg/provisioner/ironic/ironic.go Outdated
func (p *ironicProvisioner) buildManualCleaningSteps() (cleanSteps []nodes.CleanStep, err error) {
// Build raid clean steps
if p.bmcAccess.RAIDInterface() != "" {
if p.bmcAccess.RAIDInterface() != "" && p.bmcAccess.RAIDInterface() != "no-raid" {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I don't think it's correct to ever assume that the default (empty string) means no-raid, since that's only true in the case of one driver (that doesn't return "" - see #319). I think a real fix would be to explicitly set the RAID interface in every BMC driver and only check for no-raid here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I can go and change the bmcs with "" to no-raid and update this here =)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to look for the string no-raid or do we want a bmcAccess method like RAIDSupported() that returns a bool?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dhellmann I would say it's fair to look at no-raid since this would say raid it's not supported, so having no-raid as default instead of "" would be better

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Instead of using `""` we will be using `no-raid`.
The support for RAID was considering  RAIDInterface defaul value as `""`
to generate the clean steps, this is causing errors in vmedia
deployments with idrac because it uses `no-raid`:

"Node failed to start the first cleaning step. Error: node does not support
this clean step: {'interface': 'raid', 'step': 'delete_configuration'}"
@metal3-io-bot metal3-io-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 24, 2021
@iurygregory iurygregory changed the title Fix raid support when node is using no-raid Change default of RAIDInterface Mar 24, 2021
@iurygregory
Copy link
Copy Markdown
Member Author

/test-integration


func (a *testAccessDetails) RAIDInterface() string {
return ""
return "no-raid"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using a constant for such value?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can probably think about creating possible values for raid as a constant (In a different PR I would say, since this is blocking deployments with virtual media)

@dtantsur
Copy link
Copy Markdown
Member

/approve

I agree re adding a constant, but otherwise the change is correct.

@metal3-io-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtantsur, iurygregory

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 24, 2021
@zaneb
Copy link
Copy Markdown
Member

zaneb commented Mar 24, 2021

+1 for a constant but since the world is broken let's fix that first.
/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 24, 2021
@metal3-io-bot metal3-io-bot merged commit 5ebf0ab into metal3-io:master Mar 24, 2021
@iurygregory iurygregory deleted the fix_raid branch February 6, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants