This file contains hidden or 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
#!/bin/bash | |
. stackrc | |
for failed in $(heat resource-list \ | |
--nested-depth 5 overcloud | grep FAILED | | |
grep 'StructuredDeployment ' | cut -d '|' -f3) | |
do heat deployment-show $failed > failed_deployment_$failed.log | |
done |
This file contains hidden or 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
for i in `ironic node-list --maintenance true --field uuid | awk 'NR>3 && $0 ~! /^\+/ {print $2}'`; do ironic node-set-maintenance $i false; done |
This file contains hidden or 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
NUMBER_OF_LINES = 51 | |
Date.prototype.addDays = function(days) { | |
var dat = new Date(this.valueOf()); | |
dat.setDate(dat.getDate() + days); | |
return dat; | |
} | |
function getNextValidDateFrom(addDay) { | |
var nextValid = new Date().addDays(addDay); |
This file contains hidden or 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
#!/usr/bin/bash | |
set -eu | |
IMAGE="${1:?'Provide a image name'}" | |
# Next line was first seen used under the magic finger of dciabrin and we shall love him for that forever. | |
CMD=$(docker inspect --format='{{range .Config.Env}} -e "{{.}}" {{end}} {{range .Mounts}} -v {{.Source}}:{{.Destination}}{{if .Mode}}:{{.Mode}}{{end}}{{end}} -ti {{.Config.Image}}' docker-puppet-${IMAGE} ) | |
echo "Command to use to re-run manually:\ndocker run -u root --net=host ${CMD}\n" |
This file contains hidden or 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
grep 'RESP BODY:' toto.txt | sed -e 's/RESP BODY: *//' | jq '.output | select(. != "{}")' | grep -v '^null$' |jq '. | fromjson | .output' | awk 'BEGIN{end=0};{if(end == 0){print $0}}/^}$/{end=1}'> run0 | |
jq '.stdout' -r run0 > run0.out | |
grep 'RESP BODY:' toto.txt | sed -e 's/RESP BODY: *//' | jq '.output | select(. != "{}")' | grep -v '^null$' |jq '. | fromjson | .output' | awk 'BEGIN{end=0};{if(end == 1){print $0}}/^}$/{end=1}'> run1 | |
jq '.stdout' -r run1 > run1.out |
This file contains hidden or 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
# 1. Create compute-host-to-exclude.txt | |
# one ip of compute nodes to be excluded from the update by line For | |
# instance this give the list of all compute node minus one. those | |
# will be disable, letting only one computed being updated. | |
# openstack server list -f json | \ | |
# jq -r 'map(select(.Name |contains("compute")))[0:-1] | .[].Networks' \ | |
# | awk -F= '{print $2}' > compute-host-to-exclude.txt |
This file contains hidden or 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
#!/usr/bin/env bash | |
if ! which virsh >/dev/null 2>&1; then | |
exit 0 | |
fi | |
VIRSH="virsh" | |
action_snapshot() | |
{ |
OlderNewer