xfrin_notify_handling.feature 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. Feature: Xfrin incoming notify handling
  2. Tests for Xfrin incoming notify handling.
  3. Scenario: Handle incoming notify
  4. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  5. And wait for master stderr message BIND10_STARTED_CC
  6. And wait for master stderr message CMDCTL_STARTED
  7. And wait for master stderr message AUTH_SERVER_STARTED
  8. And wait for master stderr message XFROUT_STARTED
  9. And wait for master stderr message ZONEMGR_STARTED
  10. And wait for master stderr message STATS_STARTING
  11. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  12. And wait for bind10 stderr message BIND10_STARTED_CC
  13. And wait for bind10 stderr message CMDCTL_STARTED
  14. And wait for bind10 stderr message AUTH_SERVER_STARTED
  15. And wait for bind10 stderr message XFRIN_STARTED
  16. And wait for bind10 stderr message ZONEMGR_STARTED
  17. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  18. #
  19. # Test1 for Xfrout statistics
  20. #
  21. # check initial statistics
  22. #
  23. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  24. last bindctl output should not contain "error"
  25. last bindctl output should not contain "example.org."
  26. The statistics counters are 0 in category .Xfrout.zones._SERVER_
  27. When I query statistics ixfr_running of bind10 module Xfrout with cmdctl port 47804
  28. The statistics counters are 0 in category .Xfrout
  29. When I query statistics axfr_running of bind10 module Xfrout with cmdctl port 47804
  30. The statistics counters are 0 in category .Xfrout
  31. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  32. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  33. | item_name | min_value | max_value |
  34. | open | 0 | 1 |
  35. #
  36. # Test2 for Xfrin statistics
  37. #
  38. # check initial statistics
  39. #
  40. When I query statistics zones of bind10 module Xfrin with cmdctl
  41. last bindctl output should not contain "error"
  42. The statistics counters are 0 in category .Xfrin.zones._SERVER_
  43. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  44. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  45. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  46. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  47. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  48. Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
  49. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
  50. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  51. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  52. A query for www.example.org to [::1]:47806 should have rcode NOERROR
  53. #
  54. # Test3 for Xfrout statistics
  55. #
  56. # check statistics change
  57. #
  58. # wait until the last stats requesting is finished
  59. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  60. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  61. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  62. last bindctl output should not contain "error"
  63. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  64. The statistics counters are 0 in category .Xfrout.zones except for the following items
  65. | item_name | item_value |
  66. | _SERVER_.notifyoutv6 | 5 |
  67. | _SERVER_.xfrreqdone | 1 |
  68. | example.org..notifyoutv6 | 5 |
  69. | example.org..xfrreqdone | 1 |
  70. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  71. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  72. | item_name | item_value |
  73. | open | 1 |
  74. | accept | 1 |
  75. #
  76. # Test4 for Xfrin statistics
  77. #
  78. # check statistics change
  79. #
  80. # wait until the last stats requesting is finished
  81. When I query statistics zones of bind10 module Xfrin with cmdctl
  82. wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  83. wait for new bind10 stderr message XFRIN_RECEIVED_GETSTATS_COMMAND
  84. last bindctl output should not contain "error"
  85. When I query statistics zones of bind10 module Xfrin with cmdctl
  86. The statistics counters are 0 in category .Xfrin.zones except for the following items
  87. | item_name | item_value | min_value |
  88. | _SERVER_.soaoutv6 | 1 | |
  89. | _SERVER_.axfrreqv6 | 1 | |
  90. | _SERVER_.xfrsuccess | 1 | |
  91. | _SERVER_.latest_axfr_duration | | 0.0 |
  92. | example.org..soaoutv6 | 1 | |
  93. | example.org..axfrreqv6 | 1 | |
  94. | example.org..xfrsuccess | 1 | |
  95. | example.org..latest_axfr_duration | | 0.0 |
  96. #
  97. # Test for Xfr request rejected
  98. #
  99. Scenario: Handle incoming notify (XFR request rejected)
  100. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  101. And wait for master stderr message BIND10_STARTED_CC
  102. And wait for master stderr message CMDCTL_STARTED
  103. And wait for master stderr message AUTH_SERVER_STARTED
  104. And wait for master stderr message XFROUT_STARTED
  105. And wait for master stderr message ZONEMGR_STARTED
  106. And wait for master stderr message STATS_STARTING
  107. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  108. And wait for bind10 stderr message BIND10_STARTED_CC
  109. And wait for bind10 stderr message CMDCTL_STARTED
  110. And wait for bind10 stderr message AUTH_SERVER_STARTED
  111. And wait for bind10 stderr message XFRIN_STARTED
  112. And wait for bind10 stderr message ZONEMGR_STARTED
  113. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  114. #
  115. # Test5 for Xfrout statistics
  116. #
  117. # check initial statistics
  118. #
  119. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  120. last bindctl output should not contain "error"
  121. last bindctl output should not contain "example.org."
  122. The statistics counters are 0 in category .Xfrout.zones._SERVER_
  123. When I query statistics ixfr_running of bind10 module Xfrout with cmdctl port 47804
  124. The statistics counters are 0 in category .Xfrout
  125. When I query statistics axfr_running of bind10 module Xfrout with cmdctl port 47804
  126. The statistics counters are 0 in category .Xfrout
  127. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  128. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  129. | item_name | min_value | max_value |
  130. | open | 0 | 1 |
  131. #
  132. # Test6 for Xfrin statistics
  133. #
  134. # check initial statistics
  135. #
  136. When I query statistics zones of bind10 module Xfrin with cmdctl
  137. last bindctl output should not contain "error"
  138. The statistics counters are 0 in category .Xfrin.zones._SERVER_
  139. #
  140. # set transfer_acl rejection
  141. # Local xfr requests from Xfrin module would be rejected here.
  142. #
  143. When I send bind10 the following commands with cmdctl port 47804
  144. """
  145. config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "::1"}]
  146. config commit
  147. """
  148. last bindctl output should not contain Error
  149. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  150. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  151. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  152. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  153. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  154. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_VIOLATION not XFRIN_XFR_TRANSFER_STARTED
  155. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  156. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  157. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  158. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  159. #
  160. # Test7 for Xfrout statistics
  161. #
  162. # check statistics change
  163. #
  164. # wait until the last stats requesting is finished
  165. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  166. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  167. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  168. last bindctl output should not contain "error"
  169. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  170. The statistics counters are 0 in category .Xfrout.zones except for the following items
  171. | item_name | item_value | min_value |
  172. | _SERVER_.notifyoutv6 | 5 | |
  173. | _SERVER_.xfrrej | | 1 |
  174. | example.org..notifyoutv6 | 5 | |
  175. | example.org..xfrrej | | 1 |
  176. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  177. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  178. | item_name | item_value |
  179. | open | 1 |
  180. | accept | 1 |
  181. #
  182. # Test8 for Xfrin statistics
  183. #
  184. # check statistics change
  185. #
  186. # wait until the last stats requesting is finished
  187. When I query statistics zones of bind10 module Xfrin with cmdctl
  188. wait for new bind10 stderr message STATS_SEND_STATISTICS_REQUEST
  189. wait for new bind10 stderr message XFRIN_RECEIVED_GETSTATS_COMMAND
  190. last bindctl output should not contain "error"
  191. When I query statistics zones of bind10 module Xfrin with cmdctl
  192. The statistics counters are 0 in category .Xfrin.zones except for the following items
  193. | item_name | min_value |
  194. | _SERVER_.soaoutv6 | 1 |
  195. | _SERVER_.axfrreqv6 | 1 |
  196. | _SERVER_.xfrfail | 1 |
  197. | example.org..soaoutv6 | 1 |
  198. | example.org..axfrreqv6 | 1 |
  199. | example.org..xfrfail | 1 |
  200. #
  201. # Test for unreachable slave
  202. #
  203. Scenario: Handle incoming notify (unreachable slave)
  204. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  205. And wait for master stderr message BIND10_STARTED_CC
  206. And wait for master stderr message CMDCTL_STARTED
  207. And wait for master stderr message AUTH_SERVER_STARTED
  208. And wait for master stderr message XFROUT_STARTED
  209. And wait for master stderr message ZONEMGR_STARTED
  210. And wait for master stderr message STATS_STARTING
  211. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  212. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  213. Then wait for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  214. Then wait for new master stderr message NOTIFY_OUT_TIMEOUT
  215. #
  216. # Test9 for Xfrout statistics
  217. #
  218. # check statistics change
  219. #
  220. # wait until the last stats requesting is finished
  221. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  222. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  223. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  224. last bindctl output should not contain "error"
  225. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  226. The statistics counters are 0 in category .Xfrout.zones except for the following items
  227. | item_name | min_value |
  228. | _SERVER_.notifyoutv6 | 1 |
  229. | example.org..notifyoutv6 | 1 |
  230. When I query statistics socket of bind10 module Xfrout with cmdctl port 47804
  231. The statistics counters are 0 in category .Xfrout.socket.unixdomain except for the following items
  232. | item_name | item_value |
  233. | open | 1 |