This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_notes.txt
276 lines (181 loc) · 5.44 KB
/
test_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
1. Cluster summary
./mm --summary
- CI Test OK
2. Replication state summary
./mm --repl
- CI Test OK
3. server_status tests
./mm --server_status instance
./mm --server_status asserts
./mm --server_status flushing
./mm --server_status journaling
./mm --server_status extra_info
./mm --server_status connections
./mm --server_status global_lock
./mm --server_status network
./mm --server_status opcounters
./mm --server_status opcounters_repl
./mm --server_status security
./mm --server_status storage_engine
./mm --server_status memory
- CI Test OK Only instance
4. host_info
./mm --host_info system
./mm --host_info os
./mm --host_info extra
./mm --host_info help
- CI Test OK Only system
5. db_hashes
./mm --db_hashes
./mm --db_hashes --verbose_display
- CI Test OK
6. databases
./mm --databases
- CI Test OK
7. --stepdown test
./mm --step_down rs0
./mm --step_down rs1
./mm --step_down rs2
- CI test OK.
8. Nominate step down test (specifics probably need changing)
./mm --step_down_nominate_host rhysmacbook.local --step_down_nominate_port 30001 --step_down rs0
- CI Test NOK
9. Replset freeze (specifics probably need changing)
./mm --step_down_nominate_host rhysmacbook.local --step_down_nominate_port 30003 --step_down rs0 --replset_freeze 60
- CI test SKIPPED
10. profiling test (with --slowms)
./mm --profiling -1 --database test
./mm --profiling 0 --database test
./mm --profiling 1 --database test
./mm --profiling 2 --database test
./mm --profiling 2 --slowms 10 --database test
./mm --profiling 2 --slowms 100 --database test
./mm --profiling 0 --database tests
- CI Test ADDED
11. --sharding test
./mm --sharding
- CI Test NOK
12. Validate indexes
./mm --validate_indexes test.sample_messages
./mm --validate_indexes test.rhys
./mm --validate_indexes test.restaurants
- CI Test SKIPPED
13. Collection stats
./mm --collection_stats test.restaurants
- CI test ADDED
14. Database stats
./mm --database_stats test
15. Show collections
./mm --show_collections test
- CI test ADDED
16. Custom command
./mm --command '{ "profile": -1 }'
- CI test SKIPPED
17. Balancing
./mm --balancing disable --collection test.sample_messages
./mm --balancing enable --collection test.sample_messages
- CI test SKIPPED
18. Verbose display
./mm --db_hashes --verbose_display
- CI test SKIPPED
19. A few tests with the --inc_mongos flag
./mm --server_status instance --inc_mongos
./mm --server_status asserts --inc_mongos
./mm --host_info os --inc_mongos
./mm --host_info extra --inc_mongos
- CI test ADDED
20. A few tests with the repeat & interval flags
./mm --repl --repeat 5
./mm --server_status opcounters --repeat 10
./mm --server_status opcounters --repeat 10 --interval 1
./mm --server_status opcounters_repl --repeat 3 --interval 3
- CI Test ADDED
21. Test the --balancing_state flag
./mm --balancing_state state
# remove document if in the config.settings collection
mongo admin -u admin -p
use config
db.settings.remove( { "_id": "balancer" } );
./mm --balancing_state state # should return true
./mm --balancing_state disable
./mm --balancing_state state # should return false
./mm --balancing_state enable
./mm --balancing_state state # should return true
- CI Test SKIPPED. Problems with cmd
22. Tests host down handling...
cd /Users/rhys1/Documents/github_projects/mmo/bash
. mmo_mongodb_cluster.sh
cd /Users/rhys1/Documents/github_projects/mmo/python/app/
./mm --repl
./mm --summary
mmo_kill_random_replset rs0 1
./mm --repl
./mm --summary
mmo_raise_repl_set_from_the_dead rs0
./mm --repl
./mm --summary
mmo_kill_replset rs2
./mm --repl
./mm --summary
mmo_raise_repl_set_from_the_dead rs2
./mm --repl
./mm --summary
23. Schema summary
./mm --schema_summary test.restaurants
./mm --schema_summary test.restaurants --schema_summary_limit 10
./mm --schema_summary test.restaurants --schema_summary_limit 1000
- CI TEST SKIPPED. Erir with cmd
24. --plan_cache methods
./mm --plan_cache test.restaurants
mongo admin -u admin -p
mongo> use test
mongo> db.restaurants.find({ "name": {"$gt": "Rhys"}, "restaurant_id": "12345", "address.zipcode": {"$gt":"3172"}});
mongo> exit
TODO
- CI TEST SKIPPED
25. --chunks
./mm --chunks
- CI TEST SKIPPED - Error in cmd
26. Test --repl screen state change detection
./mm --repl
./mm --step_down rs0
./mm --step_down rs1
./mm --step_down rs2
Wait one min
./mm --repl
27. Test handling of repl screen when entire replicasets are down...
./mm --repl --stacktrace
mmo_kill_replset rs0
./mm --repl --stacktrace
mmo_kill_replset rs1
./mm --repl --stacktrace
mmo_kill_replset rs2
./mm --repl --stacktrace
mmo_raise_repl_set_from_the_dead rs0
./mm --repl --stacktrace
mmo_raise_repl_set_from_the_dead rs1
./mm --repl --stacktrace
mmo_raise_repl_set_from_the_dead rs2
./mm --repl --stacktrace
28. Test --shell feature
./mm --shell --database admin
29. Test handling of single node shards
If there's not already one setup add one with...
mmo_create_single_node_shard
./mm --repl
# Can we handle single shard node downtime
mmo_kill_replset rs3
./mm --repl # Not currently working. Probably need custom code for the repl screen as it's getting messy
./mm --summary # Works
30. Test polling
./mm --server_status opcounters --poll
./mm --server_status asserts --poll
./mm --server_status network --poll
- CI TEST SKIPPED
# Build & Upload Package
```bash
cd python
rm dist/*
python setup.py bdist_wheel && python -m pip install dist/mongodbmanager-*-py3-none-any.whl --force-reinstall
python -m twine upload dist/* # Prompts for pypi.org password
```