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 el in $(ls /var/log/containers); do cp -v /var/log/containers/nova/impl_rabbit.py /var/log/containers/${el}; done | |
for el in $(infect_who_use_oslo messaging); do \ | |
name=$(echo $el | awk -F "_" '{print $1}'); \ | |
echo -e "patch ${name}\n"; \ | |
docker exec -it --user root ${el} cp /var/log/${name}/impl_rabbit.py /usr/lib/python2.7/site-packages/oslo_messaging/_drivers; \ | |
docker restart ${el}; \ | |
done | |
curl -4 https://review.opendev.org/changes/643056/revisions/current/patch?download | base64 -d | sudo patch -p1 |
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
# On controllers | |
# ssh heat-admin@<controller-ip> | |
for el in $(sudo docker ps | grep nova | awk '{print $1}'); do sudo docker restart $el; 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
import logging | |
logging.basicConfig() | |
logging.getLogger().setLevel(logging.DEBUG) | |
logging.getLogger('foo').debug('bah') | |
logging.getLogger().setLevel(logging.INFO) | |
logging.getLogger('foo').debug('debug') | |
logging.getLogger('foo').info('info') | |
logging.getLogger('foo').warn('warn') |
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/sh | |
ipmitool -I lanplus -H 172.16.0.1 -L ADMINISTRATOR -p 6232 -U admin -R 12 -N 5 -Ppassword power status | |
ipmitool -I lanplus -H 172.16.0.1 -L ADMINISTRATOR -p 6232 -U admin -R 12 -N 5 -Ppassword power off | |
sleep 2 | |
ipmitool -I lanplus -H 172.16.0.1 -L ADMINISTRATOR -p 6232 -U admin -R 12 -N 5 -Ppassword power status |
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
from inspect import signature | |
import copy | |
def expected(key, sign): | |
for el in sign.parameters.values(): | |
if key in el.name: | |
return True | |
return False |
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
generated from /usr/share/openstack-tripleo-heat-templates *and* /usr/share/openstack-puppet/modules/tripleo | |
edit this file /usr/share/openstack-puppet/modules/tripleo/manifests/profile/base/nova.pp | |
you will see the class '::nova::cache' just change the hardcoded backend there |
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 | |
set -e | |
containers_total=${1:-100} | |
containers_concur=${2:-10} | |
container_image=${3:-docker.io/library/busybox} | |
podman pull $container_image | |
docker pull $container_image | |
rm -f bench-jobs.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
export OS_PROJECT_DOMAIN_NAME='Default' | |
export OS_USER_DOMAIN_NAME='Default' | |
export OS_PROJECT_NAME='admin' | |
export OS_USERNAME='admin' | |
export OS_AUTH_URL=http://192.168.24.2:5000/ | |
export OS_AUTH_TYPE='password' | |
export OS_IDENTITY_API_VERSION='3' | |
export OS_PASSWORD=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) |
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 | |
# remove old fix container | |
podman rm -f fix | |
# patch container with debug changes | |
podman run --name=fix -u root --net=host -it 192.168.122.1:5000/fedora-binary-nova-api:ospsprint bash -c "curl http://file.cdg.redhat.com/hberaud/context.py -o /tmp/context.py && mv /tmp/context.py /usr/lib/python3.6/site-packages/nova && cat /usr/lib/python3.6/site-packages/nova/context.py" | |
# commit changes to apply debug changes | |
podman commit --change CMD='kolla_start' fix 192.168.122.1:5000/fedora-binary-nova-api:ospsprint | |
# remove fix container generated | |
podman rm -f fix | |
# redeploy and catch debug traces |
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
scp memcache.py [email protected]:public_html/ |