Comment 2 for bug 1907250

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote : Re: [focal-ussuri] update-status hook hangs (but you can't see it!)

So the problem is really in charmhelpers, in the mysql.py module. The connect method - according to https://github.com/PyMySQL/mysqlclient/blob/401ca8297439d8e34fff0ebda19bf6121de5d2ed/MySQLdb/connections.py#L71 - needs a connect_timeout named parameter otherwise it will hang forever.

The issue is that the local instance for the mysql_router to connect to isn't responding, but no error is being generated. There are two steps to solving the problem:

1. Make is obvious that it is happening - this is by adding a connect_timeout to the connection call and allowing this to generate an exception which can be caught so that the charm correctly goes into the error state.

2. Work out why it's not working and do something about it. It could be due to upgrading the mysql units (during openstack-upgrade) which causes a connection failure/timeout or some other issue. This will become visible and then a fix possible.