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

Autocorrect charset issues #6709

Open
3 tasks
paczerny opened this issue Sep 5, 2024 · 0 comments
Open
3 tasks

Autocorrect charset issues #6709

paczerny opened this issue Sep 5, 2024 · 0 comments

Comments

@paczerny
Copy link
Member

paczerny commented Sep 5, 2024

Description
Users who have been with OpenNebula for a long time and have MySQL DB with latin1 charset. After upgrade they may experience charset issues, error message something like: 263409-byte supposed UTF-8 string is not valid UTF-8. Unrecognized UTF-8 initial byte value 0x96

In this case the resource with corrupted charset is unusable, even simple commands like onevm list, onevm show doesn't work.

The goal of this issue is to detect charset inconsistency and if possible fix them. Possible solutions:

  • Detect error in oned, try to convert to correct charset
  • New CLI command onedb fix-charset object-type id - autodect charset or optionaly accept input/output charset from command line. Or maybe solve during onedb fsck?
  • Minimal solution: Improve error message to show object ID and the full xml-body string, include hint how to fix it.

Use case
Less failures after upgrade

Interface Changes
Maybe new CLI command onedb fix-charset

Additional Context
To reproduce the issue:

  • Create MySQL microenv
  • Setup default MySQL encoding to latin1
  • Install older version of OpenNebula
  • Create some resources
  • Make fake migrator, e.g. replace this line by doc = nokogiri_doc(row[:body], nil')
  • Upgrade OpenNebula
  • The list and show commands for resource corrupted by the fake migrator should fail
  • Safe the DB, so you don't need to repeat all the steps above

Marketplace charset issue on the forum
#6705

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant