Skip to content

Instantly share code, notes, and snippets.

@markmc
markmc / gist:5546607
Created May 9, 2013
nova review stats for the past 90 days using https://github.com/russellb/openstack-stats
View gist:5546607
Reviews for the last 90 days in nova
** -- nova-core team member
+--------------------------+-----------------------------------+
| Reviewer | Reviews (-2|-1|+1|+2) (+/- ratio) |
+--------------------------+-----------------------------------+
| russellb ** | 493 (57|124|8|304) (63.3%) |
| mikalstill ** | 393 (6|53|4|330) (85.0%) |
| vishvananda ** | 359 (7|28|3|321) (90.3%) |
| klmitch ** | 299 (1|43|0|255) (85.3%) |
| sdague ** | 277 (13|65|7|192) (71.8%) |
@markmc
markmc / client.py
Created May 31, 2013
Playing with kombu and async processing
View client.py
import kombu.connection
import kombu.entity
import kombu.messaging
params = {
'hostname': 'localhost',
'port': 5672,
'virtual_host': '/',
}
View gist:5858373
(py27)[markmc@sorcha oslo.config]$ cat t.py
from oslo.config import cfg
cfg.CONF.register_opt(cfg.StrOpt('connection',
deprecated_name='sql_connection'),
group='database')
cfg.CONF()
View gist:5973868
import socket
class ImageDownloadFailure(Exception):
def __init__(self, host, port, path, error):
self.host = host
self.port = port
self.path = path
msg = ('Failed to download %(path)s from %(host)s:%(port)s: %(error)s'
% {'host': host, 'port': port, 'path': path, 'error': error})
View gist:7657537

devtest_overcloud

  1. Create your overcloud control plane image. This is the image the undercloud will deploy to become the KVM (or QEMU, Xen, etc.) cloud control plane. Note that stackuser is only there for debugging support - it is not suitable for a production network. $OVERCLOUD_DIB_EXTRA_ARGS is meant to be used to pass additional build-time specific arguments to disk-image-create.
View gist:7687926

os-collect-config

Collect configuration from cloud metadata sources

What does it do?

View gist:7687935
os-collect-config
=================
Collect configuration from cloud metadata sources.
# What does it do?
It collects data from defined configuration sources and runs a defined hook whenever the metadata has changed.
View gist:7687941

os-collect-config

Collect configuration from cloud metadata sources

What does it do?

View gist:7688052

Install os-refresh-config

os-refresh-config uses dib-run-parts to run scripts in a pre-defined set of directories. Its intended purpose is to quiesce (pre-configure.d), configure (configure.d), migrate (migration.d), and then activate (post-configure.d) a configuration on first boot or in response to Heat Metadata changes.

To cause a script to be run on every os-refresh-config run, install

View gist:7747824

os-refresh-config

os-refresh-config uses dib-run-parts to run scripts in a pre-defined set of directories:

/opt/stack/os-config-refresh/pre-configure.d
/opt/stack/os-config-refresh/configure.d
/opt/stack/os-config-refresh/migration.d