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 | |
| # | |
| # purge tables of "deleted" records by archiveing them in sensible chunks to the shadow tables | |
| DATABASE=nova | |
| TABLES="instance_info_caches instance_system_metadata instances reservations compute_node_stats " | |
| for TABLE in ${TABLES} | |
| do |
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 | |
| # | |
| # purge tables of "deleted" records by archiveing them in sensible chunks to the shadow tables | |
| # this work was started in PAASINFRA-206 | |
| # | |
| DRY_RUN="--dry-run" | |
| unset DRY_RUN | |
| DATABASE=nova |
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
| If you want to take part in the hands on component of the DevOps mini bash, | |
| please download & install the following before the event: | |
| VirtualBox: https://www.virtualbox.org/wiki/Downloads | |
| Vagrant: http://www.vagrantup.com/downloads.html | |
| The precise32 box for vagrant: http://files.vagrantup.com/precise32.box | |
| You'll also need a text editor & a web browser you're familiar with. |
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
| require 'serverspec' | |
| include Serverspec::Helper::Exec | |
| include Serverspec::Helper::DetectOS | |
| RSpec.configure do |c| | |
| c.before :all do | |
| c.path = '/sbin:/usr/sbin' | |
| end | |
| end |
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
| use keystone; | |
| delete from token where expires <= date_sub(now(), interval 3 day); | |
| delimiter ;; | |
| create event if not exists token_flush ON SCHEDULE EVERY 1 DAY | |
| DO delete from token where expires <= date_sub(now(), interval 3 day); | |
| ;; | |
| delimiter ; | |
| use nova; | |
| -- only create the index if it doesn't already exist |
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
| ruby '1.9.3' | |
| source 'https://rubygems.org' | |
| gem "test-kitchen", '>=1.2.1' | |
| gem "kitchen-vagrant" | |
| gem "unf" | |
| gem "kitchen-salt", ">=0.0.11" |
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
| diff --git a/beaver.sls b/beaver.sls | |
| index 9dc1f8f..ad2b53d 100644 | |
| --- a/beaver.sls | |
| +++ b/beaver.sls | |
| @@ -17,7 +17,7 @@ beaver: | |
| format: json | |
| transport: tcp | |
| tcp_port: 5960 | |
| - tcp_host: {% '-'.join(grains['host'].split('-')[:2]) + '-dbhead0001' %} | |
| + tcp_host: {{ salt['pillar.get']('beaver:logstash_server', '127.0.0.1') }} |
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
| # Copyright 2013 Hewlett-Packard Development Company, L.P. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may | |
| # not use this file except in compliance with the License. You may obtain | |
| # a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
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 | |
| # | |
| # Upload that bloody cookbook, even if knife thinks it's not a cookbook | |
| # | |
| abspath () { | |
| case "$1" in | |
| /*)printf "%s\n" "$1";; | |
| *)printf "%s\n" "$PWD/$1";; | |
| esac | |
| } |
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
| diff --git a/designate/schema.py b/designate/schema.py | |
| index f813a30..c1c1907 100644 | |
| --- a/designate/schema.py | |
| +++ b/designate/schema.py | |
| @@ -109,6 +109,14 @@ class SchemaValidator(jsonschema.Draft3Validator): | |
| if instance == '0.0.0.0': # RFC5735 | |
| msg = "%s is not an IPv4 address" % (instance) | |
| yield jsonschema.ValidationError(msg) | |
| + # is it a dotted quad & all 4 fields <= 255 | |
| + m = re.match('(\d+)\.(\d+)\.(\d+)\.(\d+)$', instance) |