cloudberry
cloudberry copied to clipboard
[Bug] Errors thrown by gpinitsystem during locale checking
Cloudberry Database version
1.5.3
What happened
When initialising a new database there are errors thrown during locale checking - the database is initialized correctly so these errors appear to be benign
Error 1
/usr/local/cloudberrydb/bin/gpinitsystem: line 708: [1: command not found
relates to line
if [ `$LOCALE -a |$GREP -ic $(NORMALIZE_CODESET_IN_LOCALE $LOCALE_SETTING)` -eq 0 ] \
&& [`$LOCALE -a |$GREP -ic $LOCALE_SETTING` -eq 0];then
Error 2
/usr/local/cloudberrydb/bin/gpinitsystem: line 721: [1: command not found
relates to line
if [ $( REMOTE_EXECUTE_AND_GET_OUTPUT $1 "$LOCALE -a|$GREP -ic '$(NORMALIZE_CODESET_IN_LOCALE $LOCALE_SETTING)'" ) -eq 0 ] \
&& [$( REMOTE_EXECUTE_AND_GET_OUTPUT $1 "$LOCALE -a|$GREP -ic '$LOCALE_SETTING'" ) -eq 0] ;then
What you think should happen instead
No response
How to reproduce
Comment used was
gpinitsystem -a -p $GPHOME/postgresql.conf -c $GPHOME/gpinitsystem_config -h $GPHOME/hostfile_gpinitsystem -l /gpadminlogs --mirror-mode=spread --su_password=$SUPERUSER_PASSWORD --locale=C.UTF-8
Operating System
Ubuntu 18.04
Anything else
Happens every time
Are you willing to submit PR?
- [ ] Yes, I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct.
Hey, @xanadu-dev welcome!🎊 Thanks for taking the time to point this out.🙌
Can you add system PATH to env : refer to https://github.com/greenplum-db/gpdb-archive/commit/9201a8bcd0b2519fcd8a73820742d3cadffdc73c
if work fine, I will cherry pick this.
Can you add system PATH to env : refer to greenplum-db/gpdb-archive@9201a8b
if work fine, I will cherry pick this.
I should be able to try this in the next few days and will let you know
Can you add system PATH to env : refer to greenplum-db/gpdb-archive@9201a8b
if work fine, I will cherry pick this.
I tried the change you suggested and it didn't remove the warnings I'll update my system to the latest cloudberry version and check again as I am using 1.5.4 at the moment
I tried the change you suggested and it didn't remove the warnings I'll update my system to the latest cloudberry version and check again as I am using 1.5.4 at the moment
That suggested fix didn't work with version 1.6.0 either
I tried the change you suggested and it didn't remove the warnings I'll update my system to the latest cloudberry version and check again as I am using 1.5.4 at the moment
That suggested fix didn't work with version 1.6.0 either
found another related pr: https://github.com/greenplum-db/gpdb-archive/commit/e449c8cbaebeb8a851657d4de4c198bc203bf0fe
found another related pr: greenplum-db/gpdb-archive@e449c8c
That PR has already been included in the Cloudberry code
It seems that the locale issue arises because the locale settings of your system do not match those during the initdb process.
Your locate setting:
--locale=C.UTF-8
You might need to check the supported locales on your system by running:
locale -a
Please note that locale names are case-sensitive.
Additionally, I noticed that your build is based on Ubuntu 18.04, which is outdated. This version, released on April 26, 2018, was officially supported until April 2023.
My daily builds are running on Ubuntu 22.04 and later versions. I recommend updating your build environment to an OS that is officially supported by Cloudberry. You can refer to the configuration examples in our CI script for guidance. If you need to configure something specific related to the OS, please ensure to consider the necessary details.
Thanks I'll try those 2 suggestions and confirm if it solves the issue
Additionally, I noticed that your build is based on Ubuntu 18.04, which is outdated. This version, released on April 26, 2018, was officially supported until April 2023.
My daily builds are running on Ubuntu 22.04 and later versions. I recommend updating your build environment to an OS that is officially supported by Cloudberry. You can refer to the configuration examples in our CI script for guidance. If you need to configure something specific related to the OS, please ensure to consider the necessary details.
I can confirm that rebuilding with Ubuntu 22.04 addresses the problem and the locale warnings are gone
Thanks again