Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-cluster
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-cluster
Commits
ce2abe8b
Commit
ce2abe8b
authored
Mar 20, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polish
parent
54154417
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
vmod_cluster.c
src/vmod_cluster.c
+7
-11
No files found.
src/vmod_cluster.c
View file @
ce2abe8b
...
...
@@ -539,19 +539,17 @@ cluster_choose(VRT_CTX,
pr
=
cluster_task_param_r
(
ctx
,
vc
);
CHECK_OBJ_NOTNULL
(
pr
,
VMOD_CLUSTER_CLUSTER_PARAM_MAGIC
);
char
pstk
[
param_sz
(
pr
,
pr
->
nblack
+
1
)];
nblack
=
pr
->
nblack
;
char
pstk
[
param_sz
(
pr
,
nblack
+
1
)];
if
((
ctx
->
method
&
cluster_methods
)
==
0
)
spc
=
pstk
;
if
(
arg
->
valid_deny
&&
arg
->
deny
!=
NULL
&&
!
cluster_blacklisted
(
pr
,
arg
->
deny
))
{
if
(
pl
==
NULL
)
{
nblack
=
pr
->
nblack
+
1
;
if
(
pl
==
NULL
)
pr
=
pl
=
cluster_task_param_l
(
ctx
,
vc
,
nblack
,
spc
);
}
++
nblack
,
spc
);
cluster_blacklist_add
(
pl
,
arg
->
deny
);
}
if
(
arg
->
valid_real
&&
pr
->
real
!=
arg
->
real
)
{
...
...
@@ -576,6 +574,7 @@ vmod_cluster_backend(VRT_CTX,
struct
vmod_cluster_cluster
*
vc
,
struct
VARGS
(
cluster_backend
)
*
arg
)
{
enum
resolve_e
res
=
parse_resolve_e
(
arg
->
resolve
);
struct
VARGS
(
cluster_cluster_selected
)
carg
[
1
]
=
{{
.
valid_deny
=
arg
->
valid_deny
,
...
...
@@ -585,7 +584,7 @@ vmod_cluster_backend(VRT_CTX,
.
real
=
arg
->
real
,
.
uncacheable_direct
=
arg
->
uncacheable_direct
}};
return
(
cluster_choose
(
ctx
,
vc
,
parse_resolve_e
(
arg
->
resolve
)
,
NULL
,
carg
));
return
(
cluster_choose
(
ctx
,
vc
,
res
,
NULL
,
carg
));
}
VCL_BOOL
...
...
@@ -623,7 +622,6 @@ vmod_cluster_healthy(VRT_CTX, VCL_BACKEND be, VCL_TIME *c)
{
const
struct
vmod_cluster_cluster
*
vc
;
const
struct
vmod_cluster_cluster_param
*
p
;
VCL_BOOL
r
;
if
(
ctx
->
vcl
&&
ctx
->
method
)
{
be
=
vmod_cluster_resolve
(
ctx
,
be
);
...
...
@@ -633,8 +631,6 @@ vmod_cluster_healthy(VRT_CTX, VCL_BACKEND be, VCL_TIME *c)
CAST_OBJ_NOTNULL
(
vc
,
be
->
priv
,
VMOD_CLUSTER_CLUSTER_MAGIC
);
p
=
vc
->
param
;
CHECK_OBJ_NOTNULL
(
p
,
VMOD_CLUSTER_CLUSTER_PARAM_MAGIC
);
r
=
VRT_Healthy
(
ctx
,
p
->
cluster
,
c
);
if
(
r
)
return
(
r
);
return
(
VRT_Healthy
(
ctx
,
p
->
real
,
c
));
return
(
VRT_Healthy
(
ctx
,
p
->
cluster
,
c
)
||
VRT_Healthy
(
ctx
,
p
->
real
,
c
));
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment