-
Couldn't load subscription status.
- Fork 9.4k
Closed
Labels
Component: Framework/ConsoleIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
Preconditions (*)
- PHP 7.2, MariaDB 10.3, Varnish 5.2.1
- Tested with Magento 2.3.2 and Magento 2.3.1
Steps to reproduce (*)
- Run command
bin/magento varnish:vcl:generate --access-list localhost --backend-host localhost --backend-port 8080 --output-file var/default.vcl- Run commands
varnishadm vcl.load default var/default.vcl
varnishadm vcl.use defaultExpected result (*)
- Contents of generated
var/default.vclfile, pay attention to correct rowreturn (miss);
...
sub vcl_hit {
if (obj.ttl >= 0s) {
# Hit within TTL period
return (deliver);
}
if (std.healthy(req.backend_hint)) {
if (obj.ttl + 300s > 0s) {
# Hit after TTL expiration, but within grace period
set req.http.grace = "normal (healthy server)";
return (deliver);
} else {
# Hit after TTL and grace expiration
return (miss);
}
} else {
# server is not healthy, retrieve from cache
set req.http.grace = "unlimited (unhealthy server)";
return (deliver);
}
}
- Varnish
varnishadmcommand loads and activates config.
Actual result (*)
- Contents of generated
var/default.vclfile, pay attention to deprecatedreturn (fetch);
...
sub vcl_hit {
if (obj.ttl >= 0s) {
# Hit within TTL period
return (deliver);
}
if (std.healthy(req.backend_hint)) {
if (obj.ttl + 300s > 0s) {
# Hit after TTL expiration, but within grace period
set req.http.grace = "normal (healthy server)";
return (deliver);
} else {
# Hit after TTL and grace expiration
return (fetch);
}
} else {
# server is not healthy, retrieve from cache
set req.http.grace = "unlimited (unhealthy server)";
return (deliver);
}
}
- Varnish
varnishadmcommands results with error
Message from VCC-compiler:
Invalid return "fetch"
...
return (fetch);
--------------------#####--
...in subroutine "vcl_hit"
...
sub vcl_hit {
----#######--
...which is the "vcl_hit" method
Legal returns are: "deliver" "fail" "miss" "pass" "restart" "synth"
Running VCC-compiler failed, exited with 2
VCL compilation failed
Command failed with error code 106
u-maxx, pniel-cohen, tiagosampaio and ahofstetter
Metadata
Metadata
Assignees
Labels
Component: Framework/ConsoleIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release