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
#!/bin/bash | |
set -x | |
shell='user@ssh-host-on-ipmi-network' | |
ipmihost='192.168.1.16' | |
ifalias='127.0.0.2' | |
ports="80 443 623 5900 5901 5120 5123 8889" | |
for p in $ports; do | |
fwportspec=" ${fwportspec} -L $ifalias:$p:$ipmihost:$p " |
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
#!/bin/bash | |
mkrespjson=$( cat <<EOF | |
{ | |
"type": "fs", | |
"settings": { | |
"location": "/backups/snapshots/%s", | |
"compress": true |
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
Verifying that "1JsKW6wHZQPeaixCcmNYYQTVUTbL6RRZ7v.id" is my Blockstack ID. https://onename.com/1JsKW6wHZQPeaixCcmNYYQTVUTbL6RRZ7v |
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
./lookup_plugins/ec2_vpc_find_id.py | |
# | |
# Lookup VPC ID by name | |
# | |
from ansible.plugins.lookup import LookupBase | |
class LookupModule(LookupBase): | |
def run(self, terms, variables, **kwargs): |
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
#!/bin/bash | |
printf "PGID\tOSD\tPRIM\tERROR\n" | |
for pg in $(ceph pg dump pgs --format=json-pretty 2> /dev/null|jq -r '.[]|select (.state|test("inconsistent"))| .pgid'); do | |
res=$(rados list-inconsistent-obj $pg --format=json-pretty| jq -r '.inconsistents[].shards[]|select(.errors |length > 0)| [.osd,.primary,.errors[]]|@tsv') | |
printf "%s\t%s\t%s\t%s\n" $pg $res | |
done |
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
# Dump a PG mimic | |
ceph pg dump pgs --format=json-pretty |jq -r '.[]|select(.pgid == "<PGID>")' | |
# Dump a PG nautilus | |
ceph pg dump pgs --format=json-pretty |jq -r '.pg_stats[]|select(.pgid == "<PGID>")' | |
# Find inconsistent PG's mimic | |
ceph pg dump pgs --format=json-pretty 2> /dev/null|jq -r '.[]|select (.state|test("inconsistent"))| .pgid' |
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
#!/bin/env python3 | |
# pylint: disable=line-too-long | |
''' | |
get_latest_rpm_version: Get latest version of a rpm for patch date. | |
Author: Jiri Hoogeveen | |
Email: wica128@gmail.com | |
''' | |