New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back-ports for 6.0.2 #2802

Merged
merged 183 commits into from Oct 31, 2018

Conversation

Projects
None yet
@Dridi
Member

Dridi commented Oct 16, 2018

Akin to #2799, this is the proposed set of back-ports for 6.0.2 up to current master (f56cce5).

As usual the goal is to avoid breaking the VRT and libvarnishapi ABIs since it's a stable branch with one notable difference this time. Following consensus from #2800 we are breaking two VRT symbols without changing the VRT 7.0 version because those symbols should not be used by inline C or VMOD authors.

git diff varnish-6.0.1..HEAD -- include/vrt.h

And with no surprises:

diff --git a/include/vrt.h b/include/vrt.h
index 936aa207f..3db7c0438 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -423,9 +423,9 @@ int VRT_Healthy(VRT_CTX, VCL_BACKEND);
 int VRT_VSA_GetPtr(const struct suckaddr *sua, const unsigned char ** dst);
 
 /* VMOD/Modules related */
-int VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, void *ptr, int len,
+int VRT_Vmod_Init(VRT_CTX, struct vmod **hdl, unsigned nbr, void *ptr, int len,
     const char *nm, const char *path, const char *file_id, const char *backup);
-void VRT_Vmod_Fini(struct vmod **hdl);
+void VRT_Vmod_Unload(VRT_CTX, struct vmod **hdl);
 
 /* VCL program related */
 VCL_VCL VRT_vcl_get(VRT_CTX, const char *);

Some of the original commits were partially back-ported because sometimes patches cover a wee bit more than what the commit messages say.

I believe not to have broken the libvarnishapi ABI, and the following changes were left out:

  • the soname bump to 2.0.0
  • the SessError SLT

That last one may be introduced since we have both a patch introducing it and another moving it to the last entry to preserve binary compatibility. Feedback appreciated.

Other notable changes that were left out:

  • b51bc4a (for the lack of production feedback, already skipped for 6.0.1, can be revisited)
  • vmod-blob changes not breaking the VCL API, but relying on post-7.0 VRT_CollectStrands
  • anything VFP/VDP related
  • 6.1 release notes
  • debug.sethdr (because strands again)
  • in general the type of changes that didn't make it in 6.0.1

Debatable changes that made it in:

  • VSC groups
  • WS fail counters
  • libvgz ifdefing

I don't think they count as breaking changes. Feedback appreciated.

I found a couple nits in master, I will open separate tickets or fix them directly.

I didn't update the changelog, and according to git log and grep we should mention those tickets:

git log varnish-6.0.1..HEAD | egrep -i '(Fixes|Closes):? #' | sed 's/^\s*/- /'

I will happily spam your inbox if this gets approved, and hope someone will take care of the changelog :)

Special thanks to @hermunn!

bsdphk and others added some commits Aug 16, 2018

Add a cli send/expect facility to HAproxy support.
Submitted by:	Frederic Lecaille <flecaille@haproxy.com>
look for sphinx-build during configure add --with-sphinx-build
... argument to specify a custom location

Fixes #2742
vcc: vmod function named argument clarifications
* either NULL or properly named
* only named arguments can be possibly be speficied multiple times
* only named arguments can be optional
* positional arguments could be missing
initialize PRIV_TASK and PRIV_TOP vmod arguments once per subroutine
... and fail the VCL unless successful.

Providing the PRIVs to vmods is a core function, so error handling
should happen outside vmods.

Besides being safe, this initialization can be more efficient than
previous code for PRIVs used frequently within the same subroutine.

An alternative approach would be to initialize all privs once per
task / top request, but unless all privs are actually used in a VCL,
this approach could impose significant overhead, both in terms of time
and memory. By initializing privs once per sub, we impose overhead for
privs which are referenced but not actually used in a subroutine, but
not for all of the vcl.

Fixes #2708
Align handling of STRINGS derived types.
Fixes:	#2745

Conflicts:
	bin/varnishtest/tests/v00020.vtc
Add missing break
Conflicts:
	bin/varnishd/cache/cache_vrt.c
Slight polish
Conflicts:
	lib/libvmod_blob/hex.c
Register the vmods unique (per-vcl) number
Conflicts:
	include/vrt.h

This appears to break the VRT interface, but there are symbols we are
willing to break even on a stable branch because they are needed by
VCC-generated code and off limits to inline C and VMODs.

Refs #2800
Retry on EAGAIN.
Submitted by:	Frederic Lecaille <flecaille@haproxy.com>

nigoroll and others added some commits Oct 8, 2018

typedefs for real/mono time and durations
We use double for all time representations, yet monotonic time,
real time and durations are not to be confused.

Also, we might want to change the representation of time in the
future.

To get an implicit documentation of the semantic type of a time
value and to facilitate working on the latter, we start off by
introducing simple typedefs which neither inply any change nor
offer any type checking. But they pave the way...
Renovate this Makefile
When producing files with "foo > file", always use the pattern:

	foo > file.tmp
	mv file.tmp file

Otherwise program failures end up generating partial content and
make will not even rerun the failing program next time you type make.

Actually clean CLEANFILES in the clean target.

The reference dir is not built, but it should be in the distfile
keep the dog in the kennel unless there's a queue
As long as we are not queuing any threads, there is no queue to
move. We record the queue marker the first time we notice queuing and
only then see if it doesn't move.

Fixes #2794
Add client_resp_500 counter
Counts the number of times we failed a response due to running out of
workspace during delivery.

Conflicts:
	bin/varnishtest/tests/v00058.vtc
Add ws_client_overflow counter
Conflicts:
	bin/varnishtest/tests/v00058.vtc
Add ws_thread_overflow counter
See details in r02275.vtc for why there isn't a test case for this.
Make worker threads give up their VCL much sooner in VTC-environment
and make sure the expects in the test are scrupulusly correct.

@bsdphk bsdphk added the a=bugwash label Oct 22, 2018

@Dridi Dridi merged commit 980e514 into 6.0 Oct 31, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@Dridi Dridi deleted the backports-6.0.2 branch Oct 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment