{"push_id":991825438,"size":1,"distinct_size":1,"ref":"refs/heads/ca-106754","head":"9f11e83d4b6bf783c6b89455b54a85240c73a809","before":"767fefa1e074c405d54f21d5d0e6c077ba944934","commits":[{"sha":"9f11e83d4b6bf783c6b89455b54a85240c73a809","author":{"email":"a0992b7f1f450b4c7716d34b81a2d6f0877ae11a@citrix.com","name":"Si Beaumont"},"message":"CA-106754: Disallow bonding when more than one PIF has an IP config\n\nAny IPs on the non-primary bond-slaves would be lost.\n\nAn example of the old and new behaviour:\n\n    [root@dt04 ~]# xe pif-list device=eth1 --minimal\n    f628a46c-f483-897b-3234-aecc3c107d84\n    [root@dt04 ~]# xe pif-list device=eth2 --minimal\n    76472575-ef64-001f-4305-234e2dfc6f7c\n    [root@dt04 ~]# xe network-create name-label=bond-network\n    e7c98ee2-d000-477f-1692-2b6fd741dc3d\n\nBefore this patch\n-----------------\n\n    [root@dt04 ~]# xe pif-reconfigure-ip uuid=f628a46c-f483-897b-3234-aecc3c107d84 mode=static IP=10.0.0.1 netmask=255.255.255.0 gateway=10.0.0.0\n    [root@dt04 ~]# xe pif-reconfigure-ip uuid=76472575-ef64-001f-4305-234e2dfc6f7c mode=static IP=10.0.0.2 netmask=255.255.255.0 gateway=10.0.0.0\n\n    [root@dt04 ~]# ip address show xenbr1 | grep inet\n        inet 10.0.0.1/24 brd 10.0.0.255 scope global xenbr1\n    [root@dt04 ~]# ip address show xenbr2 | grep inet\n        inet 10.0.0.2/24 brd 10.0.0.255 scope global xenbr2\n\n    [root@dt04 ~]# xe bond-create pif-uuids=f628a46c-f483-897b-3234-aecc3c107d84,76472575-ef64-001f-4305-234e2dfc6f7c network-uuid=e7c98ee2-d000-477f-1692-2b6fd741dc3d\n    4a243b9c-6625-4bba-776a-f29873486f81\n\n    [root@dt04 ~]# xe bond-list uuid=4a243b9c-6625-4bba-776a-f29873486f81 params=master --minimal\n    8605deeb-76d4-9637-086f-512779f4c2c6\n\n    [root@dt04 ~]# xe pif-list uuid=f628a46c-f483-897b-3234-aecc3c107d84  params=device,IP\n        device ( RO): eth1\n            IP ( RO):\n    [root@dt04 ~]# xe pif-list uuid=76472575-ef64-001f-4305-234e2dfc6f7c params=device,IP\n        device ( RO): eth2\n            IP ( RO): 10.0.0.2\n    [root@dt04 ~]# xe pif-list uuid=8605deeb-76d4-9637-086f-512779f4c2c6 params=device,IP\n    device ( RO)    : bond0\n            IP ( RO): 10.0.0.1\n\n    [root@dt04 ~]# xe network-list uuid=e7c98ee2-d000-477f-1692-2b6fd741dc3d params=bridge --minimal\n    xapi1\n    [root@dt04 ~]# ip address show xapi1 | grep inet\n        inet 10.0.0.1/24 brd 10.0.0.255 scope global xapi1\n\nThere is no interface with the IP configuration that's on the other PIF since the xenbr2 iface has gone:\n\n    [root@dt04 ~]# ip address show xenbr2 | grep inet\n    Device \"xenbr2\" does not exist.\n\nAfter this patch\n----------------\n\n    [root@dt04 ~]# xe bond-create pif-uuids=f628a46c-f483-897b-3234-aecc3c107d84,76472575-ef64-001f-4305-234e2dfc6f7c network-uuid=e7c98ee2-d000-477f-1692-2b6fd741dc3d\n    Only one PIF on a bond is allowed to have an IP configuration.\n    <extra>: f628a46c-f483-897b-3234-aecc3c107d84\n    <extra>: 76472575-ef64-001f-4305-234e2dfc6f7c\n\nRemoving the IP config from either PIF will then allow the Bond.create to succeed:\n\n    [root@dt04 ~]# xe pif-reconfigure-ip uuid=f628a46c-f483-897b-3234-aecc3c107d84 mode=none\n    [root@dt04 ~]# xe bond-create pif-uuids=f628a46c-f483-897b-3234-aecc3c107d84,76472575-ef64-001f-4305-234e2dfc6f7c network-uuid=e7c98ee2-d000-477f-1692-2b6fd741dc3d\n    f8e5baf8-b620-31e5-abb8-3e3fb214c08d\n\nSigned-off-by: Si Beaumont <simon.beaumont@citrix.com>","distinct":true,"url":"https://api.github.com/repos/simonjbeaumont/xen-api/commits/9f11e83d4b6bf783c6b89455b54a85240c73a809"}]}