You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MySQL error when SELECT disk_offering_view / service_offering_view #5175
mysql --version
mysql Ver 14.14 Distrib 5.7.34, for Linux (x86_64)
SUMMARY
Seems to be related to MySQL only; MariaDB looks to be working fine. After some MySQL configurations to "disable" only_full_group_by then the select works.
This might be more a documentation than a cloudstack issue, but it is important to raise and track alternatives to solve/mitigate it.
This could bring problems to unaware users.
Bear in mind that the CloudStack mgmt/UI seems to be all good, even with the selects that failed; thus this is a minor issue.
STEPS TO REPRODUCE
Run a MySQL 'select' query on disk_offering_view or service_offering_view
EXPECTED RESULTS
Select offerings views in MySQL
ACTUAL RESULTS
mysql> select * from disk_offering_view limit 1;
ERROR 1055 (42000): Expression #34 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'cloud.vsphere_storage_policy.value' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
mysql> select * from service_offering_view limit 1;
ERROR 1055 (42000): Expression #34 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'cloud.vsphere_storage_policy.value' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Activity
nvazquez commentedon Jul 23, 2021
@harikrishna-patnala seems like
vsphere_storage_policymay be conflicting here, any input?nvazquez commentedon Aug 16, 2021
@harikrishna-patnala any ideas?
yadvr commentedon Sep 2, 2021
Ping @harikrishna-patnala @nvazquez
nvazquez commentedon Sep 2, 2021
@harikrishna-patnala please provide your input after your investigation, thanks
weizhouapache commentedon Sep 2, 2021
@nvazquez
I think it is not a bug in cloudstack. cloudstack has already set sql_mode in ./client/conf/db.properties.in
to fix the issue , users have to change the mysql setting in mysql.conf , or change mysql global setting by queries if mysql cannot be restarted.
here is an example
harikrishna-patnala commentedon Sep 3, 2021
Thanks @weizhouapache .
I've created doc PR as a short note to change the SQL mode.
Let me know if this is fine apache/cloudstack-documentation#239
yadvr commentedon Sep 3, 2021
Closing this as we've the doc PR now apache/cloudstack-documentation#239