Re: OSA and bridge_role=primary on boot

2017-04-25 Thread Viktor Mihajlovski
On 25.04.2017 13:44, Benjamin Jakob Zimmermann wrote:
> Hello,
> I am using debian stretch and I am trying to have openvswitch to work right
> after rebooting the machine.
> 
> So far, I manually configure the card with znetconf and then start
> openvswitch and then manually bring up the interfaces.
> 
> To visualize my approach, I list the commands (bridge and port had already
> been added to ovs beforehand):
> # znetconf -a [ccwdev0] -o layer2=1 -o bridge_role=primary
> # systemctl start openvswitch-switch
> # ip l s [ccwdev0] up
> # ip l s br0 up
> 
> Everything works out fine, I can now live migrate vm's via virsh.
> 
> What options do I have to add to
> /etc/sysconfig/hardware/config-ccw-0.0.[ccwdev0] to set the bridge_role
> when the interface is brought up?
> 
> Best,
> Benjamin.
> 
Hi,

I fear there's no out-of-the box support for the bridge_role property in
sysconfig-hardware. As a temporary circumvention you could apply the
following change in /etc/sysconfig/scripts/hardware/hwup-ccw-group:

1. locate the line containing
write_setting "portno" "$QETH_PORTNO'
2. insert the following line
write_setting "bridge_role" "$QETH_BRIDGE_ROLE'

Then you can add
 QETH_BRIDGE_ROLE=primary
to the config file.

Needless to say that this will not survive a package update. You might
be better served by setting the property in a post-up command for the
interface.

I am not really sure whether it makes sense to add more properties to
the sysconfig handling because in the long run persistent CCW device
configurations should be done using chzdev, see
https://www.ibm.com/developerworks/linux/linux390/s390-tools-1.33.0.html#newtools
On the other hand, this will probably not happen for stretch :-(.

-- 

Mit freundlichen Grüßen/Kind Regards
   Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294



OSA and bridge_role=primary on boot

2017-04-25 Thread Benjamin Jakob Zimmermann
Hello,
I am using debian stretch and I am trying to have openvswitch to work right
after rebooting the machine.

So far, I manually configure the card with znetconf and then start
openvswitch and then manually bring up the interfaces.

To visualize my approach, I list the commands (bridge and port had already
been added to ovs beforehand):
# znetconf -a [ccwdev0] -o layer2=1 -o bridge_role=primary
# systemctl start openvswitch-switch
# ip l s [ccwdev0] up
# ip l s br0 up

Everything works out fine, I can now live migrate vm's via virsh.

What options do I have to add to
/etc/sysconfig/hardware/config-ccw-0.0.[ccwdev0] to set the bridge_role
when the interface is brought up?

Best,
Benjamin.