Skip to content

Instantly share code, notes, and snippets.

users:
- name: mdorman
lock_passwd: false
- default
disable_root: 1
ssh_pwauth: 1
locale_configfile: /etc/sysconfig/i18n
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
@misterdorm
misterdorm / nova name uniqueness (juno).patch
Last active August 29, 2015 14:26
Patch against Juno to implement regex instance name checks and name-uniqueness checks against an LDAP directory. Referenced in this Atlanta summit talk: https://www.openstack.org/summit/openstack-summit-atlanta-2014/session-videos/presentation/integrating-openstack-with-active-directory-because-ad-ldap / https://docs.google.com/presentation/d/19…
diff -r -u -x .git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
--- a/nova/api/openstack/compute/servers.py 2015-08-06 21:13:56.000000000 -0600
+++ b/nova/api/openstack/compute/servers.py 2015-08-06 21:09:55.000000000 -0600
@@ -17,6 +17,7 @@
import base64
import os
import re
+import ldap
from oslo.config import cfg
@misterdorm
misterdorm / 0018-server-groups-cells-support.patch
Last active November 25, 2015 05:05
Support for server groups in nova cells v1: Note this patch will probably not apply cleanly to stock nova, as it's rebased from a few other cells-related patches we also run. But it should be fairly trivial to rebase onto whatever flavor of nova you have.
diff --git a/nova/api/openstack/compute/contrib/server_groups.py b/nova/api/openstack/compute/contrib/server_groups.py
index 553f946..b9854c1 100644
--- a/nova/api/openstack/compute/contrib/server_groups.py
+++ b/nova/api/openstack/compute/contrib/server_groups.py
@@ -27,6 +27,7 @@ from nova.i18n import _
from nova.i18n import _LE
from nova import objects
from nova import utils
+from nova import compute
LMDV-MDORM:provider mdorman$ bundle exec rake spec
(in /Users/mdorman/puppet/puppet-nova)
rm -rf openstack/puppet-openstack-integration
git clone https://git.openstack.org/openstack/puppet-openstack-integration openstack/puppet-openstack-integration
Cloning into 'openstack/puppet-openstack-integration'...
remote: Counting objects: 520, done.
remote: Compressing objects: 100% (353/353), done.
remote: Total 520 (delta 293), reused 338 (delta 143)
Receiving objects: 100% (520/520), 99.96 KiB | 0 bytes/s, done.
Resolving deltas: 100% (293/293), done.
Failures:
1) Puppet::Provider::Nova when searching for a host/type combo with cells enabled should find the hostname if there is a match
Failure/Error: klass.expects(:auth_nova).returns(output)
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: Puppet::Provider::Nova.auth_nova(any_parameters)
satisfied expectations:
def self.nova_get_host_by_name_and_type(host_name, service_type)
#find the host by name and service type
nova_hosts.each do |entry|
# (mdorman) Support api!cell_name@host_name -style output of nova host-list under nova cells
if entry["host_name"] =~ /^([a-zA-Z0-1\-_]+![a-zA-Z0-1\-_]+@)?#{Regexp.quote(host_name)}$/
if entry["service"] == service_type
return host_name
end
end
end
New errors:
nova.tests.unit.objects.test_instance.TestInstanceObject.test_save_in_compute_cell ... FAILED
nova.tests.unit.objects.test_instance.TestInstanceV1RemoteObject.test_save_in_compute_cell ... FAILED
nova.tests.unit.objects.test_instance.TestRemoteInstanceObject.test_save_in_compute_cell ... FAILED
Samle of debug output from one of the above (others are similar):
--------
{5} nova.tests.unit.objects.test_instance.TestInstanceV1RemoteObject.test_save_in_compute_cell [0.083946s] ... FAILED
diff --git a/neutron/db/securitygroups_rpc_base.py b/neutron/db/securitygroups_rpc_base.py
index a7a9bb2..47acd2d 100644
--- a/neutron/db/securitygroups_rpc_base.py
+++ b/neutron/db/securitygroups_rpc_base.py
@@ -133,15 +133,12 @@ class SecurityGroupServerRpcMixin(sg_db.SecurityGroupDbMixin):
sg_provider_updated_networks = set()
sec_groups = set()
for port in ports:
- if port['device_owner'] == n_const.DEVICE_OWNER_DHCP:
- sg_provider_updated_networks.add(
kolla-ansible -i /root/all-in-one bootstrap-servers
Bootstraping servers : ansible-playbook -i /root/all-in-one -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla -e action=bootstrap-servers /usr/share/kolla-ansible/ansible/kolla-host.yml
...
fatal: [localhost]: FAILED! => {"failed": true, "msg": "The conditional check 'inventory_hostname not in groups['bifrost'] or 'ansible_' + hostvars[inventory_hostname]['api_interface'] in hostvars[inventory_hostname]' failed. The error was: error while evaluating conditional (inventory_hostname not in groups['bifrost'] or 'ansible_' + hostvars[inventory_hostname]['api_interface'] in hostvars[inventory_hostname]): 'dict object' has no attribute 'api_interface'\n\nThe error appears to have been in '/usr/share/kolla-ansible/ansible/roles/baremetal/tasks/pre-install.yml': line 22, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Generate /etc/hosts for all of
@misterdorm
misterdorm / keystone.conf
Last active December 20, 2017 18:22
kolla configuration
[DEFAULT]
debug = True
log_file = /var/log/kolla/keystone/keystone.log
use_stderr = True
[oslo_middleware]
enable_proxy_headers_parsing = True
[database]
connection = mysql+pymysql://keystone:xxxx@172.16.5.79:3306/keystone