Skip to content

Instantly share code, notes, and snippets.

Avatar

Florian Haas fghaas

View GitHub Profile
@fghaas
fghaas / post-upgrade.md
Created Mar 30, 2018
Manual post-upgrade tasks after a Pike→Queens OpenStack-Ansible release upgrade
View post-upgrade.md

Post-upgrade container removal

Once run_upgrade.sh has completed successfully, you can clean up the pre-Queens per-service containers, leaving only the consolidated containers in place.

To do so, shell into alice and become root:

@fghaas
fghaas / gist:f547243b0f7ebb78ce2b8e80b936e42c
Created Oct 12, 2017
Excessive data redundancy in Ceph 12.2.1
View gist:f547243b0f7ebb78ce2b8e80b936e42c
training@deploy:~/ceph-ansible$ sudo ceph -s
cluster:
id: 2beeb83a-2aa5-47e3-a3c3-39890821c410
health: HEALTH_WARN
Degraded data redundancy: 30197/3622 objects degraded (833.711%), 168 pgs unclean, 168 pgs degraded, 1 pg u
ndersized
services:
mon: 3 daemons, quorum daisy,eric,frank
mgr: frank(active), standbys: eric, daisy
@fghaas
fghaas / gist:59cd2c234d529db236c14fb7d46dfc85
Created Oct 12, 2017
rados df with excessive MISSING_ON_PRIMARY count for bench pool
View gist:59cd2c234d529db236c14fb7d46dfc85
training@deploy:~/ceph-ansible$ sudo rados df
POOL_NAME USED OBJECTS CLONES COPIES MISSING_ON_PRIMARY UNFOUND DEGRADED RD_OPS RD WR_OPS WR
.rgw.root 1588 4 0 8 2 0 4 0 0 4 5120
bench 0 0 0 0 11506 0 29268 1129 4496M 148845 20390M
cephfs_data 0 0 0 0 0 0 0 0 0 0 0
cephfs_metadata 3079 21 0 42 5 0 14 3 2048 48 14336
default.rgw.buckets.data 12 1 0 2 0 0 0 0 0 12 1024
default.rgw.buckets.index 0 1 0 2 0 0 0 5 4096 5 0
default.rgw.control 0 8 0 16 0 0 3 0 0 0 0
default.rgw.data.root 609
@fghaas
fghaas / 75-input.rules
Last active May 10, 2018
Attempt to disable AlpsPS/2 ALPS DualPoint Stick as an input device (via udev)
View 75-input.rules
# /etc/udev/rules.d/75-input.rules
# local udev rules for input devices
ACTION!="add|change", GOTO="input_end"
# ALPS DualPoint Stick: Ignore as input device
ENV{ID_BUS}=="i8042", ENV{NAME}=="AlpsPS/2 ALPS DualPoint Stick", ENV{ID_INPUT}="", ENV{ID_INPUT_MOUSE}="", ENV{ID_INPUT_POINTINGSTICK}=""
LABEL="input_end"
@fghaas
fghaas / gist:ba90f3a699184effae3f701ee456cf81
Created Sep 14, 2016
Looks like pcs on Ubuntu is off to a great start... :/
View gist:ba90f3a699184effae3f701ee456cf81
$ sudo pcs status
Cluster name: debian
WARNING: no stonith devices and stonith-enabled is not false
Traceback (most recent call last):
File "/usr/sbin/pcs", line 231, in <module>
main(sys.argv[1:])
File "/usr/sbin/pcs", line 171, in main
cmd_map[command](argv)
File "/usr/lib/python2.7/dist-packages/pcs/status.py", line 18, in status_cmd
full_status()
View gist:94a0d01d3e4ce47250be
edxapp@academy01:/edx/app/edxapp/edx-platform$ python manage.py lms --settings=aws collectstatic --noinput
2016-01-06 14:22:48,887 INFO 25671 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
2016-01-06 14:22:48,929 WARNING 25671 [py.warnings] importlib.py:9 - /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/helpers.py:4: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
from django.utils.importlib import import_module
Copying '/edx/app/edxapp/edx-platform/themes/hastexo/lms/static/css/lms-main-rtl.css'
Copying '/edx/app/edxapp/edx-platform/themes/hastexo/lms/static/css/lms-main.css'
js/discovery/discovery_factory.js
----------------
View gist:bfe6c59c47e78a7587e6
ubuntu@academy01:/edx/app/edxapp/edx-platform/themes/hastexo/lms/static/css$ ls
lms-main-rtl.css lms-main-rtl.css.map lms-main.css lms-main.css.map
ubuntu@academy01:/edx/app/edxapp/edx-platform/themes/hastexo/lms/static/css$ /edx/bin/edxapp-update-assets-lms && sudo /edx/bin/supervisorctl restart edxapp_worker:
mkdir_p path('/edx/app/edxapp/edx-platform/themes/hastexo/lms/static/css')
---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
---> pavelib.prereqs.install_node_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
python manage.py lms --settings=aws preprocess_assets lms/static/sass/*.scss lms/static/themed_sass
View gist:ab806ede657a85938bab
ubuntu@academy01:/edx/app/edxapp/edx-platform/themes/hastexo$ /edx/bin/edxapp-update-assets-lms && sudo /edx/bin/supervisorctl restart edxap
p_worker:
mkdir_p path('/edx/app/edxapp/edx-platform/themes/hastexo/lms/static/css')
---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
---> pavelib.prereqs.install_node_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
python manage.py lms --settings=aws preprocess_assets lms/static/sass/*.scss lms/static/themed_sass
2016-01-06 13:30:20,007 INFO 9003 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
@fghaas
fghaas / gist:85da0020e103cf5df8d0
Created Jan 6, 2016
Failed comprehensive theme paver run
View gist:85da0020e103cf5df8d0
$ /edx/bin/edxapp-update-assets-lms && sudo /edx/bin/supervisorctl restart edxapp_worker:
mkdir_p path('/edx/app/edxapp/edx-platform/themes/hastexo/lms/static/css')
---> pavelib.assets.update_assets
---> pavelib.prereqs.install_ruby_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
---> pavelib.prereqs.install_node_prereqs
NO_PREREQ_INSTALL is set, not installing prereqs
python manage.py lms --settings=aws preprocess_assets lms/static/sass/*.scss lms/static/themed_sass
2016-01-06 13:16:46,789 INFO 4841 [dd.dogapi] dog_stats_api.py:66 - Initializing dog api to use statsd: localhost, 8125
System check identified some issues:
@fghaas
fghaas / base.html
Created Dec 22, 2015 — forked from roadsideseb/base.html
Oscar packing slip / invoice templates using pisa.
View base.html
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
@page {
size: a4 portrait;
margin: 1cm;
margin-left:2cm;
margin-right:2cm;