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 configdrive handling #900

Merged
merged 1 commit into from
Jun 16, 2021
Merged

Conversation

dtantsur
Copy link
Member

I've spotted a few errors with the configdrive handling:

  • We forgot to add configdrive to 'deploy failed' handler, so a repeated
    deployment will always happen without a configdrive.
  • ConfigDrive creation is conditional on UserData presence. This is
    incorrect, any field being populated should trigger configdrive.
  • There was no check on empty networkData, so we always tried to
    deserialize empty string with YAML (which works, but is incorrect).

Create a new helper for configdrive and cover it with unit tests.

@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 31, 2021
@dtantsur
Copy link
Member Author

/test-integration

@dtantsur
Copy link
Member Author

/test-integration

Copy link
Member

@zaneb zaneb left a comment

Choose a reason for hiding this comment

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

This would be slightly easier to review if the various fixes were in separate patches (within this PR).

/lgtm

pkg/provisioner/ironic/ironic.go Outdated Show resolved Hide resolved
@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 2, 2021
@hardys
Copy link
Member

hardys commented Jun 9, 2021

Overall lgtm but I think the revised logic still isn't quite correct, because we'll only pass the default meta-data when one of (meta|network|user)Data is specified?

Previously we only passed it when userData was specified, which I agree was incorrect, but I think the desired behavior is to always pass this metaData regardless of the user-provided data?

@dtantsur
Copy link
Member Author

dtantsur commented Jun 9, 2021

I think the desired behavior is to always pass this metaData regardless of the user-provided data?

I don't really know. It's a serious user-visible change. Could I follow-up with it, so that it can be reviewed separately (and reverted if things go south)?

@dtantsur
Copy link
Member Author

dtantsur commented Jun 9, 2021

I'll bring it to the meeting today. If there are no objections, I'll update the PR.

I've spotted a few errors with the configdrive handling:

* We forgot to add configdrive to 'deploy failed' handler, so a repeated
  deployment will always happen without a configdrive.
* ConfigDrive creation is conditional on UserData presence. This is
  incorrect, any field being populated should trigger configdrive.
* There was no check on empty networkData, so we always tried to
  deserialize empty string with YAML (which works, but is incorrect).

Create a new helper for configdrive, fix inline comments and cover
configdrive creation with unit tests.
@metal3-io-bot metal3-io-bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 9, 2021
@dtantsur
Copy link
Member Author

dtantsur commented Jun 9, 2021

/test-integration

@dtantsur
Copy link
Member Author

dtantsur commented Jun 9, 2021

/test-integration

I've reverted the change to always build a configdrive after realizing it may break live ISO. We may need to skip configdrive creating for live ISO.

@zaneb
Copy link
Member

zaneb commented Jun 15, 2021

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2021
@hardys
Copy link
Member

hardys commented Jun 16, 2021

/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elfosardo, hardys

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

The pull request process is described here

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 Jun 16, 2021
@metal3-io-bot metal3-io-bot merged commit 21ec248 into metal3-io:master Jun 16, 2021
@dtantsur dtantsur deleted the configdrive branch June 17, 2021 10:34
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants