Skip to content

Instantly share code, notes, and snippets.

View jerith's full-sized avatar

Jeremy Thurgood jerith

  • Cape Town, South Africa
View GitHub Profile
diff --git a/mc2/controllers/base/models.py b/mc2/controllers/base/models.py
index 65a69cb..4283fff 100644
--- a/mc2/controllers/base/models.py
+++ b/mc2/controllers/base/models.py
@@ -1,8 +1,3 @@
-import os
-import pwd
-
-os.getlogin = lambda: pwd.getpwuid(os.getuid())[0] # noqa
-
@jerith
jerith / hypothesis_django_fix.py
Created February 23, 2016 15:43
A possible fix for Hypothesis Django model generation
DEFAULT_VALUE = object()
def models(model, **extra):
result = {}
mappings = field_mappings()
mandatory = set()
for f in model._meta.concrete_fields:
diff --git a/Rakefile b/Rakefile
index 7d81c30..011ef9c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -13,9 +13,8 @@ Rake::Task[:lint].clear
PuppetLint::RakeTask.new(:lint) do |config|
config.fail_on_warnings = true
config.disable_checks = [
- '80chars',
- 'class_inherits_from_params_class',
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..54c7051
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,11 @@
+## 0.1.1 - 2016-02-05
+
+### Fixes
+* `gluster_peer` and `gluster_volume` now autorequire `Package[gluster-server]`.
diff --git a/Vagrantfile b/Vagrantfile
index 991c867..6b71d0c 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -14,6 +14,12 @@ Vagrant.configure(2) do |config|
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
+ if Vagrant.has_plugin?("vagrant-cachier")
+ # Configure cached packages to be shared between instances of the same base
diff --git a/manifests/worker.pp b/manifests/worker.pp
index 3cf8e4d..32f95f8 100644
--- a/manifests/worker.pp
+++ b/manifests/worker.pp
@@ -202,7 +202,7 @@ class seed_stack::worker (
# dnsmasq to serve DNS requests, sending requests for the Consul domain to
# Consul
- if ! controller {
+ if ! $controller_worker {
diff --git a/puppet/manifests/default.pp b/puppet/manifests/default.pp
index de09c07..badc016 100644
--- a/puppet/manifests/default.pp
+++ b/puppet/manifests/default.pp
@@ -25,19 +25,8 @@ class seed_stack_cluster {
$controller_ip = '192.168.0.2'
$worker_ip = '192.168.0.3'
- class { 'hosts':
- enable_fqdn_entry => false,
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks
from twisted.internet.endpoints import serverFromString, clientFromString
from twisted.trial import unittest
from twisted.test import proto_helpers
from twisted.web.client import ProxyAgent, readBody
from vumi_http_proxy.http_proxy import ProxyFactory
from twisted.trial import unittest
from twisted.test import proto_helpers
from vumi_http_proxy.http_proxy import ProxyFactory
class CheckProxyRequestTestCase(unittest.TestCase):
def test_process(self):
factory = ProxyFactory()
proto = factory.buildProtocol(('0.0.0.0', 0))
diff --git a/puppet/manifests/default.pp b/puppet/manifests/default.pp
index 0f2efcf..aff7cd5 100644
--- a/puppet/manifests/default.pp
+++ b/puppet/manifests/default.pp
@@ -28,8 +28,12 @@ node default {
ensure => installed,
}
- include seed_stack::controller
+ class { 'seed_stack::controller':