Yiyiyimu opened a new issue #4449:
URL: https://github.com/apache/apisix/issues/4449


   ### Issue description
   
   
https://github.com/apache/apisix/blob/8282046bd894ec185e2b92d94126c9c3235c5d2a/conf/config-default.yaml#L205-L207
   
   Currently we need to add quotes around etcd host. But if we generate yaml 
with say [go-yaml](https://github.com/go-yaml/yaml) the quotes would be removed 
and apisix could not start as expected with error:
   ```
   /usr/local/openresty/luajit/bin/luajit: 
...apisix/deps/share/lua/5.1/tinyyaml.lua:654: failed to classify line:       
http://127.0.0.1:2379     # multiple etcd address, if your etcd cluster enables 
TLS, please use https scheme,
   stack traceback:
           [C]: in function 'error'
           ...apisix/deps/share/lua/5.1/tinyyaml.lua:654: in function 'parsemap'
           ...apisix/deps/share/lua/5.1/tinyyaml.lua:517: in function 'parseseq'
           ...apisix/deps/share/lua/5.1/tinyyaml.lua:680: in function 'parsemap'
           ...apisix/deps/share/lua/5.1/tinyyaml.lua:690: in function 'parsemap'
           ...apisix/deps/share/lua/5.1/tinyyaml.lua:740: in function 
'parsedocuments'
           ...apisix/deps/share/lua/5.1/tinyyaml.lua:765: in function 'parse'
           ./apisix/cli/file.lua:176: in function 'read_yaml_conf'
           ./apisix/cli/ops.lua:312: in function <./apisix/cli/ops.lua:303>
           ./apisix/cli/ops.lua:810: in function 'execute'
           ./apisix/cli/apisix.lua:34: in main chunk
           [C]: at 0x562c0de08690
   Makefile:122: recipe for target 'init' failed
   make: *** [init] Error 1
   ```
   
   Since etcd host without quotes is also acceptable
   
![image](https://user-images.githubusercontent.com/34589752/122659596-bdac4900-d147-11eb-947c-c9d5e68932f2.png)
   We need to modify yaml parsing library
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): master


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to