Skip to content

Instantly share code, notes, and snippets.

View mriedem's full-sized avatar

Matt Riedemann mriedem

View GitHub Profile
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 July 27, 2020 15:38
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
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 "/
# Minimal Contents
# ----------------
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)'
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
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.
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
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'