Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The yaml parser in ocis is broken #6510

Closed
ScharfViktor opened this issue Jun 13, 2023 · 12 comments · Fixed by #6626
Closed

The yaml parser in ocis is broken #6510

ScharfViktor opened this issue Jun 13, 2023 · 12 comments · Fixed by #6626
Labels

Comments

@ScharfViktor
Copy link
Contributor

it happens because of different versions of yaml or something else, but the yes value in the yml file causes the ocis to fail

Steps:

Actual: ocis container doesn't start until you change yes to true here https://github.com/owncloud/web/blob/master/dev/docker/ocis.idp.config.yaml#L5-L6

log

1 error(s) decoding:


* cannot parse 'clients[0].trusted' as bool: strconv.ParseBool: parsing "yes": invalid syntax

1 error(s) decoding:


* cannot parse 'clients[0].trusted' as bool: strconv.ParseBool: parsing "yes": invalid syntax

1 error(s) decoding:


* cannot parse 'clients[0].trusted' as bool: strconv.ParseBool: parsing "yes": invalid syntax

1 error(s) decoding:


* cannot parse 'clients[0].trusted' as bool: strconv.ParseBool: parsing "yes": invalid syntax

2023-06-13T10:03:52Z ERR not found bind_dn=uid=libregraph,ou=sysusers,o=libregraph-idm op=bind remote_addr=127.0.0.1:58842 service=idm

2023-06-13T10:03:52Z ERR Bind failed error="LDAP Result Code 49 \"Invalid Credentials\": " service=graph

2023-06-13T10:03:52Z ERR autoconnect could not get ldap Connection error="LDAP Result Code 49 \"Invalid Credentials\": " service=graph

2023-06-13T10:04:53Z ERR not found bind_dn=uid=libregraph,ou=sysusers,o=libregraph-idm op=bind remote_addr=127.0.0.1:58888 service=idm

2023-06-13T10:04:53Z ERR Bind failed error="LDAP Result Code 49 \"Invalid Credentials\": " service=graph

2023-06-13T10:04:53Z ERR autoconnect could not get ldap Connection error="LDAP Result Code 49 \"Invalid Credentials\": " service=graph

cc @dschmidt

@dschmidt
Copy link
Member

It possibly lost compatibility for Yaml 1.1 and only supports Yaml 1.2 now, where yes is not a valid synonym for true ...

@rhafer
Copy link
Contributor

rhafer commented Jun 14, 2023

@ScharfViktor To narrow down, does this only happen for the ocis:latest image or is ocis:3.0.0 affected as well?

@ScharfViktor
Copy link
Contributor Author

@ScharfViktor To narrow down, does this only happen for the ocis:latest image or is ocis:3.0.0 affected as well?

in the ocis:3.0.0 works fine. It happens only ocis:latest

@rhafer
Copy link
Contributor

rhafer commented Jun 14, 2023

Ok. This seems to be introduced with the recent update of github.com/gookit/config/v2 from 2.1.8 to 2.2.2 (#6493) where they replaced https://github.com/go-yaml/yaml with https://github.com/goccy/go-yaml (gookit/config#119)

goccy/go-yaml aims to only support yaml 1.2

Not sure there's much we should do about that. Other that fixing the fallout. At least I think we should NOT downgrade github.com/gookit/config/v2.

@mmattel What's the best way to get this mentioned in the release/upgrade notes for the next release (3.1?) ?

@ScharfViktor
Copy link
Contributor Author

To make it work on the web I can change yes to true here https://github.com/owncloud/web/blob/master/dev/docker/ocis.idp.config.yaml#L5-L6

should I do it? @kulmann

@mmattel
Copy link
Contributor

mmattel commented Jun 14, 2023

@ScharfViktor can you double check in both folders of the deployment examples in master and confirm that they are ok or fix them in case a fix is needed?

@dschmidt
Copy link
Member

dschmidt commented Jun 14, 2023

To make it work on the web I can change yes to true here https://github.com/owncloud/web/blob/master/dev/docker/ocis.idp.config.yaml#L5-L6

should I do it? @kulmann

As we already discussed: yes. There's no other way if it stays like this in oCIS. Maybe fix it in stable-7.0 branch even (and we'll forward port it to master eventually)

Also consider adding the yaml 1.2 header as also discussed

@ScharfViktor
Copy link
Contributor Author

As we already discussed: yes. There's no other way if it stays like this in oCIS. Maybe fix it in stable-7.0 branch even (and we'll forward port it to master eventually)

Oops, I accidentally corrected that already here owncloud/web@aa1f77e#diff-0b1fc5528882240b213b1ce08ff3b354116c02547b954c4741ee8f731c3871f4

@ScharfViktor
Copy link
Contributor Author

let's consider it done.
@mmattel deployment works fine. it related only https://github.com/owncloud/web/blob/master/docker-compose.yml
@rhafer If it won't be fixed in ocis, please close issue

@rhafer
Copy link
Contributor

rhafer commented Jun 14, 2023

If it won't be fixed in ocis, please close issue

I don't think we'll fix it in ocis (though it's not on me to decide that). But we should mention in the release notes or upgrade docs that we only support yaml 1.2 in config files from now on. Other users might run into similar issues.

@tekeous
Copy link

tekeous commented Jun 26, 2023

I think integers are broken as well - I updated a 2.0.0 bare metal installation with s3ng to 3.0.0 and got the following and a failed start:


[tekeous@hostname config]$ ocis server
{"level":"error","service":"search","error":"cannot open index, metadata corrupt","time":"2023-06-25T19:23:12.724177261-07:00","message":"Error initializing search service"}
5 error(s) decoding:

* cannot parse 'filemetadata_cache.ttl' as int: strconv.ParseInt: parsing "24m0s": invalid syntax
* cannot parse 'id_cache.ttl' as int: strconv.ParseInt: parsing "0s": invalid syntax
* cannot parse 'stat_cache.ttl' as int: strconv.ParseInt: parsing "5m0s": invalid syntax
* cannot parse 'tasks.purge_trash_bin.personal_delete_before' as int: strconv.ParseInt: parsing "720h0m0s": invalid syntax
* cannot parse 'tasks.purge_trash_bin.project_delete_before' as int: strconv.ParseInt: parsing "720h0m0s": invalid syntax

@rhafer
Copy link
Contributor

rhafer commented Jun 26, 2023

@tekeous Thanks for reporting. The problem you're seeing seems to be unrelated to this specific issue. As it is already present in 3.0.0. It is not caused by the recent update gookit/config/v2 update to 2.1.8).

I'll move it to a new issue for properly tracking it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants