Skip to content

Instantly share code, notes, and snippets.

View cbodley's full-sized avatar

Casey Bodley cbodley

  • Red Hat
  • Ann Arbor, MI
View GitHub Profile
/home/cbodley/ceph/src/rgw/rgw_op.cc: In member function ‘virtual void RGWGetObj::execute()’:
/home/cbodley/ceph/src/rgw/rgw_op.cc:1377:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (ofs >= cs_info.orig_size) {
^
/home/cbodley/ceph/src/rgw/rgw_op.cc:1385:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (end >= cs_info.orig_size) {
^
/home/cbodley/ceph/src/rgw/rgw_op.cc: In member function ‘virtual void RGWPutObj::execute()’:
/home/cbodley/ceph/src/rgw/rgw_op.cc:3003:1: error: jump to label ‘done’ [-fpermissive]
done:
diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt
index 9648800..52b6eaa 100644
--- a/src/rgw/CMakeLists.txt
+++ b/src/rgw/CMakeLists.txt
@@ -27,6 +27,7 @@ set(rgw_a_srcs
rgw_cache.cc
rgw_client_io.cc
rgw_common.cc
+ rgw_compression.cc
rgw_cors.cc
#include "common/ceph_argparse.h"
#include "common/common_init.h"
#include "common/config.h"
#include "global/global_init.h"
#include "global/global_context.h"
int main(int argc, const char** argv)
{
std::vector<const char*> args;
argv_to_vec(argc, argv, args);
@cbodley
cbodley / gist:7f409438da92e0ba3a9cf309174b5073
Created September 6, 2016 19:47
wip_rgw_compression s3test failure
from teuthology.log: http://qa-proxy.ceph.com/teuthology/cbodley-2016-09-06_10:26:26-rgw-wip_rgw_compression---basic-mira/402146/teuthology.log
2016-09-06T14:54:34.128 INFO:teuthology.orchestra.run.mira110.stderr:======================================================================
2016-09-06T14:54:34.128 INFO:teuthology.orchestra.run.mira110.stderr:ERROR: s3tests.functional.test_s3.test_region_copy_object
2016-09-06T14:54:34.128 INFO:teuthology.orchestra.run.mira110.stderr:----------------------------------------------------------------------
2016-09-06T14:54:34.128 INFO:teuthology.orchestra.run.mira110.stderr:Traceback (most recent call last):
2016-09-06T14:54:34.128 INFO:teuthology.orchestra.run.mira110.stderr: File "/home/ubuntu/cephtest/s3-tests/virtualenv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
2016-09-06T14:54:34.128 INFO:teuthology.orchestra.run.mira110.stderr: self.test(*self.arg)
2016-09-06T14:54:34.128 INFO:teuthology.orchestra.run.mira110.stderr: File "/home/ub
struct crypt_sanitize_header {
boost::string_ref name;
boost::string_ref value;
crypt_sanitize_header(boost::string_ref name, boost::string_ref value)
: name(name), value(value) {}
};
std::ostream& operator<<(std::ostream& out, const crypt_sanitize_header& h) {
out << h.name << '=';
/// streaming message body interface
struct streaming_body {
using value_type = boost::asio::mutable_buffer;
class reader {
value_type& buffer;
public:
using mutable_buffers_type = boost::asio::mutable_buffers_1;
@cbodley
cbodley / pytest_runner.py
Created May 4, 2017 15:04
run pytest.main() against already-imported modules
import pytest
from rgw_multi import tests
def run_tests(realm, user):
tests.init_multi(realm, user) # inject dependencies
test_modules = [tests] # more in future
args = ['-s', '-v', '--pyargs']
for mod in test_modules:
#include <boost/asio.hpp>
#define BOOST_COROUTINES_NO_DEPRECATION_WARNING
#include <boost/asio/spawn.hpp>
#include <iostream>
#include <memory>
using boost::system::error_code;
// use a move-only result type
using result_type = std::unique_ptr<int>;
$ g++ main.cc -std=c++17 -lboost_system -lpthread -lboost_context -lboost_coroutine -lboost_thread -lboost_chrono
In file included from /home/cbodley/scratch/boost/libs/asio/include/boost/asio/spawn.hpp:336:0,
from main.cc:5:
/home/cbodley/scratch/boost/libs/asio/include/boost/asio/impl/spawn.hpp: In instantiation of ‘boost::asio::async_result<boost::asio::basic_yield_context<Handler>, ReturnType(boost::system::error_code, Arg2)>::async_result(typename boost::asio::detail::coro_async_result<Handler, typename std::decay<WriteHandler>::type>::completion_handler_type&) [with Handler = boost::asio::executor_binder<void (*)(), boost::asio::executor>; ReturnType = void; Arg2 = std::unique_ptr<int>&&; typename boost::asio::detail::coro_async_result<Handler, typename std::decay<WriteHandler>::type>::completion_handler_type = boost::asio::detail::coro_handler<boost::asio::executor_binder<void (*)(), boost::asio::executor>, std::unique_ptr<int> >]’:
/home/cbodley/scratch/boost/libs/asio/include/boost/a
#!/usr/bin/python
import argparse
import socket
parser = argparse.ArgumentParser()
parser.add_argument('hostname', help='Hostname of the http server')
parser.add_argument('port', type=int, help='Port number of the http server')
args = parser.parse_args()