Skip to content

Instantly share code, notes, and snippets.


Matt Riedemann mriedem

View GitHub Profile
View notebook-5799-json-logging.diff
diff --git a/notebook/ b/notebook/
index 45c1cb5eb..a443125fd 100755
--- a/notebook/
+++ b/notebook/
@@ -139,19 +139,6 @@ try:
except ImportError:
terminado_available = False
-# Tolerate missing json_logging package.
-_enable_json_logs = enable_json_logs()
mriedem /
Created Jul 27, 2020
Python script for loading up and purging users and notebook server pods in a JupyterHub deployment.
#!/usr/bin/env python3
import argparse
from concurrent import futures
from datetime import datetime
import functools
import logging
import mock
import os
import sys
View gist:e01252253600abbef95045d73cfe2206
b'2019-12-03 22:35:14,048 ERROR [root] Original exception being dropped: [\'Traceback (most recent call last):\\n\', \' File "/home/zuul/src/", line 208, in _send\\n reply, failure = reply_q.get(timeout=timeout)\\n\', \' File "/home/zuul/src/", line 322, in get\\n return waiter.wait()\\n\', \' File "/home/zuul/src/", line 141, in wait\\n return get_hub().switch()\\n\', \' File "/home/zuul/src/", line 298, in switch\\n return self.greenlet.switch()\\n\', \'queue.Empty\\n\', \'\\nDuring handling of the above exception, another exception occurred:\\n\\n\', \'Traceback (most recent call last):\\n\', \' File "/
View gist:616c311e9665f40ffbf4dcb016b4bc33
# Minimal Contents
# ----------------
View gist:9fce3c68336f8abb5d4753c156d8f96f
b'2018-10-26 10:19:26,115 ERROR [oslo_messaging.rpc.server] Exception during message handling'
b'Traceback (most recent call last):'
b' File "/home/osboxes/git/nova/.tox/py35/lib/python3.5/site-packages/oslo_messaging/rpc/", line 166, in _process_incoming'
b' res = self.dispatcher.dispatch(message)'
b' File "/home/osboxes/git/nova/.tox/py35/lib/python3.5/site-packages/oslo_messaging/rpc/", line 265, in dispatch'
b' return self._do_dispatch(endpoint, method, ctxt, args)'
b' File "/home/osboxes/git/nova/.tox/py35/lib/python3.5/site-packages/oslo_messaging/rpc/", line 194, in _do_dispatch'
b' result = func(ctxt, **new_args)'
b' File "/home/osboxes/git/nova/.tox/py35/lib/python3.5/site-packages/oslo_messaging/rpc/", line 229, in inner'
b' return func(*args, **kwargs)'
View gist:3f1560a7e9697ade633ab11b6aab8c62
diff --git a/nova/objects/ b/nova/objects/
index 27fd416..0df32ab 100644
--- a/nova/objects/
+++ b/nova/objects/
@@ -324,17 +324,32 @@ class Instance(base.NovaPersistentObject, base.NovaObject,
def _flavor_from_db(self, db_flavor):
"""Load instance flavor information from instance_extra."""
+ # Before we stored flavors in instance_extra, certain fields, defined
+ # in nova.compute.flavors.system_metadata_flavor_props, were stored
View gist:66be7b3c3283c5fd00934c8294e5f67a
View gist:3da0a2edf18be0487e8becad31293077
The fix for `OSSA-2017-005`_ (CVE-2017-16239) was too far-reaching in that
rebuilds can now fail based on scheduling filters that should not apply
to rebuild. For example, a rebuild of an instance on a disabled compute
host could fail whereas it would not before the fix for CVE-2017-16239.
Similarly, rebuilding an instance on a host that is at capacity for vcpu,
memory or disk could fail since the scheduler filters would treat it as a
new build request even though the rebuild is not claiming *new* resources.
Therefore this release contains a fix for those regressions in scheduling
behavior on rebuild while maintaining the original fix for CVE-2017-16239.
View gist:706bcfbac773660310c38ad319ce7fe2
2017-08-22 13:33:00,808 INFO [nova.compute.resource_tracker] Compute node record created for host2:fake-mini with uuid: 13991939-e0db-41f9-af4d-c27822c5bfa4
2017-08-22 13:33:00,817 INFO [nova.api.openstack.placement.requestlog] "GET /placement/resource_providers/13991939-e0db-41f9-af4d-c27822c5bfa4" status: 404 len: 227 microversion: 1.0
2017-08-22 13:33:00,822 INFO [nova.api.openstack.placement.requestlog] "POST /placement/resource_providers" status: 409 len: 233 microversion: 1.0
2017-08-22 13:33:00,822 INFO [] [req-b2116f36-098a-4a4b-b7cd-f2f1c8b7f372] Another thread already created a resource provider with the UUID 13991939-e0db-41f9-af4d-c27822c5bfa4. Grabbing that record from the placement API.
2017-08-22 13:33:00,825 INFO [nova.api.openstack.placement.requestlog] "GET /placement/resource_providers/13991939-e0db-41f9-af4d-c27822c5bfa4" status: 404 len: 227 microversion: 1.0
View gist:4a6dcb52ed867af14f16989d7b83739a
Exception occurred:
File "/home/user/git/nova/nova/conf/", line 78, in _append_config_options
for key, val in configs.items():
AttributeError: 'list' object has no attribute 'items'
You can’t perform that action at this time.