Closed dnomd343 closed 9 months ago
I retried the YAML structure, and it still gave an error. The bootstrap_dns
was incorrectly nested with one more slice.
Input configure file:
users:
- name: admin
password: $2a$10$q0t.WVsqQ7yo5NRMX2Rareim2BrzEnbPGzuLh9CxdFA6G9BNsncN6
dns:
port: 53
bind_host: 0.0.0.0
upstream_dns:
- '127.0.0.1:5353'
upstream_dns_file: ''
bootstrap_dns:
- 8.8.8.8
Upgraded configure file:
···
dns:
bind_hosts:
- 0.0.0.0
bootstrap_dns:
- - 8.8.8.8
edns_client_subnet:
custom_ip: ""
enabled: false
use_custom: false
port: 53
upstream_dns:
- 127.0.0.1:5353
upstream_dns_file: ""
···
- - 8.8.8.8
is the result of nesting twice. I tend to have a BUG in the upgrade of 25, 26 or 27.
This isn't a typical way to get a configuration file, see/upvote #4199 for a better solution in the future. As for the configuration, your initial bootstrap_dns
should be a string or probably just absent. See configuration migrator's test data for examples.
Thanks for the reply, I was able to trick it into not initiating a YAML upgrade by specifying the schema_version
and instead initializing it with default parameters.
For example:
{
"users": [
{
"name": "admin",
"password": "$2a$10$q0t.WVsqQ7yo5NRMX2Rareim2BrzEnbPGzuLh9CxdFA6G9BNsncN6"
}
],
"dns": {
"port": 53,
"bind_host": "0.0.0.0",
"upstream_dns": [
"127.0.0.1:5353"
],
"upstream_dns_file": "",
"bootstrap_dns": []
},
"schema_version": 27
}
Prerequisites
[X] I have checked the Wiki and Discussions and found no answer
[X] I have searched other issues and found no duplicates
[X] I want to report a bug and not ask a question or ask for help
[X] I have set up AdGuard Home correctly and configured clients to use it. (Use the Discussions for help with installing and configuring clients.)
Platform (OS and CPU architecture)
Linux, AMD64 (aka x86_64)
Installation
Custom package (OpenWrt, HomeAssistant, etc; please mention in the description)
Setup
On one machine
AdGuard Home version
0.107.37
Action
Use a basic JSON configuration file in
/tmp/AdGuardHome.yaml
.In version
0.107.36
I can get it to boot and upgrade to the latest YAML configuration.But in the
0.107.37
version, an error occurred and the configuration file was upgraded to the wrong YAML.At this time, the output configuration
/tmp/AdGuardHome.yaml
is as follows:It can be found that an error occurred in
bootstrap_dns
. The[]
of JSON (or YAML) was treated as a string, which is an illegal YAML syntax.Expected result
YAML is upgraded correctly, like:
Actual result
A valid JSON (or YAML) input was upgraded to illegal markup.
Additional information and/or screenshots
It has nothing to do with the system and exists on all hosts.