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

Bug 1852473: kubevirt: fix importing VMs with same vnicIDs for ovirt provider #5871

Merged
merged 1 commit into from Jul 2, 2020

Conversation

atiratree
Copy link
Member

  • don't allow Pod networks for such nics
  • allow only same network values for nics with same vnicID

@openshift-ci-robot openshift-ci-robot added the component/kubevirt Related to kubevirt-plugin label Jul 1, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 1, 2020
@atiratree atiratree changed the title kubevirt: fix importing VMs with same vnicIDs for ovirt provider Bug 1852473 - kubevirt: fix importing VMs with same vnicIDs for ovirt provider Jul 1, 2020
@atiratree
Copy link
Member Author

nics with same nic profiles:

net1

editing:

net2

after edit both get changed
net3

and vice versa (works in any direction)

net4

net5

please review @yaacov @pcbailey @irosenzw @glekner

@atiratree
Copy link
Member Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@suomiy: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

/bugzilla refresh

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.

@atiratree atiratree changed the title Bug 1852473 - kubevirt: fix importing VMs with same vnicIDs for ovirt provider Bug 1852473: kubevirt: fix importing VMs with same vnicIDs for ovirt provider Jul 1, 2020
@openshift-ci-robot openshift-ci-robot added 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. labels Jul 1, 2020
@openshift-ci-robot
Copy link
Contributor

@suomiy: This pull request references Bugzilla bug 1852473, 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.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1852473: kubevirt: fix importing VMs with same vnicIDs for ovirt provider

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.

@@ -90,15 +90,25 @@ export const getDisks = (vm: OvirtVM, storageClassConfigMap: ConfigMapKind): VMW

export const getNics = (vm: OvirtVM): VMWizardNetwork[] => {
const getUniqueName = createUniqueNameResolver(vm.nics);
const nics = (vm.nics || []).filter((n) => n);
const nics = (vm.nics || []).filter(
(nic) => nic && nic.name && nic.vnicid != null && nic.vnicid !== '',
Copy link
Member

Choose a reason for hiding this comment

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

can we use the ? notation here ?
nic?. ...1

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@@ -253,7 +263,11 @@ export const NICModal = withHandlePromise((props: NICModalProps) => {
network={resultNetwork}
onChange={onNetworkChoiceChange}
nads={nads}
allowPodNetwork={allowPodNetwork}
allowPodNetwork={
editConfig?.allowPodNetworkOverride != null
Copy link
Member

Choose a reason for hiding this comment

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

does editConfig?.allowPodNetworkOverride || allowPodNetwork makes sense here ?

Copy link
Member Author

Choose a reason for hiding this comment

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

what do you mean by "make sense"?
Pod network is allowed only for one nic in kubevirt, so we have to disable it here for duplicate networks.

Copy link
Member

@yaacov yaacov Jul 2, 2020

Choose a reason for hiding this comment

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

what do you mean by "make sense"?

a != null ? a : b
can be a || b

… provider

- don't allow Pod networks for such nics
- allow only same network values for nics with same vnicID
@yaacov
Copy link
Member

yaacov commented Jul 2, 2020

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: suomiy, yaacov

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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2020
@openshift-merge-robot openshift-merge-robot merged commit bcda40e into openshift:master Jul 2, 2020
@openshift-ci-robot
Copy link
Contributor

@suomiy: All pull requests linked via external trackers have merged: openshift/console#5871. Bugzilla bug 1852473 has been moved to the MODIFIED state.

In response to this:

Bug 1852473: kubevirt: fix importing VMs with same vnicIDs for ovirt provider

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. component/kubevirt Related to kubevirt-plugin lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants