This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 1958834 - Validate host credentials before saving the Host CR
Summary: Validate host credentials before saving the Host CR
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: General
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Future
Assignee: Arik
QA Contact: Ilanit Stein
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-10 09:17 UTC by Tzahi Ashkenazi
Modified: 2023-01-02 09:54 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-02 09:54:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
wrongnetwork (58.63 KB, image/png)
2021-05-10 09:17 UTC, Tzahi Ashkenazi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   MTV-325 0 None None None 2023-01-02 09:54:02 UTC

Description Tzahi Ashkenazi 2021-05-10 09:17:07 UTC
Created attachment 1781602 [details]
wrongnetwork

Description of problem:
from MTV UI under > providers > VMware > Hosts > Select migration network

providing wrong credentials on "Select migration network"- the failed network become the current, instead  of the previous active network 

scenario :
the active network was the "mgmt", after trying to change the network to "vmk1" network with wrong credentials, the failed network become the current network instead of the active one which is the "mgmt " 


please check the attached photo for more info 

Version-Release number of selected component (if applicable):
CNV: 2.6.2
MTV: 2.0.0.12

Comment 1 Fabien Dupont 2021-05-10 09:21:16 UTC
This is the expected behavior.

The user requested a change and it has been applied. The validation happens after the change and we don't track what the previous network was.

Comment 2 Daniel Gur 2021-05-10 14:23:56 UTC
so I guess the the suggestion should be change the order of things - first validate and then apply only if validation passed. That would be a better user experience  i think

Comment 3 Fabien Dupont 2021-05-10 15:25:39 UTC
But that is not a Kubernetes experience. Kubernetes is a declarative platform: you ask for something and if it can give it to you it will, otherwise it will fail and ideally tell you why.

The implementation is that a Host CR is created only when the user wants to specify the migration network. If there is no CR, the default network is used.
A Host CR must be associated to a Secret that stores the host credentials. The Host CR validation checks that all the required info is set: inventory reference, IP address and Secret reference.
And only when all information is provided does it check the credentials.

To revert to using the previous network would require two things:

1. Know the previous state of the Host CR. @jortel is it even available?
2. Delete the Host CR if the previous network was the default network. And that is the user's responsibility to delete the CRs.

Comment 4 Jeff Ortel 2021-05-10 15:48:57 UTC
(In reply to Fabien Dupont from comment #3)
...
> 
> To revert to using the previous network would require two things:
> 
> 1. Know the previous state of the Host CR. @jortel is it even
> available?

No.

Comment 5 Daniel Gur 2021-05-10 16:28:13 UTC
Move to RFE consider  it as a feature


Note You need to log in before you can comment on or make changes to this bug.