Bug 1308336
Summary: | [SetupNetworks old API] update network to have IP cause the network to be out of sync | ||||||
---|---|---|---|---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Meni Yakove <myakove> | ||||
Component: | BLL.Network | Assignee: | Martin Mucha <mmucha> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Michael Burman <mburman> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 3.6.3.1 | CC: | alkaplan, bugs, danken, mmucha, ylavi | ||||
Target Milestone: | ovirt-3.6.3 | Keywords: | Regression | ||||
Target Release: | 3.6.3.2 | Flags: | rule-engine:
ovirt-3.6.z+
rule-engine: blocker+ ylavi: planning_ack+ danken: devel_ack+ myakove: testing_ack+ |
||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-02-18 11:11:54 UTC | 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: | |||||||
Attachments: |
|
Description
Meni Yakove
2016-02-14 11:53:33 UTC
This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP. I think, that you cannot use: <ip netmask="255.255.255.0" address="1.1.1.1"/> mentioned in 'additional comments'. If you use that, nothing will fail, because schema is not validated(?), but there aren't such parameters in Ip element. That is defined: <xs:complexType name="Ip"> <xs:sequence> <xs:element maxOccurs="1" minOccurs="0" name="address" type="xs:string"/> <xs:element maxOccurs="1" minOccurs="0" name="gateway" type="xs:string"/> <xs:element maxOccurs="1" minOccurs="0" name="netmask" type="xs:string"/> <xs:element maxOccurs="1" minOccurs="0" name="version" type="xs:string"/> </xs:sequence> </xs:complexType> so you must use: <ip> <address>192.168.1.11</address> <gateway>192.168.1.12</gateway> <netmask>255.255.255.0</netmask> </ip> In your example you're simply clearing setting all three values to null. What do you mean "I cannot use"? this is what we are sending and it works. We had an interface with network attached to it and we update the network to have IP (without gateway) and we sending address and netmask so how we clear those values? (In reply to Meni Yakove from comment #3) > What do you mean "I cannot use"? this is what we are sending and it works. > We had an interface with network attached to it and we update the network to > have IP (without gateway) and we sending address and netmask so how we clear > those values? I can be wrong (although I don't know where), you may be using it correctly and it may work for you (although I don't know how that would be possible). If it is the case, I'd be grateful if you can explain how is it possible ... Why I think it wrong: Excerpt from api.xsd clearly specifies, that address, gateway … must be subelements and not parameters. I tried debug both ways yesterday, and it seemed, that if you don't use 'subelement' way, your data will be only ignored. method to look at is: org.ovirt.engine.api.restapi.resource.BackendHostNicsResource#toParameters I used this resource: POST http://localhost:8080/ovirt-engine/api/hosts/0543e921-835d-4a87-8ca4-5341eeee3e42/nics/setupnetworks and if I made only change in ip configuration using: <ip address="192.168.1.11" gateway="192.168.1.12" netmask="255.255.255.0"/> the SetupNetworkCommand is not even executed ~ as it fails to detect any changes (method "noChangesDetected"). Created attachment 1127545 [details]
content of my request
(In reply to Martin Mucha from comment #4) > (In reply to Meni Yakove from comment #3) > > What do you mean "I cannot use"? this is what we are sending and it works. > > We had an interface with network attached to it and we update the network to > > have IP (without gateway) and we sending address and netmask so how we clear > > those values? > > I can be wrong (although I don't know where), you may be using it correctly > and it may work for you (although I don't know how that would be possible). > If it is the case, I'd be grateful if you can explain how is it possible ... > > Why I think it wrong: > Excerpt from api.xsd clearly specifies, that address, gateway … must be > subelements and not parameters. I tried debug both ways yesterday, and it > seemed, that if you don't use 'subelement' way, your data will be only > ignored. > > method to look at is: > org.ovirt.engine.api.restapi.resource.BackendHostNicsResource#toParameters > > I used this resource: > POST > http://localhost:8080/ovirt-engine/api/hosts/0543e921-835d-4a87-8ca4- > 5341eeee3e42/nics/setupnetworks > > and if I made only change in ip configuration using: > <ip address="192.168.1.11" gateway="192.168.1.12" netmask="255.255.255.0"/> > > the SetupNetworkCommand is not even executed ~ as it fails to detect any > changes (method "noChangesDetected"). note: I wasn't correct. There's change in api between 3.6 and 4.0. In 3.6 correct syntax is exactly like meni described. Subelements are required from 4.0 on. Sorry for confusion. Verified on - 3.6.3.2-0.1.el6 |