Skip to content

Instantly share code, notes, and snippets.

View ddieterly's full-sized avatar

Deklan Dieterly ddieterly

  • HPE Cloud
  • Fort Collins, CO
View GitHub Profile
#!/bin/bash
set -e
function add_service_user()
{
local service="$1"
local group="$2"
local supplementalgroups="$3"
if [ 0 = $(grep $service /etc/passwd > /dev/null 2>&1; echo $?) ]; then
@ddieterly
ddieterly / gist:58a04df674a1d54d4e46
Created January 20, 2016 20:58
Freezer Swift Restore Error
(freezer)deklans-macbook-pro:freezer dieterlyd$ freezerc --action restore --restore-abs-path /Users/dieterlyd/Documents/repos-github.com/openstack/freezer/restore --container my-container-1 --backup-name my-backup-1 --storage swift
Process Process-1:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/Users/dieterlyd/virtualenvs/freezer/lib/python2.7/site-packages/freezer/engine/engine.py", line 102, in read_blocks
for block in backup.storage.backup_blocks(backup):
File "/Users/dieterlyd/virtualenvs/freezer/lib/python2.7/site-packages/freezer/storage/swift.py", line 213, in backup_blocks
@ddieterly
ddieterly / gist:19bf049e3ab6f6d377ae
Created January 5, 2016 21:03
Tempest Tests IOError
(.venv)vagrant@devstack:/opt/stack/tempest$ ostestr --serial --regex monasca_tempest_tests
2016-01-05 21:02:07.814 918 INFO tempest [-] Using tempest config file /opt/stack/tempest/etc/tempest.conf
[Errno 13] Permission denied: '/opt/stack/tempest/.testrepository/tmpegw0ro'
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
@ddieterly
ddieterly / gist:5b4dd5a020a9dffae618
Created January 5, 2016 20:23
Tempest Test Failure Import floating_ips_client
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list
--- import errors ---
Failed to import test module: tempest.api.baremetal.admin.test_api_discovery
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/local/lib/python2.7/dist-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "tempest/api/baremetal/admin/test_api_discovery.py", line 13, in <module>
from tempest.api.baremetal.admin import base
@ddieterly
ddieterly / gist:a05fc3db93c7201c6c14
Created January 4, 2016 23:50
Tempest Test Errors in Monasca-api Gate Job
Captured traceback:
2016-01-04 21:30:09.266 | 2016-01-04 21:30:09.258 | ~~~~~~~~~~~~~~~~~~~
2016-01-04 21:30:09.272 | 2016-01-04 21:30:09.262 | Traceback (most recent call last):
2016-01-04 21:30:09.275 | 2016-01-04 21:30:09.267 | File "tempest/test.py", line 261, in setUpClass
2016-01-04 21:30:09.281 | 2016-01-04 21:30:09.271 | six.reraise(etype, value, trace)
2016-01-04 21:30:09.285 | 2016-01-04 21:30:09.277 | File "tempest/test.py", line 254, in setUpClass
2016-01-04 21:30:09.288 | 2016-01-04 21:30:09.281 | cls.resource_setup()
2016-01-04 21:30:09.291 | 2016-01-04 21:30:09.283 | File "/opt/stack/new/tempest/.venv/local/lib/python2.7/site-packages/monasca_tempest_tests/tests/api/test_alarm_definitions.py", line 30, in resource_setup
2016-01-04 21:30:09.296 | 2016-01-04 21:30:09.288 | super(TestAlarmDefinitions, cls).resource_setup()
2016-01-04 21:30:09.300 | 2016-01-04 21:30:09.292 | File "/opt/stack/new/tempest/.venv/local/lib/python2.7/site-packages/mon
@ddieterly
ddieterly / gist:10c48c453319d3516d51
Created November 2, 2015 23:07
puppet command failing from behind proxy
puppet apply \
--modulepath=/root/system-config/modules:/etc/puppet/modules \
-e "class { openstack_project::single_use_slave: install_users => false,
ssh_key => \"$( cat .ssh/id_rsa.pub | awk '{print $2}' )\" }"
@ddieterly
ddieterly / gist:3088cbd01b96566d7499
Created January 29, 2015 20:21
influxdb config.toml
monasca@mon-ae1test-monasca01:/$ cat ./opt/influxdb/shared/config.toml
# Welcome to the InfluxDB configuration file.
# If hostname (on the OS) doesn't return a name that can be resolved by the other
# systems in the cluster, you'll have to set the hostname to an IP or something
# that can be resolved here.
hostname = "15.126.47.11"
bind-address = "0.0.0.0"