[baremetal] Retry cinder.controller on failure
[fuel.git] / mcp / config / states / dpdk
1 #!/bin/bash -e
2 ##############################################################################
3 # Copyright (c) 2017 Mirantis Inc., Enea AB and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x
11
12 # shellcheck disable=SC1090
13 source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh"
14
15 salt -I 'nova:compute' system.reboot
16 wait_for 90 "! salt -I 'nova:compute' test.ping | " \
17   "tee /dev/stderr | grep -Fq 'Not connected'"
18 salt -I 'nova:compute' state.sls linux.network
19
20 # switch to UCA repos since fuel-infra packages have bugs
21 salt -I 'nova:compute' cmd.run 'rm -vrf /etc/apt/preferences.d/*'
22 salt -I 'nova:compute' file.remove '/etc/apt/sources.list.d/mirantis_openstack.list'
23 salt -I 'nova:compute' pkg.refresh_db
24
25 salt -I 'nova:compute' pkg.install libvirt-bin
26 salt -I 'nova:compute' file.chown /var/run/openvswitch libvirt-qemu kvm