Bug 842137

Summary: Backend should allow gateway for non-management networks if it was reported by host
Product: Red Hat Enterprise Virtualization Manager Reporter: Moti Asayag <masayag>
Component: ovirt-engineAssignee: Moti Asayag <masayag>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Pavlik <mpavlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: dyasny, gklein, iheim, lpeer, mavital, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: si12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 841559    

Description Moti Asayag 2012-07-22 13:42:40 UTC
Description of problem:
If the gateway for a non-management network was reported by the host, it will be present to the user via the rest-api.

The backend should allow getting unmodified gateway from the clients, without failing the command with NETWORK_ATTACH_ILLEGAL_GATEWAY.

In addition, it should not allow receiving 0.0.0.0 as a gateway if it wasn't reported from the host as a gateway for non-management network.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:

1. Update nic via rest-api with gateway set to 0.0.0.0 for non management network.
2. Verify the host reports no gateway for that network
3. post the change  

Actual results:
Action succeeded.

Expected results:
Updaing the nic should fail with NETWORK_ATTACH_ILLEGAL_GATEWAY can-do-action message

Additional info:

Comment 2 Moti Asayag 2012-07-24 15:46:12 UTC
suggested patch: http://gerrit.ovirt.org/#/c/6585/

The backend will not store the gateway for non-management networks, therefore nor rest-api nor webadmin should encounter the error above. The client

An attempt to set gateway for non-management networks will fail with can-do-action message: NETWORK_ATTACH_ILLEGAL_GATEWAY

Comment 3 Moti Asayag 2012-07-25 08:55:21 UTC
Commit-id: bd9aa2adcca10d6e61585e68d0822949d1a888f9