summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* clustering_management_SUITE: Just wait for PID file content to changeJean-Sébastien Pédron2019-09-161-6/+11
| | | | | | Don't try to check if the referenced process is alive or not. It could be gone already and that's the job of rabbitmqtl(8): this testcase kind of reimplemented the wait command.
* clustering_management_SUITE: Account for the fact that the PID file is removedJean-Sébastien Pédron2019-09-161-5/+9
| | | | | | | ... when a node is stopped. Therefore, watch more frequently that PID file to increase the chance of seeing it.
* feature_flags_SUITE: Increase a timer:sleep/1 to help with timing issuesJean-Sébastien Pédron2019-09-161-1/+1
|
* Merge pull request #2106 from rabbitmq/rebalance-all-queuesKarl Nilsson2019-09-135-2/+341
|\ | | | | Rebalance all queues
| * Test rebalancedcorbacho2019-09-133-6/+120
| | | | | | | | [#166480197]
| * Refactor rebalance of mirrored and quorum queuesDiana Corbacho2019-09-134-212/+149
| | | | | | | | [#166480197]
| * Rebalance mirrored queuesDiana Corbacho2019-09-131-0/+137
| | | | | | | | [#166480197]
| * Rebalance quorum queuesDiana Corbacho2019-09-132-1/+152
|/ | | | [#166551605]
* test/feature_flags_SUITE_data/my_plugin: Convert symlinks to MakefilesJean-Sébastien Pédron2019-09-133-2/+4
| | | | | | | | | ... and those Makefiles include the previous symlink targets. This way, the test plugin is buildable on a system without Unix symlink support like Windows. (cherry picked from commit 85fb789de05f3b7daedf487e7a4221e69c8ef5f2)
* Update rabbitmq-components.mkkjnilsson2019-09-131-1/+1
|
* Merge pull request #2100 from tomyouyou/masterv3.8.0-rc.1Michael Klishin2019-09-071-9/+11
|\ | | | | force to flush segments when recovering a message with last non-CleanShutdown.
| * force to flush segments when recovering a message with last non-CleanShutdown. tomyouyou2019-09-071-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the broker shutdown before queue process call "rabbit_queue_index:flush", there might be only ?PUB and ack of a message in the queue's journal file. restart the broker, a crash would happen when recover_journal. to reproduce the issue by the following steps: 1. Disable flush in rabbit_queue_index, Just for reproducing the problem more easily. 2. delcare a durable queue and an exchange. [root@controller2 erlang]# date;python msg_test.py create_queue 192.168.1.66 'queue=q11;durable=true' Sat Sep 7 15:53:20 CST 2019 connent to 192.168.1.66 ok 2019-09-07 15:53:20.264 create_queue q11 2019-09-07 15:53:20.293 to close connection [root@controller2 erlang]# date;python msg_test.py create_exchange 192.168.1.66 'exchange=ex11;exchange_type=topic' Sat Sep 7 15:53:20 CST 2019 connent to 192.168.1.66 ok 2019-09-07 15:53:20.461 create_exchange ex11 topic 2019-09-07 15:53:20.463 to close connection [root@controller2 erlang]# date;python msg_test.py bind 192.168.1.66 'exchange=ex11;queue=q11;routing_key=exq11' Sat Sep 7 15:53:21 CST 2019 connent to 192.168.1.66 ok 2019-09-07 15:53:21.263 bind ex11 q11 r_key:exq11 2019-09-07 15:53:21.266 to close connection 3. publish a persistent message. [root@controller2 erlang]# date;python msg_test.py publish 192.168.1.66 'exchange=ex11;routing_key=exq11;msg="_unique_id:123";persistent=true;count=1' Sat Sep 7 15:53:34 CST 2019 connent to 192.168.1.66 ok 2019-09-07 15:53:34.642 publish ex11 r_key:exq11, 0 2019-09-07 15:53:35.643 to close connection 4. kill the broker. the system auto-restart the broker which will call recover_message with non-CleanShutdown. [root@controller2 erlang]# date;pkill -9 beam Sat Sep 7 15:54:15 CST 2019 5. create a consumer, attach it to the queue. It will receive and ack the last recovered message. [root@controller2 erlang]# date;python msg_test.py consume 192.168.1.66 'queue=q11;auto_ack=false' Sat Sep 7 15:55:47 CST 2019 connent to 192.168.1.66 ok 2019-09-07 15:55:47.529 [*] Waiting for messages from q11. To exit press CTRL+C 2019-09-07 15:55:47.529 [x] Received '_unique_id:0 aaaaaaa' ack:True delivery_tag:1 sleep:0 ^C2019-09-07 15:56:12.692 BaseException 2019-09-07 15:56:12.693 to close connection 6. now in the queue's journal file, there are only ?PUB and ack of the message. restart the broker, a crash should occur when calling recover_journal. [root@controller2 erlang]# date;systemctl restart rabbitmq-server Sat Sep 7 15:56:24 CST 2019 7. the crash information in the /var/log/rabbitmq/rabbit@controller2.log: ** Reason for termination == ** {{case_clause,{{true,<<10,5,11,69,10,165,64,237,79,106,53,20,96,22,129,137,0,0,0,0,0,0,0,0,0,0,0,113>>,<<131,104,6,100,0,13,98,97,115,105,99,95,109,101,115,115,97,103,101,104,4,100,0,8,114,101,115,111,117,114,99,101,109,0,0,0,1,47,100,0,8,101,120,99,104,97,110,103,101,109,0,0,0,4,101,120,49,49,108,0,0,0,1,109,0,0,0,5,101,120,113,49,49,106,104,7,100,0,7,99,111,110,116,101,110,116,97,60,100,0,4,110,111,110,101,109,0,0,0,3,16,0,2,100,0,25,114,97,98,98,105,116,95,102,114,97,109,105,110,103,95,97,109,113,112,95,48,95,57,95,49,108,0,0,0,1,109,0,0,0,113,95,117,110,105,113,117,101,95,105,100,58,48,32,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,106,104,4,100,0,14,99,111,110,116,101,110,116,95,116,114,97,99,101,100,100,0,5,102,97,108,115,101,104,3,100,0,9,117,110,100,101,102,105,110,101,100,100,0,9,117,110,100,101,102,105,110,101,100,100,0,9,117,110,100,101,102,105,110,101,100,110,6,0,178,202,182,10,109,1,109,0,0,0,16,10,5,11,69,10,165,64,237,79,106,53,20,96,22,129,137,100,0,4,116,114,117,101>>},no_del,no_ack}},[{rabbit_queue_index,action_to_entry,3,[{file,"src/rabbit_queue_index.erl"},{line,838}]},{rabbit_queue_index,add_to_journal,3,[{file,"src/rabbit_queue_index.erl"},{line,814}]},{rabbit_queue_index,add_to_journal,3,[{file,"src/rabbit_queue_index.erl"},{line,805}]},{rabbit_queue_index,parse_journal_entries,2,[{file,"src/rabbit_queue_index.erl"},{line,958}]},{rabbit_queue_index,recover_journal,1,[{file,"src/rabbit_queue_index.erl"},{line,932}]},{rabbit_queue_index,init_dirty,3,[{file,"src/rabbit_queue_index.erl"},{line,622}]},{rabbit_variable_queue,init,6,[{file,"src/rabbit_variable_queue.erl"},{line,570}]},{rabbit_priority_queue,init,3,[{file,"src/rabbit_priority_queue.erl"},{line,151}]}]}
* | Merge pull request #2096 from tomyouyou/masterMichael Klishin2019-09-061-4/+4
|\ \ | |/ | | call "add_to_journal" before "maybe_flush_pre_publish_cache" in pre_publish
| * call "add_to_journal" before "maybe_flush_pre_publish_cache"tomyouyou2019-09-041-4/+4
| | | | | | | | | | | | | | | | To reproduce the issue: 1. pre_publish a delivered message. 2. Put its SeqId into delivered_cache, and might call "flush_pre_publish_cache" and "flush_delivered_cache", then put its "del" data into the journal_entries of the corresponding segment. 3. Call add_to_journal and action_to_entry with a "?PUB" Action. 4. in action_to_entry, "array:get(RelSeq, JEntries)" will return {no_pub, del, no_ack}, but has none case for a "?PUB" Action, so an error will occur like "{{case_clause,{no_pub,del,no_ack}},[{rabbit_queue_index,action_to_entry,3..."
* | unit_inbroker_non_parallel_SUITE: Adapt ↵Jean-Sébastien Pédron2019-09-051-2/+6
| | | | | | | | | | | | `log_file_fails_to_initialise_during_startup` to Windows USe `C:\Windows` as the non-writable directory there.
* | Merge pull request #2097 from rabbitmq/rabbitmq-website-502Michael Klishin2019-09-051-0/+1
|\ \ | | | | | | Modify html docs to not use smart quotes
| * | Modify html docs to not use smart quotesLuke Bakken2019-09-041-0/+1
|/ / | | | | | | Fixes rabbitmqr/rabbitmq-website#502
* | unit_inbroker_non_parallel_SUITE: Support `disk_monitor_enable` testcase on ↵Jean-Sébastien Pédron2019-09-041-10/+13
| | | | | | | | | | | | Windows We simply add the output of `dir` to the testcase.
* | unit_inbroker_non_parallel_SUITE: Mark log files as writable before deleting ↵Jean-Sébastien Pédron2019-09-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | them On Unix, the system checks the permissions of the directory holding a file to determine if a file can be removed or not: if there is write permission on a directory, a file in this directory can be removed, even though the file itself might be read-only. On Windows however, a read-only file cannot be removed: trying to do so returns `EACCES`. Therefore, in the `log_management` testcase, after testing the behavior with read-only log files, we must mark them as writable again before we clean them up. Otherwise, the testcase fails on Windows.
* | unit_SUITE: Use `;` as the plugins path separator on WindowsJean-Sébastien Pédron2019-09-041-2/+7
| |
* | Update rabbitmq-components.mkkjnilsson2019-09-041-1/+1
| |
* | Merge pull request #2095 from rabbitmq/disk-monitor-and-long-paths-on-windowsLuke Bakken2019-09-031-1/+22
|\ \ | | | | | | rabbit_disk_monitor: Tell Win32 API to not enforce path limits to dir's argument
| * | rabbit_disk_monitor: Tell Win32 API to not enforce path limits to dir's argumentJean-Sébastien Pédron2019-09-021-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows, the Win32 API enforces a limit of 260 characters (MAX_PATH). If we call `dir` with a path longer than that, it fails with "File not found". Starting with Windows 10 version 1607, this limit was removed, but the administrator has to configure that. NTFS supports paths up to 32767 characters. Therefore, paths longer than 260 characters exist but they are "inaccessible" to `dir`. A workaround is to tell the Win32 API to not parse a path and just pass it raw to the underlying filesystem. To do this, the path must be prepended with "\\?\". That's what we do here. However, the underlying filesystem may not support forward slashes transparently, as the Win32 API does. Therefore, we convert all forward slashes to backslashes. See the following page to learn more about this: https://ss64.com/nt/syntax-filenames.html This was discovered while working on the common_test testsuites on Windows: we store RabbitMQ data files under common_test's `log_private` directory and we can quickly reach the 260-character limit.
* | | Merge pull request #2092 from tomyouyou/masterMichael Klishin2019-09-031-1/+1
|\ \ \ | |/ / |/| / | |/ QI: correctly update pre-publish cache/list
| * Update rabbit_queue_index.erltomyouyou2019-08-311-1/+1
| | | | | | bug: fix the wrong lists operation in pre_publish
* | rabbit_disk_monitor: Fix format string to correctly log an integerJean-Sébastien Pédron2019-09-021-1/+1
| |
* | scripts/*.bat: Exit with CLI's exit status, not 1Jean-Sébastien Pédron2019-08-305-5/+5
| | | | | | | | | | This way the scripts really propagate the intended exit status to the outer world.
* | Merge pull request #2091 from rabbitmq/remove-ra-hrlD Corbacho2019-08-306-30/+27
|\ \ | | | | | | Remove use of ra.hrl
| * | Remove use of ra.hrlkjnilsson2019-08-306-30/+27
| | | | | | | | | | | | | | | | | | | | | As this is an internal header now. Rename use of maybe/1 type to option to avoid confusion with rabbit_types:maybe/1 which is different.
* | | Merge pull request #2080 from rabbitmq/vhost-descriptionMichael Klishin2019-08-3016-130/+497
|\ \ \ | |_|/ |/| | Add virtual host description and tags
| * | Make virtual host record versionedDiana Corbacho2019-08-3016-130/+497
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add metadata fields to virtual host Address feedback in #2080 * Switch to functions for vhost record accessors * Restore rabbit_vhost:list/0 behavior, introduce rabbit_vhost:all/0 to compensate * Store tags as an array of atoms, the same way we do for user tags * Type spec fixes * Other minor interface improvements suggested by @dumbbell Co-Authored-By: Michael Klishin <mklishin@pivotal.io> [#166298298]
* | feature_flags_SUITE: Stop nodes if feature flags are unavailableJean-Sébastien Pédron2019-08-301-0/+2
| |
* | Update erlang.mkJean-Sébastien Pédron2019-08-291-4/+4
|/
* Merge pull request #2089 from rabbitmq/use-werl-on-windows-for-interactive-shellLuke Bakken2019-08-281-1/+7
|\ | | | | scripts/rabbitmq-server.bat: Use `werl.exe` when user wants a shell
| * scripts/rabbitmq-server.bat: Use `werl.exe` when user wants a shellJean-Sébastien Pédron2019-08-281-1/+7
|/ | | | | Compared to `erl.exe`, `werl.exe` has proper line editing and commands history, like Unix' `erl`.
* Merge pull request #2088 from rabbitmq/fix-rabbitmq-env.bat-filter_paths-quotingLuke Bakken2019-08-281-2/+2
|\ | | | | rabbitmq-env.bat: Quote the expansion of %1 in `filter_path`
| * rabbitmq-env.bat: Quote the expansion of %1 in `filter_path`Jean-Sébastien Pédron2019-08-281-2/+2
|/ | | | | | | | | | | | | | | Otherwise, paths containing parenthesis such as `C:/Program Files (x86)/...` get mis-interpreted and the function fails. In my testing, the error was: \Elixir\lib\elixir was unexpected ... based on the fact that Elixir is installed in `C:\Program Files (x86)\Elixir`. While here, explicitely calls `rabbitmqctl.bat`, not `rabbitmqctl`. The latter might be available and picked in a Git clone.
* Merge pull request #2087 from rabbitmq/lrb-ensure-env-var-set-win32Luke Bakken2019-08-281-3/+4
|\ | | | | On Win32, ensure RABBITMQ_FEATURE_FLAGS_FILE_source is set to "environment" correctly
| * Refer to rabbitmqctl.bat using .bat extension on win32Luke Bakken2019-08-281-3/+3
| |
| * Set RABBITMQ_FEATURE_FLAGS_FILE_source=environment correctly on win32Luke Bakken2019-08-281-0/+1
|/
* channel_source suite: remove an assertion that relies on unobfuscated passwordv3.8.0-beta.7Michael Klishin2019-08-181-3/+0
| | | | | | | in connection parameters. It doesn't seem to matter in the test at hand anyway. References rabbitmq/rabbitmq-erlang-client#123.
* Merge pull request #2082 from rabbitmq/optimise-erlang-timersMichael Klishin2019-08-171-1/+1
|\ | | | | Replace timer:send_after/3 by erlang:send_after/3
| * Replace timer:send_after/3 by erlang:send_after/3Diana Corbacho2019-08-161-1/+1
|/ | | | [#167926549]
* Merge pull request #2081 from rabbitmq/fix-consumers/1-when-queue-is-goneMichael Klishin2019-08-151-3/+4
|\ | | | | rabbit_amqqueue: Return empty list in consumers/1 when the queue is gone
| * rabbit_amqqueue: Return empty list in consumers/1 when the queue is goneJean-Sébastien Pédron2019-08-141-3/+4
| | | | | | | | | | | | | | | | This seems to happen in our CI quite frequently with `queue_parallel_SUITE`. In this testsuite, testcases are executed in parallel. At least the `basic_cancel` testcase queries all consumers of all queues: if an unrelated testcase finishes in parallel and thus deletes its queue(s), the call to `consumers_all/1` crashes.
* | channel_source_SUITE: Wait for channel terminationJean-Sébastien Pédron2019-08-141-4/+18
| | | | | | | | | | | | ... which could take some time after connection close. This is mostly a guess, based on the transient failures I see in CI. Hopefully it will help there.
* | cluster_rename_SUITE: Bump timetrap from 8 to 15 minutesJean-Sébastien Pédron2019-08-141-1/+1
|/
* Merge pull request #2078 from rabbitmq/rabbitmq-server-2059-log-rotation-masterMichael Klishin2019-08-148-131/+116
|\ | | | | Fix log rotation on Windows (master)
| * Remove short name formattingLuke Bakken2019-08-138-131/+116
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix missing quote in mkdir argument to handle directories with spaces properly on Windows Ensure paths are double-quoted when necessary Ensure all win32 paths have forward slashes. Use more typical escaping of double quotes Do not convert to a binary as that has bad effects when the msg store dir base has extended ASCII characters, as when setting RABBITMQ_BASE to C:/ProgramData/Tést Directory (frazzle)/RabbitMQ Add "t" modifier to format strings for values that may be unicode Remove use of unquote as it only works when the second arg is not double-quoted when called, but that version fails on paths with spaces. De-quote ALL THE THINGS Update rabbitmq-components.mk (cherry picked from commit a515903662566e0fc158918bc1c42fc1a0a8384a) Log file management suite: adapt to Lager 3.8 I observed no functional changes around log rotation. These assertions depend on internal file management aspects of Lager, so let's update them and see. References #2068, #2059. (cherry picked from commit d6e7c3841c5f01933e9182da1701bd2ac74eb1ff) (cherry picked from commit 6a9eb18ca1f1f3d5166e923f54f4ed349a1b95a2) Replace dequote function with replace syntax, which works with unicode characters
* Merge pull request #2075 from rabbitmq/configure-cluster-nameGerhard Lazu2019-08-124-5/+36
|\ | | | | Make it possible to pre-configure cluster name via config