Bug 1324482 - [Text] - Improve error message for 'network attachment not exist entity' for updating and removing network
Summary: [Text] - Improve error message for 'network attachment not exist entity' for ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.0.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ovirt-4.1.0-beta
: 4.1.0
Assignee: Martin Mucha
QA Contact: Ori Ben Sasson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-06 12:42 UTC by Michael Burman
Modified: 2017-02-01 14:53 UTC (History)
5 users (show)

Fixed In Version: http://resources.ovirt.org/repos/ovirt/experimental/4.1/latest.tested/rpm/el7/noarch/
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:53:45 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)
engine log (122.19 KB, application/x-gzip)
2016-04-06 12:42 UTC, Michael Burman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 61193 0 master MERGED core: replace vague error message with specific ones. 2016-12-22 13:00:29 UTC
oVirt gerrit 69439 0 ovirt-engine-4.1 MERGED core: replace vague error message with specific ones. 2017-01-02 16:24:51 UTC
oVirt gerrit 70562 0 master MERGED webadmin: fixed invalid error message 2017-01-16 14:45:15 UTC
oVirt gerrit 70651 0 ovirt-engine-4.1 MERGED webadmin: fixed invalid error message 2017-01-17 15:16:27 UTC

Description Michael Burman 2016-04-06 12:42:43 UTC
Created attachment 1144219 [details]
engine log

Description of problem:
[Text] - Improve error message for 'network attachment not exist entity' for updating and removing network.

When we have scenario in which we trying to update or to remove network that is no longer exist on the host we have 2 different error messages, but they are not clear and we can't understand from the error messages if it related to the remove network operation or to the update network operation. 

I suggest to improve the error messages for such scenario and be clear about the action, remove or update . 

Version-Release number of selected component (if applicable):
4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos.noarch

How reproducible:
100

Steps to Reproduce:

Scenario1(remove network that doesn't exist):
1. Open engine UI in 2 different tabs(same session)
2. Attach network to host NIC via 1 tab(setup networks)
3. Open setup networks in both tabs and remove the network form the host NIC via 1 tab.
4. Try to remove the same network from the host NIC via tab 2
   
Scenario2(update network that doesn't exist ):
1. Open engine UI in 2 different tabs(same session)
2. Attach network to host NIC via 1 tab and give it static ip and netmask(setup networks)
3. Open setup networks in both tabs and remove the network form the host NIC via 1 tab.
4. On the second tab try to update the network with none bootproto

Actual results:

- Scenario1(remove):

Error while executing action:

orchid-vds1.qa.lab.tlv.redhat.com:

    Cannot setup Networks. Following Network Attachments do not exist: 25764b19-6be1-4ce1-856e-06f38c5c7ba6.

- Scenario2(update):

Error while executing action: 

orchid-vds1.qa.lab.tlv.redhat.com:
Cannot setup Networks. Given Network Attachment (id '649d73d4-2109-4b5f-bca3-5a4f7d0d8dac') does not exist.

Expected results:
Error messages should be improved and more clear about the action that failed. 

Additional info:
See also - BZ 1279791

Comment 1 Sandro Bonazzola 2016-05-02 10:05:25 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 2 Yaniv Lavi 2016-05-23 13:20:06 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 3 Yaniv Lavi 2016-05-23 13:23:39 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 4 Martin Mucha 2016-07-21 14:09:31 UTC
1. we can see, that there's 2 messages for same 'missing network_attachment'. This is caused by bad internationalization design, where 2 messages are needed, one for singular and one for plural message. So this 2 messages for same stuff is cause by fact, that on 1 place there was missing size check (which ideally should not be needed at all). I fixed that. Now in both cases it should produce: "Cannot setup Networks. Given Network Attachment (id '649d73d4-2109-4b5f-bca3-5a4f7d0d8dac') does not exist."

2. reason for failure in both cases is same. NetworkAttachment is missing. This is the true case of failure. Validator is currently shared among all usages (not in this dialog only) and usually it does not reflect user action in failure. SetupNetworks is "do-it-all" kind of command, and it would be really hard to include 'what is user doing' into each possible failure, since there are too many possible usecases. From rest point of view, produced message is OK. From UI point of view it's totally not OK, but I believe this is normal behavior of our app.

Comment 5 Michael Burman 2016-12-26 08:44:13 UTC
Hi Martin,

I'm testing this bug on 4.1.0-0.3.beta2.el7 and i really can't understand what exactly was changed here, i'm getting the same behavior as described in the description.
I get 2 different messages for the 2 scenarios just like it was before.

- Scenario1(remove):

"Cannot setup Networks. Following Network Attachments do not exist: 0d0d3d0a-77a7-4e2e-b580-0249ecba74af."

- Scenario2(update):

"Cannot setup Networks. Given Network Attachment (id '0d0d3d0a-77a7-4e2e-b580-0249ecba74af') does not exist."

Am i missing something? please tell)
In comment #4 you wrote:

"Now in both cases it should produce: "Cannot setup Networks. Given Network Attachment (id '649d73d4-2109-4b5f-bca3-5a4f7d0d8dac') does not exist.""

Comment 6 Dan Kenigsberg 2016-12-26 10:57:55 UTC
Michael, I am sorry, but this bug was moved to ON_QA by a robot who made a mistake. It is not yet merged into the stable branch.

Comment 7 Martin Mucha 2017-01-02 15:09:55 UTC
(In reply to Michael Burman from comment #5)
> Hi Martin,
> 
> I'm testing this bug on 4.1.0-0.3.beta2.el7 and i really can't understand
> what exactly was changed here, i'm getting the same behavior as described in
> the description.
> I get 2 different messages for the 2 scenarios just like it was before.
> 
> - Scenario1(remove):
> 
> "Cannot setup Networks. Following Network Attachments do not exist:
> 0d0d3d0a-77a7-4e2e-b580-0249ecba74af."
> 
> - Scenario2(update):
> 
> "Cannot setup Networks. Given Network Attachment (id
> '0d0d3d0a-77a7-4e2e-b580-0249ecba74af') does not exist."
> 
> Am i missing something? please tell)
> In comment #4 you wrote:
> 
> "Now in both cases it should produce: "Cannot setup Networks. Given Network
> Attachment (id '649d73d4-2109-4b5f-bca3-5a4f7d0d8dac') does not exist.""

sorry for confusion.
• if you do not see changes, it probably mean, that this was not merged soon enough and needs to be backported. Therefore I backported this now, and it hopefully will be in next version.

• comment 4 is now outdated. We decided not to work with plurals anymore, and new version contains 3 different message depending on action user performs. Please check:
https://gerrit.ovirt.org/#/c/61193/7/frontend/webadmin/modules/frontend/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties

Thanks.

Comment 8 Ori Ben Sasson 2017-01-05 11:43:20 UTC
Hi,

For update i get invalid error message:
Cannot setup Networks. Updated Network Attachment (id '${NETWORK_ATTACHMENT_NOT_EXISTS_ENTITY}') does not exist.

For remove network from setup network i get correct message:
Cannot setup Networks. Cannot remove following Network Attachments, because they do not exist: 3552dbc1-8d52-49bf-9650-725e89b76327.

Checked on oVirt Engine Version: 4.1.0-0.4.master.20170104181027.gitab0e3f4.el7.cento

Comment 9 Ori Ben Sasson 2017-01-22 10:19:51 UTC
Verified on 4.1.0.1-0.1.el7


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