This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright 2017 Red Hat, Inc | |
Author: John Spray <john.spray@redhat.com> | |
License: LGPLv2 | |
Middle name: Danger | |
""" | |
import rados | |
import cephfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# License: LGPL2.1 or later | |
from glob import glob | |
import os | |
import re | |
import socket | |
import subprocess | |
import struct | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
import sys | |
def send(payload): | |
""" | |
This emulates the salt SREQ class's __init__() and send() | |
methods, which are called together repeatedly if using | |
Minion._fire_master to send monitoring data. Hopefully | |
we're going to reproduce the ZMQ crash that sometimes happens | |
in that case. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gevent import getcurrent | |
from functools import wraps | |
from contextlib import contextmanager | |
class ForbiddenYield(Exception): | |
pass | |
@contextmanager |