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 1874055: report errors when v2v-vmware ConfigMap is not available #6480

Conversation

atiratree
Copy link
Member

  • either due to permission issues or if missing
  • show if required ConfigMap attributes are missing per each provider

Signed-off-by: Ido Rosenzwig <irosenzw@redhat.com>
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high 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 Aug 31, 2020
@openshift-ci-robot
Copy link
Contributor

@suomiy: This pull request references Bugzilla bug 1874055, 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 1874055: report errors when v2v-vmware CondifMap is not available

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 component/kubevirt Related to kubevirt-plugin approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 31, 2020
@atiratree
Copy link
Member Author

@irosenzw @glekner @yaacov @matthewcarleton Please review

this PR builds on #6437 and also fixes https://bugzilla.redhat.com/show_bug.cgi?id=1871109

@atiratree
Copy link
Member Author

the errors when starting the controller

no permissions:

1

config map missing

2

required fields missing (per provider)

RHV/oVirt

3

vmWare

4

@atiratree atiratree force-pushed the kv.change-import-error-no-permissions branch from d21f853 to 8ef2dcf Compare August 31, 2020 19:23
@atiratree atiratree changed the title Bug 1874055: report errors when v2v-vmware CondifMap is not available Bug 1874055: report errors when v2v-vmware ConfigMap is not available Aug 31, 2020
@matthewcarleton
Copy link
Contributor

matthewcarleton commented Aug 31, 2020

the errors when starting the controller

no permissions:

1

It might be more useful to swap the text here. The first thing they'll probably want to see is that they need to contact their admin and then see the info why.

config map missing

2

Nit: Should say "cannot be found in any of"
General question - will users know what v2v means? is that how it's written in the configmap?

required fields missing (per provider)

RHV/oVirt

3

No period in title

vmWare

4

No period in title

I'm not sure we need to hide things in the expand area for these. It seems better to not require the user to click to understand things better IMO.

kubevirtVmwareConfigMap = await getVmwareConfigMap();
} catch (error) {
if (error?.json.code === 403) {
throw new K8sDetailError({
Copy link
Contributor

Choose a reason for hiding this comment

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

who catches the error ? isn't it the catch in line 169 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, that is just a catch to test the presence of the deployment. The error will get caught in vmware/ovirt provider actions and saved to redux.

- either due to permission issues or if missing
- show if required ConfigMap attributes are missing per each provider
@atiratree atiratree force-pushed the kv.change-import-error-no-permissions branch from 8ef2dcf to 3b283e2 Compare September 1, 2020 09:32
@atiratree
Copy link
Member Author

fixed the messages

a

b

@atiratree
Copy link
Member Author

General question - will users know what v2v means? is that how it's written in the configmap?

v2v-vmware is the name of the config map. There is an effort to rename it, but not in this release

@atiratree
Copy link
Member Author

I generalized the approach to 403 errors so it can be reused by any user of cleanupAndGetResults

k8sGet: (kind: K8sKind, name: string, namespace: string) => Promise<K8sResourceKind>,
counter: number = 30,
) => {
const waitForUploadReady = async (dataVolume: K8sResourceKind, counter: number = 30) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

@glekner I noticed EnhancedK8sMethods are used in cdi upload even though their functionality is never triggered so I reverted back to normal K8s* methods. Let me know if I missed something and they are indeed needed.

providerType === VMImportProvider.VMWARE ? VMWARE_DOCURL : OVIRT_DOCURL;

const resolveUIMessageTemplating = (message: string, provider: VMImportProvider) => {
if (!message) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if message is null or undefined ?

Copy link
Member Author

Choose a reason for hiding this comment

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

that shouldn't be an issue as it will just pass through any empty value without a change

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

frontend/packages/kubevirt-plugin/src/constants/v2v.ts Outdated Show resolved Hide resolved
frontend/packages/kubevirt-plugin/src/constants/v2v.ts Outdated Show resolved Hide resolved
- add another option to cleanupAndGetResults
@atiratree atiratree force-pushed the kv.change-import-error-no-permissions branch from a650afe to 031814e Compare September 1, 2020 11:55
@irosenzw
Copy link
Contributor

irosenzw commented Sep 2, 2020

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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-merge-robot openshift-merge-robot merged commit 879f6cb into openshift:master Sep 2, 2020
@openshift-ci-robot
Copy link
Contributor

@suomiy: All pull requests linked via external trackers have merged:

Bugzilla bug 1874055 has been moved to the MODIFIED state.

In response to this:

Bug 1874055: report errors when v2v-vmware ConfigMap is not available

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.

@spadgett spadgett added this to the v4.6 milestone Sep 11, 2020
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-high Referenced Bugzilla bug's severity is high 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

7 participants