diff options
| author | Michael Klishin <mklishin@pivotal.io> | 2017-06-26 19:20:27 +0300 |
|---|---|---|
| committer | Michael Klishin <mklishin@pivotal.io> | 2017-06-26 19:20:27 +0300 |
| commit | d472412571bc10a1809bfd5ad3115f9d53ace883 (patch) | |
| tree | 566d9905bb72204cadb0389cd7b700b933a0bbbb | |
| parent | 9b25c146c39910787a0c0862f7c73b0b7c35f607 (diff) | |
| parent | 93b965c5ab96b81f71bc64e3b43097e4a8f97b96 (diff) | |
| download | rabbitmq-server-git-d472412571bc10a1809bfd5ad3115f9d53ace883.tar.gz | |
Merge branch 'master' into rabbitmq-mqtt-139
| -rw-r--r-- | README | 1 | ||||
| -rw-r--r-- | priv/schema/rabbit.schema | 3 | ||||
| -rw-r--r-- | src/rabbit_variable_queue.erl | 6 | ||||
| -rw-r--r-- | src/term_to_binary_compat.erl | 1 | ||||
| -rw-r--r-- | src/vm_memory_monitor.erl | 10 | ||||
| -rw-r--r-- | test/config_schema_SUITE_data/rabbit.snippets | 40 | ||||
| -rw-r--r-- | test/term_to_binary_compat_prop_SUITE.erl | 33 |
7 files changed, 74 insertions, 20 deletions
diff --git a/README b/README deleted file mode 100644 index 43bfe006f6..0000000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -See http://rabbitmq.com and https://github.com/rabbitmq/rabbitmq-server. diff --git a/priv/schema/rabbit.schema b/priv/schema/rabbit.schema index e3eff6fb59..c503548187 100644 --- a/priv/schema/rabbit.schema +++ b/priv/schema/rabbit.schema @@ -207,6 +207,9 @@ end}. {mapping, "ssl_options.honor_cipher_order", "rabbit.ssl_options.honor_cipher_order", [{datatype, {enum, [true, false]}}]}. +{mapping, "ssl_options.honor_ecc_order", "rabbit.ssl_options.honor_ecc_order", + [{datatype, {enum, [true, false]}}]}. + {mapping, "ssl_options.key.RSAPrivateKey", "rabbit.ssl_options.key", [{datatype, string}]}. diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 86321003c9..40967e316e 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -35,6 +35,10 @@ -export([move_messages_to_vhost_store/0]). +-export([migrate_queue/3, migrate_message/3, get_per_vhost_store_client/2, + get_global_store_client/1, log_upgrade_verbose/1, + log_upgrade_verbose/2]). + -include_lib("stdlib/include/qlc.hrl"). -define(QUEUE_MIGRATION_BATCH_SIZE, 100). @@ -359,8 +363,6 @@ -rabbit_upgrade({multiple_routing_keys, local, []}). -rabbit_upgrade({move_messages_to_vhost_store, message_store, []}). --compile(export_all). - -type seq_id() :: non_neg_integer(). -type rates() :: #rates { in :: float(), diff --git a/src/term_to_binary_compat.erl b/src/term_to_binary_compat.erl index 13396ddacb..b5e8f72bd4 100644 --- a/src/term_to_binary_compat.erl +++ b/src/term_to_binary_compat.erl @@ -22,4 +22,3 @@ term_to_binary_1(Term) -> term_to_binary(Term, [{minor_version, 1}]). - diff --git a/src/vm_memory_monitor.erl b/src/vm_memory_monitor.erl index f21dc91e0a..b07ff27f17 100644 --- a/src/vm_memory_monitor.erl +++ b/src/vm_memory_monitor.erl @@ -189,14 +189,12 @@ get_system_process_resident_memory({unix,openbsd}) -> get_system_process_resident_memory({win32,_OSname}) -> OsPid = os:getpid(), - Cmd = " tasklist /fi \"pid eq " ++ OsPid ++ "\" /fo LIST 2>&1 ", + Cmd = "wmic process where processid=" ++ OsPid ++ " get WorkingSetSize /value 2>&1", CmdOutput = os:cmd(Cmd), - %% Memory usage is displayed in kilobytes - %% with comma-separated thousands - case re:run(CmdOutput, "Mem Usage:\\s+([0-9,]+)\\s+K", [{capture, all_but_first, list}]) of + %% Memory usage is displayed in bytes + case re:run(CmdOutput, "WorkingSetSize=([0-9]+)", [{capture, all_but_first, binary}]) of {match, [Match]} -> - NoCommas = [ N || N <- Match, N =/= $, ], - {ok, list_to_integer(NoCommas) * 1024}; + {ok, binary_to_integer(Match)}; _ -> {error, {unexpected_output_from_command, Cmd, CmdOutput}} end; diff --git a/test/config_schema_SUITE_data/rabbit.snippets b/test/config_schema_SUITE_data/rabbit.snippets index 03a687db66..5d03ba1b13 100644 --- a/test/config_schema_SUITE_data/rabbit.snippets +++ b/test/config_schema_SUITE_data/rabbit.snippets @@ -310,6 +310,46 @@ tcp_listen_options.exit_on_close = false", {verify,verify_peer}, {fail_if_no_peer_cert,false}]}]}], []}, + {ssl_options_honor_cipher_order, + "listeners.ssl.1 = 5671 + ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem + ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem + ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem + ssl_options.depth = 2 + ssl_options.verify = verify_peer + ssl_options.fail_if_no_peer_cert = false + ssl_options.honor_cipher_order = true", + [{rabbit, + [{ssl_listeners,[5671]}, + {ssl_options, + [{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"}, + {certfile,"test/config_schema_SUITE_data/certs/cert.pem"}, + {keyfile,"test/config_schema_SUITE_data/certs/key.pem"}, + {depth,2}, + {verify,verify_peer}, + {fail_if_no_peer_cert, false}, + {honor_cipher_order, true}]}]}], + []}, + {ssl_options_honor_ecc_order, + "listeners.ssl.1 = 5671 + ssl_options.cacertfile = test/config_schema_SUITE_data/certs/cacert.pem + ssl_options.certfile = test/config_schema_SUITE_data/certs/cert.pem + ssl_options.keyfile = test/config_schema_SUITE_data/certs/key.pem + ssl_options.depth = 2 + ssl_options.verify = verify_peer + ssl_options.fail_if_no_peer_cert = false + ssl_options.honor_ecc_order = true", + [{rabbit, + [{ssl_listeners,[5671]}, + {ssl_options, + [{cacertfile,"test/config_schema_SUITE_data/certs/cacert.pem"}, + {certfile,"test/config_schema_SUITE_data/certs/cert.pem"}, + {keyfile,"test/config_schema_SUITE_data/certs/key.pem"}, + {depth,2}, + {verify,verify_peer}, + {fail_if_no_peer_cert, false}, + {honor_ecc_order, true}]}]}], + []}, {ssl_cert_login_from, "ssl_cert_login_from = common_name", [{rabbit,[{ssl_cert_login_from,common_name}]}], diff --git a/test/term_to_binary_compat_prop_SUITE.erl b/test/term_to_binary_compat_prop_SUITE.erl index 69aa63433d..ba5069860a 100644 --- a/test/term_to_binary_compat_prop_SUITE.erl +++ b/test/term_to_binary_compat_prop_SUITE.erl @@ -27,7 +27,7 @@ all() -> [ - pre_3_6_11_works, + ensure_term_to_binary_defaults_to_version_1, term_to_binary_latin_atom, queue_name_to_binary ]. @@ -47,19 +47,32 @@ end_per_suite(Config) -> init_per_testcase(Testcase, Config) -> rabbit_ct_helpers:testcase_started(Config, Testcase). -%% If this test fails - the erlang version is not supported in -%% RabbitMQ-3.6.10 and earlier. -pre_3_6_11_works(Config) -> - Property = fun () -> prop_pre_3_6_11_works(Config) end, - rabbit_ct_proper_helpers:run_proper(Property, [], - ?ITERATIONS_TO_RUN_UNTIL_CONFIDENT). - -prop_pre_3_6_11_works(_Config) -> +%% R16B03 defaults term_to_binary version to 0, this test would always fail +ensure_term_to_binary_defaults_to_version_1(Config) -> + CurrentERTS = erlang:system_info(version), + MinimumTestedERTS = "6.0", + case rabbit_misc:version_compare(CurrentERTS, MinimumTestedERTS, gte) of + true -> + Property = fun () -> + prop_ensure_term_to_binary_defaults_to_version_1(Config) + end, + rabbit_ct_proper_helpers:run_proper( + Property, [], + ?ITERATIONS_TO_RUN_UNTIL_CONFIDENT); + false -> + ct:pal( + ?LOW_IMPORTANCE, + "This test require ERTS ~p or above, running on ~p~n" + "Skipping test...", + [MinimumTestedERTS, CurrentERTS]) + end. + +prop_ensure_term_to_binary_defaults_to_version_1(_Config) -> ?FORALL(Term, any(), begin Current = term_to_binary(Term), Compat = term_to_binary_compat:term_to_binary_1(Term), - binary_to_term(Current) =:= binary_to_term(Compat) + Current =:= Compat end). term_to_binary_latin_atom(Config) -> |
