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() | |
{ |
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
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
#!/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
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
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
#!/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
heat_template_version: 2014-10-16 | |
description: > | |
Extra config to add swap space to nodes. | |
# Parameters passed from the parent template - note if you maintain | |
# out-of-tree templates they may require additional parameters if the | |
# in-tree templates add a new role. | |
parameters: | |
controller_servers: |
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
Modified lib/puppet/provider/mongodb.rb | |
diff --git a/lib/puppet/provider/mongodb.rb b/lib/puppet/provider/mongodb.rb | |
index 6bbc350..d82fa83 100644 | |
--- a/lib/puppet/provider/mongodb.rb | |
+++ b/lib/puppet/provider/mongodb.rb | |
@@ -55,8 +55,11 @@ class Puppet::Provider::Mongodb < Puppet::Provider | |
if bindip | |
first_ip_in_list = bindip.split(',').first | |
- if first_ip_in_list.eql? '0.0.0.0' |
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/ruby | |
require 'faraday' | |
require 'json' | |
conn = Faraday.new(:url => 'http://localhost:5000') | |
responce = conn.post do |post| | |
post.url '/v3/auth/tokens' | |
post.headers['Content-Type'] = 'application/json' | |
post.body = { |
NewerOlder