Skip to content

Bug 1816714: ovirt - add vnic profile id to platform#3406

Merged
openshift-merge-robot merged 3 commits intoopenshift:masterfrom
rgolangh:bz1816714
May 6, 2020
Merged

Bug 1816714: ovirt - add vnic profile id to platform#3406
openshift-merge-robot merged 3 commits intoopenshift:masterfrom
rgolangh:bz1816714

Conversation

@rgolangh
Copy link
Copy Markdown
Contributor

@rgolangh rgolangh commented Apr 3, 2020

The vnic profile that all the VM shares can now be configurable through
the platform.
The wizard will also ask to the user the choose one, in case there are multiple profiles per network.

platform:
  ovirt:
    vnicProfileID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

@rgolangh rgolangh force-pushed the bz1816714 branch 2 times, most recently from 5f9076b to eaced32 Compare April 3, 2020 13:13
@rgolangh
Copy link
Copy Markdown
Contributor Author

rgolangh commented Apr 3, 2020

@patrickdillon @wking PTAL

@rgolangh rgolangh changed the title ovirt: add vnic profile Bug 1816714: ovirt - add vnic profile id to platform Apr 3, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Apr 3, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rgolangh: This pull request references Bugzilla bug 1816714, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1816714: ovirt - add vnic profile id to platform

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rgolangh: This pull request references Bugzilla bug 1816714, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1816714: ovirt - add vnic profile id to platform

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@Jmainguy
Copy link
Copy Markdown

Jmainguy commented Apr 3, 2020

code looks solid to my noob eyeballs, nice work

@sdodson
Copy link
Copy Markdown
Member

sdodson commented Apr 7, 2020

/cc @Gal-Zaidman @sandrobonazzola
/approve

@sdodson
Copy link
Copy Markdown
Member

sdodson commented Apr 7, 2020

/retest

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 7, 2020
@abonillabeeche
Copy link
Copy Markdown

Is this fix already in a nightly build?

@sdodson
Copy link
Copy Markdown
Member

sdodson commented Apr 8, 2020

Is this fix already in a nightly build?

no, it wouldn't be in a build if it hasn't merged

@sferich888
Copy link
Copy Markdown
Contributor

sferich888 commented Apr 14, 2020

/cherry-pick release-4.4

Cherrypicking this for https://bugzilla.redhat.com/show_bug.cgi?id=1820575

@openshift-cherrypick-robot
Copy link
Copy Markdown

@sferich888: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sferich888
Copy link
Copy Markdown
Contributor

/retest

@patrickdillon
Copy link
Copy Markdown
Contributor

/assign

@sdodson
Copy link
Copy Markdown
Member

sdodson commented Apr 14, 2020

@Gal-Zaidman @sandrobonazzola can you please review the ovirt specific bits here while installer team takes on review of the generic components

@patrickdillon
Copy link
Copy Markdown
Contributor

The CI failure indicates a problem when ovirt_vnic_profile_id is not set in the install-config: https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/openshift_installer/3406/pull-ci-openshift-installer-master-e2e-ovirt/1470

I don't think ovirt_vnic_profile_id can be set to required in order to maintain backward compatibility. Previously a default value was being set here: https://github.com/openshift/installer/pull/3406/files#diff-4f2a1c1c86a37e0831ca92d07d3f6949L25

Can we assume that default if the variable is not set in the install config? Ideally that would be done outside of terraform and passed in tfvars. If you need to do it in terraform, you will need to set a default value for the variable--but (again) doing this in go and not terraform is easier/cleaner.

@rgolangh
Copy link
Copy Markdown
Contributor Author

The CI failure indicates a problem when ovirt_vnic_profile_id is not set in the install-config: https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/openshift_installer/3406/pull-ci-openshift-installer-master-e2e-ovirt/1470

I don't think ovirt_vnic_profile_id can be set to required in order to maintain backward compatibility. Previously a default value was being set here: https://github.com/openshift/installer/pull/3406/files#diff-4f2a1c1c86a37e0831ca92d07d3f6949L25

Can we assume that default if the variable is not set in the install config? Ideally that would be done outside of terraform and passed in tfvars. If you need to do it in terraform, you will need to set a default value for the variable--but (again) doing this in go and not terraform is easier/cleaner.

The assumption is what cause the bug - there is no way to 'guess' the vnic profile name and choosing the first one in the list is a poor choice. That heuristic is my terrible mistake.

Like you mentioned, getting the defaults from go is much more desirable and I'll look for a clean way to do it.

@rgolangh rgolangh force-pushed the bz1816714 branch 2 times, most recently from fa64f87 to d12512d Compare April 24, 2020 23:38
@rgolangh
Copy link
Copy Markdown
Contributor Author

/test e2e-ovirt

@rgolangh rgolangh force-pushed the bz1816714 branch 2 times, most recently from 516b2b4 to 0414c6d Compare April 28, 2020 14:31
@rgolangh
Copy link
Copy Markdown
Contributor Author

/retest

Comment thread pkg/asset/cluster/tfvars.go Outdated
Comment on lines 442 to 452
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't this logic only be run if installConfig.Config.Platform.Ovirt.VNICProfileID is not set?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

right, I missed it during the refactoring. adding back

Comment thread pkg/asset/cluster/tfvars.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If i understand correctly this is different default behavior than what you're replacing, but that behavior would be considered a bug so this is ok, in my opinion.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

right.

@rgolangh rgolangh force-pushed the bz1816714 branch 2 times, most recently from 9339ec8 to 7f10dfd Compare May 1, 2020 15:20
@patrickdillon
Copy link
Copy Markdown
Contributor

I will try to summarize Slack conversation:

It doesn't look like this will set VNIC profile ID for compute nodes.

ovirt MachinePools are being added in #3399
the VNIC profile ID will also need to be added to the machine provider

Is there a benefit from merging this before these changes? What is the effect when the changes happen on control plane but not compute?

@rgolangh rgolangh closed this May 2, 2020
@rgolangh rgolangh reopened this May 2, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rgolangh: This pull request references Bugzilla bug 1816714, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1816714: ovirt - add vnic profile id to platform

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. label May 2, 2020
@rgolangh
Copy link
Copy Markdown
Contributor Author

rgolangh commented May 3, 2020

I will try to summarize Slack conversation:

It doesn't look like this will set VNIC profile ID for compute nodes.

Vnic and network name are currently generic definition that goes into the template creation. Both masters and workers gets them because they use the same template.
As far as what this bug is about, this solves them urgent problem.

ovirt MachinePools are being added in #3399
the VNIC profile ID will also need to be added to the machine provider

The cluster api provider still doesn't support customizing the nics of a machine.
I need to know now if it is acceptable to have a vnic id in the platform level and then override them in the machine config. If not then I need to add vnic into the machine pool ASAP

Is there a benefit from merging this before these changes? What is the effect when the changes happen on control plane but not compute?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This validation is providing a default value, but I think you are already doing that elsewhere. Validation should be checking that if a user provides a value then it is valid.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is replying nil if valid (line 63) or error in some cases. Maybe your are talking about the 2nd use of it.?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The way I am reading this code:
if user provided a vnic profile ID: do nothing (it is valid)
if user did not provide a vnic profile ID: see if you can determine a default or else return an error

What I was expecting:
if user provided a vnic profile ID: validate (use API to determine if user provided value is correct)
if user did not provide: do nothing (default will be assigned later)

Does that make sense? I could definitely have mistaken assumptions here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ack

@rgolangh
Copy link
Copy Markdown
Contributor Author

rgolangh commented May 4, 2020

@patrickdillon it really seems that adding this to machine spec makes more sense. So I added openshift/cluster-api-provider-ovirt#45 and this will find its way into #3399
After that I'll move vnic_profile_id from platform and into machine pool

rgolangh added 2 commits May 5, 2020 23:19
Signed-off-by: Roy Golan <rgolan@redhat.com>
Signed-off-by: Roy Golan <rgolan@redhat.com>
The vnic profile that all the VM shares can now be configurable through
the platform and is part of the wizard, in case there are multiple for the
selected network.

```yaml
platform:
  ovirt:
    vnicProfileID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

Signed-off-by: Roy Golan <rgolan@redhat.com>
@rgolangh
Copy link
Copy Markdown
Contributor Author

rgolangh commented May 5, 2020

/test e2e-ovirt

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rgolangh: This pull request references Bugzilla bug 1816714, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)
Details

In response to this:

Bug 1816714: ovirt - add vnic profile id to platform

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rgolangh
Copy link
Copy Markdown
Contributor Author

rgolangh commented May 6, 2020

/test e2e-ovirt

@rgolangh
Copy link
Copy Markdown
Contributor Author

rgolangh commented May 6, 2020

/test e2e-openstack

@patrickdillon
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 6, 2020
@abhinavdahiya
Copy link
Copy Markdown
Contributor

/approve

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, sdodson

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:
  • OWNERS [abhinavdahiya,sdodson]

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

@openshift-merge-robot openshift-merge-robot merged commit 7737b2a into openshift:master May 6, 2020
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@rgolangh: All pull requests linked via external trackers have merged: openshift/installer#3406. Bugzilla bug 1816714 has been moved to the MODIFIED state.

Details

In response to this:

Bug 1816714: ovirt - add vnic profile id to platform

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-cherrypick-robot
Copy link
Copy Markdown

@sferich888: #3406 failed to apply on top of branch "release-4.4":

Applying: ovirt: Add platform validation
error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	pkg/asset/installconfig/installconfig.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/asset/installconfig/installconfig.go
CONFLICT (content): Merge conflict in pkg/asset/installconfig/installconfig.go
Patch failed at 0002 ovirt: Add platform validation

Details

In response to this:

/cherry-pick release-4.4

Cherrypicking this for https://bugzilla.redhat.com/show_bug.cgi?id=1820575

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. bugzilla/severity-urgent Referenced Bugzilla bug's severity is urgent for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants