Created attachment 958447 [details] engine.log Description of problem: When setting invalid MacPoolRange in engine-config andd NIC to VM fail while MAC Addresses pool manager failed to initializing. The validation of invalid MAC range should be in engine-config Version-Release number of selected component (if applicable): rhevm-3.5.0-0.19.beta.el6ev.noarch Steps to Reproduce: 1. engine-config -s MacPoolRanges=FF:00:00:00:00:00-FF:00:00:00:00:01 2. Restart ovirt-engine service 3. Add NIC to VM Actual results: Add NIC failed Expected results: Add NIC succeeded
To my understanding there are three issues here: 1. When running engine-config with MacPoolRanges that contains invalid addresses, a warning error should have been printed that the ranges were trimmed (and possibly some more information about the trimming). 2. Engine should probably handle an empty MacPoolRanges entry upon startup, rather than fail to initialize MacPoolManager, so that when an attempt is made to create a new vNIC a proper error will be shown (similar to MAC pool exhaustion). 3. In the very specific case when trying to set ranges that get trimmed to the point where no valid address remains, perhaps the engine-config command should fail altogether. Since all of this becomes irrelevant in 3.6, I would make sure that (1) works (as it should have been implemented already), and implement (2). (3) would require more complex code and I don't find it necessary.
Not quite a regression in my opinion, a behavior change that in most cases is nicer and in one edge case acts a little worse. Still worth fixing for 3.5 though.
The same error validation should be for: RHEVM is supposed to remove Multicast MAC addresses form MAC range, lets see what happens if the only MAC specified is multicast- engine-config -s MaxMacsCountInPool=1 engine-config -s MacPoolRanges=01:00:5E:28:23:01-01:00:5E:28:23:01 engine shouldn't accept such range, since there is no ordinary MACs left, But engine actually accept this range, but after restarting engine, you can't add nic to VM. with error in GUI: Error while executing action: Admins_: General command validation failure. Lior, When i tested this, invalid ranges on the older builds, engine was blocking me from accepting such invalid ranges on the engine-config.
I thought that's exactly what Meni did?...
Meni did other invalid range. It's just another example. Just wanted to add, that all invalid ranges used to be blocked by the engine-config..
Ack, all such scenarios should be handled the same way after this fix... For you to verify after the next build :)
(In reply to Michael Burman from comment #5) > The same error validation should be for: > RHEVM is supposed to remove Multicast MAC addresses form MAC range, lets see > what happens if the only MAC specified is multicast- > engine-config -s MaxMacsCountInPool=1 > engine-config -s MacPoolRanges=01:00:5E:28:23:01-01:00:5E:28:23:01 > > engine shouldn't accept such range, since there is no ordinary MACs left, > But engine actually accept this range, but after restarting engine, you > can't add nic to VM. with error in GUI: > Error while executing action: > > Admins_: > > General command validation failure. > > Lior, When i tested this, invalid ranges on the older builds, engine was > blocking me from accepting such invalid ranges on the engine-config. yesterday was merged updated code: response for: engine-config -s MacPoolRanges=01:00:5E:28:23:01-01:00:5E:28:23:01 is now: WARNING: User supplied range(Range[1101091316481,1101091316481]) contains only multicast addresses, so this range is not usable. Cannot set value 01:00:5E:28:23:01-01:00:5E:28:23:01 to key MacPoolRanges. The entered ranges is invalid. 01:00:5E:28:23:01-01:00:5E:28:23:01 contains no valid MAC addresses. note that warning is (usually) present only in logs, so user will (usually) see only second line.
Verified on - 3.5.0-0.23.beta.el6ev - invalid values such as: engine-config -s MacPoolRanges=01:00:5E:28:23:01-01:00:5E:28:23:01 engine-config -s MacPoolRanges=FF:00:00:00:00:00-FF:00:00:00:00:01 get: 'Cannot set value FF:00:00:00:00:00-FF:00:00:00:00:01 to key MacPoolRanges. The entered ranges is invalid. FF:00:00:00:00:00-FF:00:00:00:00:01 contains no valid MAC addresses.' - invalid values such as: engine-config-s MacPoolRanges=01:00:5E:28:23:01-01:00:5E:28:23:01,FF:00:00:00:00:00-FF:00:00:00:00:01 get: 'Cannot set value 01:00:5E:28:23:01-01:00:5E:28:23:01,FF:00:00:00:00:00-FF:00:00:00:00:01 to key MacPoolRanges. The entered ranges is invalid. 01:00:5E:28:23:01-01:00:5E:28:23:01,FF:00:00:00:00:00-FF:00:00:00:00:01 contains no valid MAC addresses.' - both ranges are invalid in this case. - valid and invalid values such as: engine-config -s MacPoolRanges=FF:00:00:00:00:00-FF:00:00:00:00:01,F0:00:00:00:00:00-F0:00:00:00:00:01 engine-config -s MacPoolRanges=FF:00:00:00:00:00-FF:00:00:00:00:01,00:00:00:00:00:00-00:00:00:00:00:01 get no error or blocked by engine, because one of the ranges entered is a valid MAC addresses.
rhev 3.5.0 was released. closing.