Project

General

Profile

Actions

Feature #3968

closed

https should work for rest-bench

Added by Kevin Horan about 11 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Trying to set the protocol to https by using the --protocol=https flag does not work.

$ rest-bench --api-host=hostname --protocol=https --bucket=bench --access-key=$S3_ACCESS_KEY_ID --secret=$S3_SECRET_ACCESS_KEY --show-time --seconds 120 write
host=hostname
bad protocol
usage: rest-bench [options] <write|seq>
       rest-bench [options] cleanup <prefix>

Looking at the source, the reason is clear:

rest_bench.cc lines 702-710:

 } else if (ceph_argparse_witharg(args, i, &proto_str, "--protocol", (char*)NULL)) {
      if (strcasecmp(proto_str.c_str(), "http") == 0) {
        protocol = S3ProtocolHTTP;
      } else if (strcasecmp(proto_str.c_str(), "http") == 0) {
        protocol = S3ProtocolHTTPS;
      } else {
        cerr << "bad protocol" << std::endl;
        usage_exit();
      }

The second if block on line 705 compares to "http" again instead of "https".
Actions #1

Updated by Ian Colle about 11 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from https does not work for rest-bench to https should work for rest-bench
  • Assignee set to Yehuda Sadeh
Actions #2

Updated by Kefu Chai almost 9 years ago

  • Status changed from New to Fix Under Review
Actions #3

Updated by Kefu Chai almost 9 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF