1. 28 Apr, 2020 2 commits
    • Jordan Christiansen's avatar
      Fix typo · a9f56f6a
      Jordan Christiansen authored
      a9f56f6a
    • Nils Goroll's avatar
      When connecting to backends, respect the administrative health · fe5e8265
      Nils Goroll authored
      When making a connection a "real" backend (VBE), we checked the probed
      health state and did not take into account the administrative health
      state as set with `varnishadm backend.set_health ... {healthy,sick}`.
      
      Our documentation was not particularly explicit on this aspect either,
      but the administrative states `sick` and `healthy` made no sense if
      `auto` semantics was implied always. Also, the semantics were implicitly
      documented for `backend.list`.
      
      Implementation note:
      
      The relevant change is to call `VRT_Healthy()`, which does check the
      administrative health, in place of checking `(struct backend *)->sick`
      in `vbe_dir_getfd()`.
      
      As a `VRT_CTX` is required by `VRT_Healthy()`, we change the arguments of
      `vbe_dir_getfd()` accordingly: The busyobj can now be taken from the ctx,
      but the worker argument differs for pipe mode vs. fetch, so we preserve
      it as an explicit argument.
      
      A test for overriding a probed backend as healthy has been added to
      c00048.vtc, which requires a second probe to hit server s1 and fail.
      This is timing sensitive, so I hope that the backend probe interval
      of 5 seconds is long enough for all our test environments. If not,
      we probably need to make it longer or add another vtc.
      
      Fixes #3299
      fe5e8265
  2. 27 Apr, 2020 4 commits
    • Dridi Boukelmoune's avatar
      Dist-clean varnishstat_curses_help.c · 448e2edc
      Dridi Boukelmoune authored
      Since we no longer distribute it...
      448e2edc
    • Dridi Boukelmoune's avatar
      Don't distribute varnishstat_curses_help.c · 0d8eb095
      Dridi Boukelmoune authored
      It's cheap to rebuild, and it might lead to rebuilding it in $(srcdir)
      instead of $(builddir) in a VPATH build. If the source tree is write
      protected this will obviously fail.
      
      Reported by phk.
      0d8eb095
    • Nils Goroll's avatar
      Add VDP_END action for delivery processors · de6288cb
      Nils Goroll authored
      VDP_END marks the end of successful processing, it is issued by
      VDP_DeliverObj() and may also be sent downstream by processors ending
      the stream (for return value != 0)
      
      VDP_END must at most be generated once per processor, so any VDP
      sending it downstream must itself not forward it a second time.
      
      * VDP_bytes()
      
      The only relevant change is the assertion that VDP_END must not be
      received by any VDP more than once. This comes with minor
      restructuring of the handling of the three actions
      
      * VDP_DeliverObj()
      
      Here, VDP_END is pushed down after succesful iteration over the
      objects. We could also send the last storage segment with VDP_END, but
      this would require a change in all stevedores. Unless there is a good
      case for it, I do not see much value in this minor optimization.
      
      * ESI:
      
      In ved_vdp_esi_bytes we now push down VDP_END whenever we are done
      with an ESI object at esi_level == 0.
      
      ved_bytes() handles the pushes from higher esi levels downwards, so
      it now changes VDP_END into VDP_FLUSH. We need to remove the
      additional VDP_FLUSH from ved_deliver because the VDP_END from
      VDP_DeliverObj() needs to be the last bit sent.
      
      The gzgz vdp actually does something which would be impossible for an
      esi_level == 0 VDP: push bytes from _fini. This could be reworked, but
      there is also no need to.
      
      * range VDP
      
      Here we now send the VDP_END with the last segment before the end of
      the range is it.
      
      We also take the opportunity and eleminate null VDP_bytes calls before
      the range is reached.
      
      * rot13 debug VDP
      
      Here we need to ensure that we pass on VDP_END
      de6288cb
    • Poul-Henning Kamp's avatar
      Remove VSB_QUOTE_GLOB, it was committed prematurely and does not · c5e9cf1c
      Poul-Henning Kamp authored
      quite work the way it should.
      c5e9cf1c
  3. 23 Apr, 2020 1 commit
  4. 15 Apr, 2020 1 commit
  5. 14 Apr, 2020 8 commits
  6. 13 Apr, 2020 1 commit
  7. 12 Apr, 2020 4 commits
  8. 10 Apr, 2020 1 commit
  9. 09 Apr, 2020 7 commits
    • Nils Goroll's avatar
      flexelinting take 2 · d33f4a86
      Nils Goroll authored
      d33f4a86
    • Nils Goroll's avatar
      try to make flexelint happy · 7b61372c
      Nils Goroll authored
      		if (e - p < l1 + l2)
      ../../lib/libvarnishapi/vsl_arg.c  133  Info 776: Possible truncation of
          addition
      7b61372c
    • Nils Goroll's avatar
      stabilize vtc: tolerate more overflows · 05a068dd
      Nils Goroll authored
      depending on our platform and the timing of events, we might see another
      overflow.
      
      Seen with vtest
      
      ---- v1   Not true: ws_session_overflow (3) == 2 (2)
      05a068dd
    • Nils Goroll's avatar
      give timing critical test a bit more margin · e7ea0de7
      Nils Goroll authored
      we want to make sure that we do not hit timeout_idle as long as we stay
      below it, but the margin of just 100ms has triggered a false negative.
      Double the margin to 200ms...
      
      see with vtest (c4u lines extracted)
      
      **** c4u  Loop #3
      **   c4u  === delay 0.3
      ***  c4u  delaying 0.3 second(s)
      **** dT   2.025
      **   c4u  === sendhex 0d0a
      **** c4u  sendhex|  0d 0a
      ---- c4u  Write failed: Socket is not connected
      e7ea0de7
    • Nils Goroll's avatar
      fix oversight from previous commit · 83c23d9a
      Nils Goroll authored
      sorry, I overlooked the sixth spot from a total of five different source
      files.
      83c23d9a
    • Nils Goroll's avatar
      tabularize parameters to be passed to vcc · 430bbce9
      Nils Goroll authored
      Parameters are passed to vcc via specific setter functions, presumably
      to avoid binary compability issues between the main program (here:
      vanishd) and a library (here: libvcc).
      
      This commit does not change that interface in any way, but generates
      both sides from a common table include to avoid having to edit five
      spots in four different source files and write trivial setter functions
      for a simple mgt_vcc parameter change.
      430bbce9
    • Nils Goroll's avatar
      VDP/VFP sanity · d0a89676
      Nils Goroll authored
      * there is no NULL filter
      * the filter name cannot be NULL or empty
      d0a89676
  10. 05 Apr, 2020 5 commits
    • Nils Goroll's avatar
      some beresp.do_* flags are undefined after setting beresp.filters · a80d0362
      Nils Goroll authored
      See previous commit: Analogous to resp.do_esi, any access to the
      beresp.do_* flags which influence beresp.filters is now a VCL error.
      
      Ref #3002
      a80d0362
    • Nils Goroll's avatar
      resp.do_esi is undefined after setting resp.filters · 2b3c76a8
      Nils Goroll authored
      After fixing resp.filters, resp.do_esi loses its meaning.
      
      Note:
      
      Setting resp.filters also fixes whether or not the gunzip and range VDPs
      are being pushed.
      
      These do not depend on switches, but on request headers. So we need to
      consider the case that a VCL author
      
      	- fixes resp.filters
      	- and then adds or removes relevant headers
      
      * req.http.Accept-Encoding for the gunzip vdp
      
        if removed: gunzip stays in the VDP list, which is always ok
      
        if added: that is probably wrong anyway and the VCL author can
        be held responsible for their actions as per the warning in the
        resp.filters documentation.
      
      * req.http.Range for the range vdp
      
        if removed: the range vdp vetoes itself in the _init callback
      
        if added: no range handling will be present, which is always ok
        (and see above for VCL author responsibilities)
      
      Fixes #3002
      2b3c76a8
    • Nils Goroll's avatar
      NULL any filters for VRT_fail() and return(synth()) · ad176224
      Nils Goroll authored
      The synthetic response has nothing to do with the filters set for
      the original body.
      
      See next commit for implicit test
      ad176224
    • Nils Goroll's avatar
      Test resp.filters with esi, gunzip and range · 2ab29dc4
      Nils Goroll authored
      2ab29dc4
    • Nils Goroll's avatar
      esi can be turned off at esi_level > 0 · d099d7f6
      Nils Goroll authored
      d099d7f6
  11. 04 Apr, 2020 6 commits