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
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.
oVirt 4.0 beta has been released, moving to RC milestone.
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.
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.""
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.
(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.
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
Verified on 4.1.0.1-0.1.el7