guest agent won't start on xenial/mysql5.7

Bug #1645921 reported by Sam Morrison
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Committed
High
Unassigned

Bug Description

The default mysql/my.cnf on xenial causes guest agent to not start

Using trove stable/mitaka
mysql-server 5.7.16-0ubuntu0.16.04.1

the config file contains only:

======================================
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

======================================

This causes the following error:

======================================
2016-11-30 00:20:48.382 4225 CRITICAL root [-] MissingSectionHeaderError: File contains no section headers.
file: <???>, line: 3
'!includedir /etc/mysql/conf.d/\n'
2016-11-30 00:20:48.382 4225 ERROR root Traceback (most recent call last):
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/bin/trove-guestagent", line 10, in <module>
2016-11-30 00:20:48.382 4225 ERROR root sys.exit(main())
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/cmd/guest.py", line 63, in main
2016-11-30 00:20:48.382 4225 ERROR root rpc_api_version=rpc_version.RPC_API_VERSION)
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/common/rpc/service.py", line 48, in __init__
2016-11-30 00:20:48.382 4225 ERROR root self.manager_impl = profiler.trace_cls("rpc")(_manager)
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 153, in decorator
2016-11-30 00:20:48.382 4225 ERROR root for attr_name, attr in inspect.getmembers(cls):
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/inspect.py", line 253, in getmembers
2016-11-30 00:20:48.382 4225 ERROR root value = getattr(object, key)
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/guestagent/datastore/mysql_common/manager.py", line 77, in datastore_log_defs
2016-11-30 00:20:48.382 4225 ERROR root datastore_dir = self.mysql_app.get_data_dir()
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/guestagent/datastore/mysql_common/service.py", line 627, in get_data_dir
2016-11-30 00:20:48.382 4225 ERROR root MySQLConfParser.SERVER_CONF_SECTION).get('datadir')
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/guestagent/common/configuration.py", line 99, in get_value
2016-11-30 00:20:48.382 4225 ERROR root self._refresh_cache()
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/guestagent/common/configuration.py", line 198, in _refresh_cache
2016-11-30 00:20:48.382 4225 ERROR root self._value_cache = self.parse_configuration()
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/guestagent/common/configuration.py", line 112, in parse_configuration
2016-11-30 00:20:48.382 4225 ERROR root as_root=self._requires_root)
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/guestagent/common/operating_system.py", line 60, in read_file
2016-11-30 00:20:48.382 4225 ERROR root return _read_file_as_root(path, codec, decode=decode)
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/guestagent/common/operating_system.py", line 116, in _read_file_as_root
2016-11-30 00:20:48.382 4225 ERROR root return codec.deserialize(fp.read())
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/dist-packages/trove/common/stream_codecs.py", line 208, in deserialize
2016-11-30 00:20:48.382 4225 ERROR root parser.readfp(self._pre_parse(stream))
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
2016-11-30 00:20:48.382 4225 ERROR root self._read(fp, filename)
2016-11-30 00:20:48.382 4225 ERROR root File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
2016-11-30 00:20:48.382 4225 ERROR root raise MissingSectionHeaderError(fpname, lineno, line)
2016-11-30 00:20:48.382 4225 ERROR root MissingSectionHeaderError: File contains no section headers.
2016-11-30 00:20:48.382 4225 ERROR root file: <???>, line: 3
2016-11-30 00:20:48.382 4225 ERROR root '!includedir /etc/mysql/conf.d/\n'

======================================

Adding a [default] at the top of the /etc/mysql/my.cnf file fixes this.

Sam Morrison (sorrison)
description: updated
Revision history for this message
Jack Ivanov (gunph1ld) wrote :

I have the same issue. Anyone?

Revision history for this message
Amrith Kumar (amrith) wrote :

MySQL 5.7 wasn't supported in mitaka.

Amrith Kumar (amrith)
Changed in trove:
importance: Undecided → High
Revision history for this message
Manoj Kumar (manojnkumar) wrote :

I believe MySQL 5.7 is working on Newton and above. Assigning to Luke to confirm.

Changed in trove:
assignee: nobody → Luke Browning (lukebrowning-y)
Revision history for this message
Luke Browning (lukebrowning-y) wrote :

mysql 5.7 is not supported by trove.

Changed in trove:
assignee: Luke Browning (lukebrowning-y) → nobody
Revision history for this message
Luke Browning (lukebrowning-y) wrote :
Changed in trove:
status: New → Fix Committed
Revision history for this message
Realtime (peter-icb) wrote :

I got the same bug with Ubuntu 18.04 as guest image. Openstack ist Queens on Ubuntu 16.04.

Is it still true that mysql 5.7 is not supported by trove as written in the comment of 2017-11-02 here?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.