xfrin_notify_handling.feature 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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. # Test for statistics
  20. #
  21. # check for 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. Then the statistics counter notifyoutv4 for the zone _SERVER_ should be 0
  27. Then the statistics counter notifyoutv6 for the zone _SERVER_ should be 0
  28. Then the statistics counter xfrrej for the zone _SERVER_ should be 0
  29. Then the statistics counter xfrreqdone for the zone _SERVER_ should be 0
  30. When I query statistics ixfr_running of bind10 module Xfrout with cmdctl port 47804
  31. Then the statistics counter ixfr_running should be 0
  32. Then the statistics counter ixfr_running should be 0
  33. When I query statistics axfr_running of bind10 module Xfrout with cmdctl port 47804
  34. Then the statistics counter axfr_running should be 0
  35. Then the statistics counter axfr_running should be 0
  36. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  37. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  38. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  39. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  40. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  41. Then wait for new bind10 stderr message XFRIN_TRANSFER_SUCCESS not XFRIN_XFR_PROCESS_FAILURE
  42. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_SUCCESS
  43. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  44. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  45. A query for www.example.org to [::1]:47806 should have rcode NOERROR
  46. #
  47. # Test for statistics
  48. #
  49. # check for statistics change
  50. #
  51. # wait until the last stats requesting is finished
  52. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  53. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  54. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  55. last bindctl output should not contain "error"
  56. Then the statistics counter notifyoutv4 for the zone _SERVER_ should be 0
  57. Then the statistics counter notifyoutv4 for the zone example.org. should be 0
  58. Then the statistics counter notifyoutv6 for the zone _SERVER_ should be 5
  59. Then the statistics counter notifyoutv6 for the zone example.org. should be 5
  60. Then the statistics counter xfrrej for the zone _SERVER_ should be 0
  61. Then the statistics counter xfrrej for the zone example.org. should be 0
  62. Then the statistics counter xfrreqdone for the zone _SERVER_ should be 1
  63. Then the statistics counter xfrreqdone for the zone example.org. should be 1
  64. #
  65. # Test for Xfr request rejected
  66. #
  67. Scenario: Handle incoming notify (XFR request rejected)
  68. Given I have bind10 running with configuration xfrin/retransfer_master.conf with cmdctl port 47804 as master
  69. And wait for master stderr message BIND10_STARTED_CC
  70. And wait for master stderr message CMDCTL_STARTED
  71. And wait for master stderr message AUTH_SERVER_STARTED
  72. And wait for master stderr message XFROUT_STARTED
  73. And wait for master stderr message ZONEMGR_STARTED
  74. And wait for master stderr message STATS_STARTING
  75. And I have bind10 running with configuration xfrin/retransfer_slave_notify.conf
  76. And wait for bind10 stderr message BIND10_STARTED_CC
  77. And wait for bind10 stderr message CMDCTL_STARTED
  78. And wait for bind10 stderr message AUTH_SERVER_STARTED
  79. And wait for bind10 stderr message XFRIN_STARTED
  80. And wait for bind10 stderr message ZONEMGR_STARTED
  81. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  82. #
  83. # Test1 for statistics
  84. #
  85. # check for initial statistics
  86. #
  87. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  88. last bindctl output should not contain "error"
  89. last bindctl output should not contain "example.org."
  90. Then the statistics counter notifyoutv4 for the zone _SERVER_ should be 0
  91. Then the statistics counter notifyoutv6 for the zone _SERVER_ should be 0
  92. Then the statistics counter xfrrej for the zone _SERVER_ should be 0
  93. Then the statistics counter xfrreqdone for the zone _SERVER_ should be 0
  94. #
  95. # set transfer_acl rejection
  96. # Local xfr requests from Xfrin module would be rejected here.
  97. #
  98. When I send bind10 the following commands with cmdctl port 47804
  99. """
  100. config set Xfrout/zone_config[0]/transfer_acl [{"action": "REJECT", "from": "::1"}]
  101. config commit
  102. """
  103. last bindctl output should not contain Error
  104. When I send bind10 with cmdctl port 47804 the command Xfrout notify example.org IN
  105. Then wait for new master stderr message XFROUT_NOTIFY_COMMAND
  106. Then wait for new bind10 stderr message AUTH_RECEIVED_NOTIFY
  107. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_NOTIFY
  108. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_STARTED
  109. Then wait for new bind10 stderr message XFRIN_XFR_TRANSFER_PROTOCOL_ERROR not XFRIN_XFR_TRANSFER_STARTED
  110. Then wait for new bind10 stderr message ZONEMGR_RECEIVE_XFRIN_FAILED not ZONEMGR_RECEIVE_XFRIN_SUCCESS
  111. Then wait 5 times for new master stderr message NOTIFY_OUT_SENDING_NOTIFY
  112. Then wait for new master stderr message NOTIFY_OUT_RETRY_EXCEEDED
  113. A query for www.example.org to [::1]:47806 should have rcode NXDOMAIN
  114. #
  115. # Test2 for statistics
  116. #
  117. # check for statistics change
  118. #
  119. # wait until the last stats requesting is finished
  120. wait for new master stderr message STATS_SEND_STATISTICS_REQUEST
  121. wait for new master stderr message XFROUT_RECEIVED_GETSTATS_COMMAND
  122. When I query statistics zones of bind10 module Xfrout with cmdctl port 47804
  123. last bindctl output should not contain "error"
  124. Then the statistics counter notifyoutv4 for the zone _SERVER_ should be 0
  125. Then the statistics counter notifyoutv4 for the zone example.org. should be 0
  126. Then the statistics counter notifyoutv6 for the zone _SERVER_ should be 5
  127. Then the statistics counter notifyoutv6 for the zone example.org. should be 5
  128. # The counts of rejection would be between 1 and 2. They are not
  129. # fixed. It would depend on timing or the platform.
  130. Then the statistics counter xfrrej for the zone _SERVER_ should be greater than 0
  131. Then the statistics counter xfrrej for the zone example.org. should be greater than 0
  132. Then the statistics counter xfrreqdone for the zone _SERVER_ should be 0
  133. Then the statistics counter xfrreqdone for the zone example.org. should be 0