3 # This delivers the compute upgrade script to be invoked as part of the tripleo
4 # major upgrade workflow.
8 UPGRADE_SCRIPT=/root/tripleo_upgrade_node.sh
10 cat > $UPGRADE_SCRIPT << ENDOFCAT
11 ### DO NOT MODIFY THIS FILE
12 ### This file is automatically delivered to the compute nodes as part of the
13 ### tripleo upgrades workflow
17 # pin nova to kilo (messaging +-1) for the nova-compute service
19 crudini --set /etc/nova/nova.conf upgrade_levels compute $upgrade_level_nova_compute
22 # Special-case OVS for https://bugs.launchpad.net/tripleo/+bug/1635205
23 if [[ -n \$(rpm -q --scripts openvswitch | awk '/postuninstall/,/*/' | grep "systemctl.*try-restart") ]]; then
24 echo "Manual upgrade of openvswitch - restart in postun detected"
25 mkdir OVS_UPGRADE || true
27 echo "Attempting to downloading latest openvswitch with yumdownloader"
28 yumdownloader --resolve openvswitch
29 echo "Updating openvswitch with nopostun"
30 rpm -U --nopostun ./*.rpm
33 echo "Skipping manual upgrade of openvswitch - no restart in postun detected"
36 yum -y install python-zaqarclient # needed for os-collect-config
41 # ensure the permissions are OK
42 chmod 0755 $UPGRADE_SCRIPT