Le 11/02/2021 à 22:51, William Dauchy a écrit :
Hello Christopher,
Here is some work to finish you week.
I believe I addressed all the points raised:
- warning are no longer emitted when we have "0" or "-" values
- I enhanced the warning output as well, and understood my mistake for
my previous CLEANUP patch removing a space... so I removed this patch
as well.
- Fixed all the chunk_appendf issues.
- I was a bit lazy to address the partial vs complete failure in parsing
as I was a bit puzzled about the approach to take. I think it would be
sad to duplicate the code for pre validation, but on the other hand I
agree it was clear to assume the whole line was not applied at all. I
however concluded it was acceptable to simply know the line was not
fully applied. I believe in that case the user should worry. We can
probably add a way to show where it stopped, but I felt discouraged
with the srv resolution, in the middle of srv port, where it is harder
to have a kinda generic way to know where we stopped.
William Dauchy (5):
MEDIUM: cli: add check-addr command
MEDIUM: cli: add agent-port command
MEDIUM: server: add server-states version 2
MEDIUM: server: support {check,agent}_addr, agent_port in server state
MINOR: server: enhance error precision when applying server state
Ok, it is good for me. I will push it soon. Thanks William! And don't be too
worry about the loading of server-state files. This part is a mess and should be
refactored, at least to be readable and also to fix bugs on error path. I'm
tempted to do so and a bit afraid too.
I just slightly amended the 3rd patch to handle the v2 in apply_server_state().
There is a test on the version when a state-file is local to a proxy. Just a
minor change. And in the last one, I removed the "chunk_appendf(msg, "\n");" to
move the LF in ha_warning() calls.
--
Christopher Faulet