Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jimleitch01 on github.
  • I am jimleitch (https://keybase.io/jimleitch) on keybase.
  • I have a public key ASDZVUbMO73BuzpydZCGoLesZXHBF-k5nSyGGNHiagIXaQo

To claim this, I am signing this object:

guestmount -a Fedora-x86_64-20-20140407-sda.qcow2 -m /dev/sda1 /mnt
cd /mnt/etc
vi shadow
{replace "root" line with a root passwd entry from a system where you know the root pw}
cd
umount /mnt
On Cirros image:
$ rm index.html; wget http://169.254.169.254
Connecting to 169.254.169.254 (169.254.169.254:80)
index.html 100% |********************************| 98 0:00:00 ETA
On CentOS 6.4 image:
root@host-192-168-104-29 ~]# rm index.html; wget http://169.254.169.254
@jimleitch01
jimleitch01 / gist:a8bd486fe28e48362358
Last active August 29, 2015 14:08
Metadata connection refused
Starting kdump:[ OK ]
Starting cloud-init: ci-info: lo : 1 127.0.0.1 255.0.0.0 .
ci-info: eth0 : 1 192.168.104.29 255.255.255.0 fa:16:3e:1e:43:c2
ci-info: route-0: 192.168.104.0 0.0.0.0 255.255.255.0 eth0 U
ci-info: route-1: 169.254.0.0 0.0.0.0 255.255.0.0 eth0 U
ci-info: route-2: 0.0.0.0 192.168.104.25 0.0.0.0 eth0 UG
cloud-init start running: Sun, 02 Nov 2014 06:43:39 +0000. up 21.69 seconds
2014-11-02 01:43:39,331 - DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [0/120s]: url error [[Errno 111] Connection refused]
2014-11-02 01:43:40,343 - DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [1/120s]: url error [[Errno 111] Connection refused]
@jimleitch01
jimleitch01 / gist:d17efdc0700bc247e5bd
Created November 2, 2014 06:12
Metadata error text
No kdump initial ramdisk found.[WARNING]
Rebuilding /boot/initrd-2.6.32-358.el6.x86_64kdump.img
Starting kdump:[ OK ]
Starting cloud-init: ci-info: lo : 1 127.0.0.1 255.0.0.0 .
ci-info: eth0 : 1 192.168.104.27 255.255.255.0 fa:16:3e:34:ed:41
ci-info: route-0: 192.168.104.0 0.0.0.0 255.255.255.0 eth0 U
ci-info: route-1: 169.254.0.0 0.0.0.0 255.255.0.0 eth0 U
ci-info: route-2: 0.0.0.0 192.168.104.25 0.0.0.0 eth0 UG
cloud-init start running: Sun, 02 Nov 2014 06:10:03 +0000. up 33.89 seconds
2014-11-02 01:10:06,572 - DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [3/120s]: url error [[Errno 113] No route to host]
@jimleitch01
jimleitch01 / gist:c95d96f2b7f945ba518f
Created November 2, 2014 05:42
Forced install of IceHouse R4
#!/bin/bash
# Forced install of IceHouse R4, not Juno
yum install -y https://repos.fedorapeople.org/repos/openstack/openstack-icehouse/rdo-release-icehouse-4.noarch.rpm
yum install -y openstack-packstack
packstack --answer-file=~/answers.txt
@jimleitch01
jimleitch01 / gist:9379158563baf3649cb7
Created November 2, 2014 05:40
Big hammer - remove all OpenStack components
#!/bin/bash
#Big hammer - remove all OpenStack components
echo Warning Dangerous step hammer in action
read JIM
# Warning! Dangerous step! Destroys VMs
for x in $(virsh list --all | grep instance- | awk '{print $2}') ; do
virsh destroy $x ;
virsh undefine $x ;
@jimleitch01
jimleitch01 / gist:339592fe03cb800d6247
Created November 2, 2014 05:38
Stop and start OpenStack services
#!/bin/bash
#Stop and start OpenStack services
for service in `ls -1 /etc/init.d/openstack-*`
do
$service $1
done
for service in `ls -1 /etc/init.d/neutron-*`
do
@jimleitch01
jimleitch01 / gist:cf844a5d78f97073539d
Last active May 14, 2018 14:59
Script to delete and re-create openstack users and networks
#!/bin/bash
#Script to delete and re-create openstack users and networks
. ~/keystonerc_admin
echo "================"
echo "running $0"
echo "About to really clean up, type "yes" to continue"
read CONTINUE
@jimleitch01
jimleitch01 / gist:4d1883207ae993eb383f
Last active August 29, 2015 14:08
OpenStack Metadata Issue
Starting kdump:[ OK ]
Starting cloud-init: ci-info: lo : 1 127.0.0.1 255.0.0.0 .
ci-info: eth0 : 1 192.168.104.83 255.255.255.0 fa:16:3e:54:53:b0
ci-info: route-0: 192.168.104.0 0.0.0.0 255.255.255.0 eth0 U
ci-info: route-1: 169.254.0.0 0.0.0.0 255.255.0.0 eth0 U
ci-info: route-2: 0.0.0.0 192.168.104.25 0.0.0.0 eth0 UG
cloud-init start running: Sat, 01 Nov 2014 06:45:59 +0000. up 13.79 seconds
2014-11-01 02:45:59,606 - DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [0/120s]: url error [[Errno 111] Connection refused]
2014-11-01 02:46:00,609 - DataSourceEc2.py[WARNING]: 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [1/120s]: url error [[Errno 111] Connection refused]