Bug 1412563 - parse arp_ip_target with multiple ip properly
Summary: parse arp_ip_target with multiple ip properly
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: ---
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-4.1.1
: 4.19.5
Assignee: Dominik Holler
QA Contact: Michael Burman
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-12 10:06 UTC by Kapetanakis Giannis
Modified: 2017-04-21 09:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-04-21 09:42:06 UTC
oVirt Team: Network
rule-engine: ovirt-4.1+

Attachments (Terms of Use)
screenshot-1 (17.03 KB, image/png)
2017-01-13 08:16 UTC, Kapetanakis Giannis
no flags Details
screenshot-2 (17.24 KB, image/png)
2017-01-13 08:16 UTC, Kapetanakis Giannis
no flags Details

System ID Private Priority Status Summary Last Updated
oVirt gerrit 70923 0 master MERGED engine: normalize bonding options without miimon 2017-01-26 11:12:49 UTC
oVirt gerrit 70943 0 master MERGED net: link.bond - handling of arp_ip_target 2017-02-01 11:38:32 UTC
oVirt gerrit 71508 0 ovirt-4.1 MERGED net: Enable bond to handle empty defaults for options 2017-02-06 12:25:28 UTC
oVirt gerrit 71509 0 ovirt-4.1 MERGED net: link.bond - handling of arp_ip_target 2017-02-06 12:25:24 UTC
oVirt gerrit 71552 0 ovirt-4.1 MERGED net: replace ifcfg bond options defaults handling 2017-02-06 12:25:21 UTC

Description Kapetanakis Giannis 2017-01-12 10:06:36 UTC
Don't know if this is related with https://bugzilla.redhat.com/show_bug.cgi?id=1391130

In the Web interface (Setup Host Networks) I can see information for the custom bonding but it's wrong:

"switch": "legacy",
"options": "mode=1 arp_interval=1000 arp_ip_target=, primary=p5p

BONDING_OPTS='mode=1 arp_interval=1000 arp_ip_target=, primary=p5p1'

In the gui it shows:

" arp_interval=1000 mode=1 arp_ip_target= primary=p5p1"

There are two errors:
1) One space in front
2) is missing from arp_ip_target

Comment 1 Dan Kenigsberg 2017-01-12 18:58:08 UTC
Could you add a screenshot?

Comment 2 Kapetanakis Giannis 2017-01-13 08:16:02 UTC
Created attachment 1240253 [details]

Comment 3 Kapetanakis Giannis 2017-01-13 08:16:29 UTC
Created attachment 1240254 [details]

Comment 4 Dan Kenigsberg 2017-01-15 10:30:55 UTC
bug 1391130 referred only to visual alignment. here we have a problem with content, which was not fixed.

Could you help a bit more by providing `vdsClient -s getVdsCaps` from the host, to make sure the problem is only on Engine?

Comment 5 Kapetanakis Giannis 2017-01-15 20:46:50 UTC
bondings = {'bond0': {'active_slave': 'p5p1',
                              'addr': '',
                              'cfg': {'BONDING_OPTS': 'mode=1 arp_interval=1000 arp_ip_target=, primary=p5p1',
                                      'BOOTPROTO': 'none',
                                      'DEFROUTE': 'yes',
                                      'DEVICE': 'bond0',
                                      'DNS1': 'xxx,
                                      'DNS2': 'xxx',
                                      'GATEWAY': '',
                                      'IPADDR': '',
                                      'IPV6INIT': 'no',
                                      'MTU': '1500',
                                      'NETMASK': '',
                                      'NM_CONTROLLED': 'no',
                                      'ONBOOT': 'yes'},

The vds seems fine to me.

Comment 6 Kapetanakis Giannis 2017-01-15 20:49:59 UTC
A question: Where does the engine get these details? Are they stored in the database or does it query the client?

Comment 7 Dan Kenigsberg 2017-01-15 22:14:46 UTC
Engine does both: it stores BONDING_OPTS in its DB, and it calls Vdsm's getVdsCaps. It seems that Engine's front end bulks on an option with a comma in its value.

However, which Vdsm version do you use? the output of getVdsCaps in comment 5 seems partial. It should have had an 'opts': {'mode': '0'....} line.

Comment 8 Kapetanakis Giannis 2017-01-16 08:22:06 UTC
yes i missed that line:

'opts': {'arp_interval': '1000',
         'arp_ip_target': '',
         'mode': '1',
         'primary': 'p5p1'},

It shows only one IP there.


Comment 9 Dan Kenigsberg 2017-01-16 08:40:37 UTC
So Engine is not to blame. What's in ifcfg-bond0 and /sys/class/net/bond0/bonding/arp_ip_target ?

Comment 10 Kapetanakis Giannis 2017-01-16 08:46:11 UTC
BONDING_OPTS='mode=1 arp_interval=1000 arp_ip_target=, primary=p5p1'


Bonding Mode: fault-tolerance (active-backup)
Primary Slave: p5p1 (primary_reselect always)
ARP Polling Interval (ms): 1000
ARP IP target/s (n.n.n.n form):,

All there are correct

Comment 11 Dan Kenigsberg 2017-01-16 09:01:01 UTC
vdsm should report space-separated arp_ip_target option properly.

The kernel converted "," to "".

We (Engine+Vdsm) should decide on one separator (either space of comma) and use it for both input and output.

Comment 12 Kapetanakis Giannis 2017-01-16 09:12:31 UTC
Also keep in mind (comment 1) that the UI also adds a wrong space in front of the options

Comment 13 Dan Kenigsberg 2017-01-16 09:14:15 UTC
Kapetanakis, could you tell if setting a space-separated list works?

"mode=1 arp_interval=1000 arp_ip_target='' primary=p5p1"

note that you'd still see it reported badly in GUI, but I'd like to know if anything else (including REST and /sys/class/net/bond0/bonding/arp_ip_target) works fine.

Comment 14 Kapetanakis Giannis 2017-01-16 09:24:13 UTC
The UI does not let me to set it up like this.

Comment 15 Michael Burman 2017-02-13 08:23:19 UTC
Only one issue of two has fixed on this build.

Engine and vdsm report now multiple IPs for arp_ip_target.

The cosmetic gap wasn't fix.

Setting to verified and will report new bug for the cosmetic UI gap. 

Verified on - 4.1.1-0.1.el7 and vdsm-4.19.5-1.el7ev.x86_64

Comment 16 Kapetanakis Giannis 2017-02-20 10:37:33 UTC
About the second bug, it's not just cosmetic.
If you leave the space in front then you cannot apply/ok as the UI get's it as an error. You have to manually (guess and) delete the space to OK.

Is there a bug id for this submitted?

Comment 17 Dominik Holler 2017-02-20 11:17:53 UTC
This behavior occurs, if the option "miimon" is missing.

During formatting the options string the "mode" and "miimon" options are placed together at first place in the string, and the other options are separated by a space. If one of the "mode" and "miimon" options is missing, nothing is placed before the space.

Comment 18 Dominik Holler 2017-02-20 11:33:07 UTC
This issue if fixed by https://gerrit.ovirt.org/#/c/70923/ in master. If this issue is very urgent, please file a new bug.

Comment 19 Michael Burman 2017-03-07 07:05:01 UTC
(In reply to Dominik Holler from comment #18)
> This issue if fixed by https://gerrit.ovirt.org/#/c/70923/ in master. If
> this issue is very urgent, please file a new bug.

See BZ 1429810

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