Skip to content

Instantly share code, notes, and snippets.

🏡
Working from home

Hervé Beraud 4383

🏡
Working from home
Block or report user

Report or block 4383

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@4383
4383 / overload.log
Last active Oct 3, 2019
openstack overload logs
View overload.log
Sep 24 13:19:39 overcloud-controller-0 dockerd-current[14639]: 2019/09/24 13:19:39 grpc: Server.processUnaryRPC failed to write status: stream error: code = 4 desc = "context deadline exceeded"
Sep 24 18:21:11 overcloud-controller-0 kernel: neutron-server invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=0
Sep 24 18:21:11 overcloud-controller-0 kernel: Out of memory: Kill process 20674 (collectd) score 650 or sacrifice child
Sep 24 18:21:11 overcloud-controller-0 kernel: Out of memory: Kill process 22087 (writer#1) score 650 or sacrifice child
Sep 24 13:19:34 overcloud-controller-0 lrmd[25452]: warning: ip-172.16.4.29_monitor_10000 process (PID 820218) timed out
Sep 24 13:19:34 overcloud-controller-0 lrmd[25452]: warning: ip-172.16.4.29_monitor_10000:820218 - timed out after 20000ms
@4383
4383 / patch.sh
Created Oct 1, 2019
patching overcloud with dev
View patch.sh
curl -4 "https://review.openstack.org/changes/541827/revisions/b1d6bcc7f343e0462dc7543f1c665fb63028feb6/patch?download" | base64 -d | sudo patch -d /usr/share/openstack-tripleo-heat-templates/ -p1 -b -z .patch1
source stackrc
# Set BUILD_ID manually to "12.0-20180124.1"
BUILD_ID="13.0-20191001.1"
openstack overcloud container image prepare \
--namespace=rhos-qe-mirror-qeos.usersys.redhat.com:5000/rhosp12 \
--output-images-file /home/stack/container_images_12.yaml \
--push-destination 192.168.24.1:8787 \
--prefix=openstack- \
@4383
4383 / registry.sh
Created Sep 27, 2019
list docker image for openstack from local registry
View registry.sh
curl -X GET http://192.168.24.1:8787/v2/_catalog
{"repositories":["rhosp13/openstack-aodh-api","rhosp13/openstack-aodh-evaluator","rhosp13/openstack-aodh-listener","rhosp13/openstack-aodh-notifier","rhosp13/openstack-ceilometer-central","rhosp13/openstack-ceilometer-compute","rhosp13/openstack-ceilometer-notification","rhosp13/openstack-cinder-api","rhosp13/openstack-cinder-scheduler","rhosp13/openstack-cinder-volume","rhosp13/openstack-cron","rhosp13/openstack-glance-api","rhosp13/openstack-gnocchi-api","rhosp13/openstack-gnocchi-metricd","rhosp13/openstack-gnocchi-statsd","rhosp13/openstack-haproxy","rhosp13/openstack-heat-api","rhosp13/openstack-heat-api-cfn","rhosp13/openstack-heat-engine","rhosp13/openstack-horizon","rhosp13/openstack-iscsid","rhosp13/openstack-keystone","rhosp13/openstack-mariadb","rhosp13/openstack-memcached","rhosp13/openstack-neutron-dhcp-agent","rhosp13/openstack-neutron-l3-agent","rhosp13/openstack-neutron-metadata-agent","rhosp13/openstack-neutron-openvswitch-agent","rhosp13/opens
@4383
4383 / locate file rpm
Created Sep 26, 2019
locate where file is installed through rpm info
View locate file rpm
$ rpm -ql openstack-tripleo-heat-templates | grep logrot
@4383
4383 / trace.sh
Created Sep 24, 2019
trace python script
View trace.sh
python -m trace --trace script.py # affiche l'exécution d'un programme ligne par ligne
@4383
4383 / drop.sh
Last active Sep 12, 2019
Drop rabbitmq trafic
View drop.sh
sudo iptables -I 1 INPUT -p tcp --sport 5672 --j DROP # source
sudo iptables -I 1 INPUT -p tcp --dport 5672 --j DROP # destination
<wait for heartbeat failures>
sudo iptables -D INPUT 1
sudo rabbitmqctl -p test list_queues name messages messages_unacknowledged | grep reply
reply_f4b9a59c84b04857ae8ed992c618eaba 0 0
reply_bef3bbc2619247b0b287d19bfd685de3 0 0
reply_e6151828c288457e9cc01e5e6167e4e3 0 0
@4383
4383 / retrieve.sh
Last active Jul 1, 2019
retrieve oslo projects from governance by using niet
View retrieve.sh
# retrieve all the oslo projects url by using openstack/governance
# https://github.com/openstack/governance
# first install niet
# pip install niet
niet "oslo.deliverables.*[repos][0]" governance/reference/projects.yaml
niet "oslo.deliverables.*[repos][0][0]" governance/reference/projects.yaml -f ifs
# openstack/automaton openstack/castellan openstack/cookiecutter openstack/debtcollector openstack/devstack-plugin-amqp1 openstack/devstack-plugin-kafka openstack/devstack-plugin-pika openstack/devstack-plugin-zmq openstack/futurist openstack/mox3 openstack/oslo-cookiecutter openstack/oslo-specs openstack/oslo.cache openstack/oslo.concurrency openstack/oslo.config openstack/oslo.context openstack/oslo.db openstack/oslo.i18n openstack/oslo.limit openstack/oslo.log openstack/oslo.messaging openstack/oslo.middleware openstack/oslo.policy openstack/oslo.privsep openstack/oslo.reports openstack/oslo.rootwrap openstack/oslo.serialization openstack/oslo.service openstack/oslo.tools openstack/oslo.upgradecheck openstac
@4383
4383 / fast8.sh
Created Jun 21, 2019 — forked from zaneb/fast8.sh
Run flake8 against only files that have changed
View fast8.sh
#!/bin/bash
set -e
enable_env() {
local env_name="$1"
local env_dir=".tox/${env_name}"
if [ ! -d "${env_dir}" ]; then
if [ ! -f tox.ini ]; then
echo 'No tox.ini found' >&2
@4383
4383 / oslo-service-reproducer.py
Created Jun 20, 2019
oslo-service-reproducer
View oslo-service-reproducer.py
#!/usr/bin/env python
#
import logging
from oslo_service import service
from oslo_config import cfg
import pdb
import traceback
import os
import time
@4383
4383 / eventlet_threading.py
Created Jun 4, 2019
verify that the threading module come from the stdlib
View eventlet_threading.py
import eventlet
import threading
eventlet.monkey_patch()
print(threading.current_thread.__module__)
# Will print "eventlet.green.threading"
assert threading.current_thread.__module__ == 'threading'
# Will raise the following assertion error:
# Traceback (most recent call last):
You can’t perform that action at this time.