Created
November 16, 2019 02:57
-
-
Save venkataanil/200c8e0445f0661a211d70ee796f9951 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installing openvswitch (which requires wrappers as well) | |
note: "el7" are for RHEL7 and "el8" are for RHEL 8 | |
1) download the below files to undercloud and then copy them to controllers | |
wget http://download-node-02.eng.bos.redhat.com/brewroot/packages/openvswitch2.11/2.11.0/26.el7fdp/x86_64/openvswitch2.11-2.11.0-26.el7fdp.x86_64.rpm | |
wget http://download-node-02.eng.bos.redhat.com/brewroot/packages/openvswitch2.11/2.11.0/26.el7fdp/x86_64/python-openvswitch2.11-2.11.0-26.el7fdp.x86_64.rpm | |
and the rhosp wrappers | |
wget http://brew-task-repos.usersys.redhat.com/repos/official/rhosp-openvswitch/2.11/0.6.el7ost/noarch/rhosp-openvswitch-2.11-0.6.el7ost.noarch.rpm | |
wget http://brew-task-repos.usersys.redhat.com/repos/official/rhosp-openvswitch/2.11/0.6.el7ost/noarch/python-rhosp-openvswitch-2.11-0.6.el7ost.noarch.rpm | |
2) login to nodes using "public ip i.e 10.x and not 192.x" as 192.x is on switch, which will break the connection when we install ovs | |
3)) install in controller | |
yum install -y openvswitch2.11-2.11.0-26.el7fdp.x86_64.rpm rhosp-openvswitch-2.11-0.6.el7ost.noarch.rpm python-rhosp-openvswitch-2.11-0.6.el7ost.noarch.rpm python-openvs | |
witch2.11-2.11.0-26.el7fdp.x86_64.rpm | |
4) now install in all overcloud nodes | |
a) use the below python to get hostname from instackenv.json | |
import json | |
data = json.load(open('myinstackenv.json')) | |
for node in data['nodes']: | |
print(node['pm_addr'][5:]) | |
b)python gethostnames.py > hostnames_file | |
all hostnames are in above file | |
c) check if you can use below for loop properly :) | |
for i in `cat hostnames_file`; do ssh heat-admin@$i hostname; done | |
d) Now copy below rpms to all overcloud nodes(controllers and computes) | |
for i in `cat hostnames_file`; do scp *.rpm heat-admin@$i:~/; done | |
openvswitch2.11-2.11.0-26.el7fdp.x86_64.rpm python-openvswitch2.11-2.11.0-26.el7fdp.x86_64.rpm python-rhosp-openvswitch-2.11-0.6.el7ost.noarch.rpm rhosp-openvswitch-2.11-0.6.el7ost.noarch.rpm | |
e) install rpms in all nodes and restart openvswitch | |
for i in `cat 1`; do ssh heat-admin@$i "sudo yum install -y *.rpm"; done | |
for i in `cat 1`; do ssh heat-admin@$i "sudo systemctl restart openvswitch"; done | |
for i in `cat 1`; do ssh heat-admin@$i "sudo ovs-vsctl --version"; done | |
Installing ovn repos and containers | |
1) Get the hotfix tar file from https://bugzilla.redhat.com/attachment.cgi?id=1627652 | |
It will have old rpms. Remove old repos except libevent-2.0.21-4.el7.x86_64.rpm unbound-libs-1.6.6-1.el7.x86_64.rpm generate_hotfix.sh hotfix.yaml README | |
Download below new rpms into that hotfix and tar it again | |
wget http://download-node-02.eng.bos.redhat.com/brewroot/packages/openvswitch2.11/2.11.0/26.el7fdp/x86_64/openvswitch2.11-2.11.0-26.el7fdp.x86_64.rpm | |
wget http://download-node-02.eng.bos.redhat.com/brewroot/packages/openvswitch2.11/2.11.0/26.el7fdp/x86_64/python-openvswitch2.11-2.11.0-26.el7fdp.x86_64.rpm | |
wget http://brew-task-repos.usersys.redhat.com/repos/official/rhosp-openvswitch/2.11/0.6.el7ost/noarch/rhosp-openvswitch-2.11-0.6.el7ost.noarch.rpm | |
wget http://brew-task-repos.usersys.redhat.com/repos/official/rhosp-openvswitch/2.11/0.6.el7ost/noarch/python-rhosp-openvswitch-2.11-0.6.el7ost.noarch.rpm | |
wget http://download-node-02.eng.bos.redhat.com/brewroot/packages/openvswitch2.11/2.11.0/26.el7fdp/x86_64/openvswitch2.11-devel-2.11.0-26.el7fdp.x86_64.rpm | |
wget http://download-node-02.eng.bos.redhat.com/brewroot/packages/ovn2.11/2.11.1/12.el7fdp/x86_64/ovn2.11-2.11.1-12.el7fdp.x86_64.rpm | |
wget http://download-node-02.eng.bos.redhat.com/brewroot/packages/ovn2.11/2.11.1/12.el7fdp/x86_64/ovn2.11-central-2.11.1-12.el7fdp.x86_64.rpm | |
wget http://download-node-02.eng.bos.redhat.com/brewroot/packages/ovn2.11/2.11.1/12.el7fdp/x86_64/ovn2.11-host-2.11.1-12.el7fdp.x86_64.rpm | |
wget http://brew-task-repos.usersys.redhat.com/repos/official/rhosp-openvswitch/2.11/0.6.el7ost/noarch/rhosp-openvswitch-devel-2.11-0.6.el7ost.noarch.rpm | |
wget http://brew-task-repos.usersys.redhat.com/repos/official/rhosp-openvswitch/2.11/0.6.el7ost/noarch/rhosp-openvswitch-ovn-central-2.11-0.6.el7ost.noarch.rpm | |
wget http://brew-task-repos.usersys.redhat.com/repos/official/rhosp-openvswitch/2.11/0.6.el7ost/noarch/rhosp-openvswitch-ovn-common-2.11-0.6.el7ost.noarch.rpm | |
wget http://brew-task-repos.usersys.redhat.com/repos/official/rhosp-openvswitch/2.11/0.6.el7ost/noarch/rhosp-openvswitch-ovn-host-2.11-0.6.el7ost.noarch.rpm | |
2) tar that file and copy the tar from undercloud to one of the controllers | |
3) in controller | |
a) untar the hotfix file | |
b) cd hotfix-bz1733374-v5 | |
c) chmod 777 generate_hotfix.sh | |
d) sudo su | |
.e) ./generate_hotfix.sh (run generate_hotfix.sh as sudo user) | |
f) check docker images | |
[root@overcloud-controller-0 hotfix-bz1733374-v5]# sudo docker image ls | |
REPOSITORY TAG IMAGE ID CREATED SIZE | |
192.168.24.1:8787/rhosp13/openstack-ovn-northd 2019-09-24.1-hotfix-bz1733374-v5 7feed24cb44e 2 minutes ago 878 MB | |
192.168.24.1:8787/rhosp13/openstack-ovn-controller 2019-09-24.1-hotfix-bz1733374-v5 fbbd669b28ba 3 minutes ago 734 MB | |
g) push the images to controller | |
docker push 192.168.24.1:8787/rhosp13/openstack-ovn-northd:2019-09-24.1-hotfix-bz1733374-v5 | |
docker push 192.168.24.1:8787/rhosp13/openstack-ovn-controller:2019-09-24.1-hotfix-bz1733374-v5 | |
4) from undercloud pull the above images to all overcloud nodes | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do ssh heat-admin@192.168.24.$i sudo docker pull 192.168.24.1:8787/rhosp13/openstack-ovn-northd:2019-09-24.1-hotfix-bz1733374-v5; done | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do ssh heat-admin@192.168.24.$i sudo docker pull 192.168.24.1:8787/rhosp13/openstack-ovn-controller:2019-09-24.1-hotfix-bz1733374-v5; done | |
5) inside any controller | |
get the tag for ovn-northd like below from the docker images, which will be used in next step | |
[heat-admin@overcloud-controller-0 ~]$ sudo docker images | grep ovn | |
192.168.24.1:8787/rhosp13/openstack-ovn-northd 2019-09-24.1-hotfix-bz1733374-v5 7feed24cb44e 28 minutes ago 878 MB | |
192.168.24.1:8787/rhosp13/openstack-ovn-controller 2019-09-24.1-hotfix-bz1733374-v5 fbbd669b28ba 29 minutes ago 734 MB | |
6) inside undercloud, on all controllers | |
(undercloud) [stack@undercloud ~]$ for i in 8 27 9; do ssh heat-admin@192.168.24.$i sudo docker tag 7feed24cb44e 192.168.24.1:8787/rhosp13/openstack-ovn-northd:pcmklatest; done | |
6.a) inside any one controller, restart the pacemaker | |
sudo pcs resource restart ovn-dbs-bundle | |
7) use below python program to change '192.168.24.1:8787/rhosp13/openstack-ovn-controller:2019-09-24.1' to ' '192.168.24.1:8787/rhosp13/openstack-ovn-controller:2019-09-24.1-hotfix-bz1733374-v5' inside '/var/lib/tripleo-config/hashed-docker-container-startup-config-step_4.json' on all nodes | |
import json | |
configfile='/var/lib/tripleo-config/hashed-docker-container-startup-config-step_4.json' | |
data = json.load(open(configfile)) | |
data['ovn_controller']['image'] = '192.168.24.1:8787/rhosp13/openstack-ovn-controller:2019-09-24.1-hotfix-bz1733374-v5' | |
with open(configfile, 'w') as outfile: | |
json.dump(data, outfile) | |
8) copy above python program to all nodes and then run it. Remove ovn_controller and start again | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do scp myp.py heat-admin@192.168.24.$i:~/; done | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do ssh heat-admin@192.168.24.$i "sudo python myp.py"; done | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do ssh heat-admin@192.168.24.$i "sudo docker rm -f ovn_controller"; done | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do ssh heat-admin@192.168.24.$i "sudo paunch debug --file /var/lib/tripleo-config/hashed-docker-container-startup-config-step_4.json --container ovn_controller --action run"; done | |
9) ssh to any node and check ovn_controller version | |
(undercloud) [stack@undercloud ~]$ ssh heat-admin@192.168.24.48 | |
Warning: Permanently added '192.168.24.48' (ECDSA) to the list of known hosts. | |
[heat-admin@overcloud-5039mscompute-30 ~]$ sudo docker exec -it ovn_controller bash | |
()[root@overcloud-5039mscompute-30 /]# ovn-controller --version | |
ovn-controller (Open vSwitch) 2.11.1 | |
OpenFlow versions 0x4:0x4 | |
10) change probe intervals | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do ssh heat-admin@192.168.24.$i "sudo ovs-vsctl set open . external_ids:ovn-openflow-probe-interval=180"; done | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do ssh heat-admin@192.168.24.$i "sudo ovs-vsctl set open . external_ids:ovn-remote-probe-interval=180000"; done | |
check if we have updated properly | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do ssh heat-admin@192.168.24.$i "sudo ovs-vsctl set open . external_ids:ovn-remote-probe-interval=180000"; done | |
for i in `openstack server list -c Networks -f value | cut -d '.' -f4` ; do ssh heat-admin@192.168.24.$i "sudo ovs-vsctl set open . external_ids:ovn-openflow-probe-interval=180"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment