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

use character set latin1 instead of utf #139

Closed
wants to merge 1 commit into from

Conversation

skm42
Copy link

@skm42 skm42 commented Mar 14, 2018

enables graphite usage
configured mysql db client to default character set
remove character set from create database statements
configured icingaweb2 to use latin1
addresses skm42#1

enables graphite usage
configured mysql db client to default character set
remove character set from create database statements
configured icingaweb2 to use latin1
addresses #1
@bebehei
Copy link
Contributor

bebehei commented Mar 15, 2018

Could you please limit your commit to that what's really necessary? A new ini-file with no real content doesn't seem to be important.

Also: Why is latin1 preferred over utf-8? The only thing, which does not support utf-8 is IDO and IDO isn't configured to not use it.

And another question for later, after the previous is answered: How can we migrate existing installations?

@skm42
Copy link
Author

skm42 commented Mar 15, 2018

I tried limiting the commit to contain just required changes, I'm going to make my mind if something can be skipped or split in several commits. The reason to switch to Latin1 was to get rid of the graphite issue referenced until icinga2 upstream is prepared for UTF-8. I do know to little about database character set difference to discuss why to prefer this or the other character set, but to align it to upstream defaults is likely to avoid issues. According to my information for both mariadb and icinga2, Latin1 is default character set. Find below descriptions of the commit details. I didn't catch what you mean by "A new ini-file with no real content", can you explain?
Good catch about the migration for existing installations. I wasn't thinking in this direction. I'm going to perform tests in this direction.

content/etc/icingaweb2/resources.ini
remove optional parameter charset to use icingaweb2 standard configuration
https://www.icinga.com/docs/icingaweb2/latest/doc/04-Resources/

content/etc/mysql/mariadb.conf.d/50-client.cnf, 50-mysql-clients.cnf, 50-mysqld_safe.cnf, 50-server.cnf
mariadb configuration was not yet part of configuration which is copied from ./content/ during docker image build. The idea was to follow the approach taken for apache, icingaweb2, ..., to drop in the configuration required to configure mariadb with standard mariadb character set. Does it make sense to you that I perform an initial commit for these changes based of the configuration already present in icinga2 image?

content/opt/setup/60-icingaweb2
60-icingaweb2 creates the databases. Omitting CHARACTER SET of database create statement creates the databases with default character set which is latin1 and collation latin1_swedish_ci. https://mariadb.com/kb/en/library/setting-character-sets-and-collations/, https://mariadb.com/kb/en/library/create-table/#default-character-setcharset. This matches the character set used by default installation of icinga2.

In a nutshell I think the commit size can just be reduced by removal of 50-mysqld_safe.cnf. All other changes of the commit are needed to switch from debian defaults to icinga2, mariadb defaults.

@skm42
Copy link
Author

skm42 commented Mar 17, 2018

closed by #141

@skm42 skm42 closed this Mar 17, 2018
@skm42 skm42 deleted the charset_latin1 branch March 18, 2018 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants