Bug 1378497

Summary: OSP9/10 upgrade, gnocchi statsd doesn't restart.
Product: Red Hat OpenStack Reporter: Sofer Athlan-Guyot <sathlang>
Component: openstack-tripleo-heat-templatesAssignee: Sofer Athlan-Guyot <sathlang>
Status: CLOSED ERRATA QA Contact: Yurii Prokulevych <yprokule>
Severity: unspecified Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: jcoufal, mburns, rhel-osp-director-maint
Target Milestone: rcKeywords: Triaged
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-5.0.0-0.20161003064637.d636e3a.1.2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-14 16:04:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1337794    

Description Sofer Athlan-Guyot 2016-09-22 14:53:14 UTC
Description of problem:  Hi,

after a successful upgrade of the controller "environments/major-upgrade-pacemaker.yaml", the statsd service is not restarted. (but the upgrade exit 0)

The log shows that:

2016-09-22 14:18:57.319 19813 ERROR oslo_db.sqlalchemy.exc_filters _check_mysql_exception(errinfo)
2016-09-22 14:18:57.319 19813 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 115, in _check_mysql_exception
2016-09-22 14:18:57.319 19813 ERROR oslo_db.sqlalchemy.exc_filters raise InternalError(errno, errorvalue)
2016-09-22 14:18:57.319 19813 ERROR oslo_db.sqlalchemy.exc_filters InternalError: (1054, u"Unknown column 'metric.unit' in 'field list'")
2016-09-22 14:18:57.319 19813 ERROR oslo_db.sqlalchemy.exc_filters
2016-09-22 14:18:57.323 19813 ERROR gnocchi.cli [-] Unexpected error during metric cleanup

2016-09-22 14:18:57.323 19813 ERROR gnocchi.cli File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 115, in _check_mysql_exception
2016-09-22 14:18:57.323 19813 ERROR gnocchi.cli raise InternalError(errno, errorvalue)
2016-09-22 14:18:57.323 19813 ERROR gnocchi.cli DBError: (pymysql.err.InternalError) (1054, u"Unknown column 'metric.unit' in 'field list'") [SQL: u'SELECT metric.id AS metric_i
hive_policy_name AS metric_archive_policy_name, metric.created_by_user_id AS metric_created_by_user_id, metric.created_by_project_id AS metric_created_by_project_id, metric.reso
tric_resource_id, metric.name AS metric_name, metric.unit AS metric_unit, metric.status AS metric_status, archive_policy_1.name AS archive_policy_1_name, archive_policy_1.back_w
ive_policy_1_back_window, archive_policy_1.definition AS archive_policy_1_definition, archive_policy_1.aggregation_methods AS archive_policy_1_aggregation_methods \nFROM metric
IN archive_policy AS archive_policy_1 ON archive_policy_1.name = metric.archive_policy_name \nWHERE metric.status = %s ORDER BY metric.id ASC'] [parameters: ('delete',)]

Comment 3 Yurii Prokulevych 2016-11-08 13:08:05 UTC
Verified with openstack-tripleo-heat-templates-5.0.0-1.2.el7ost.noarch

After the upgrade step with passed '-e /usr/share/openstack-tripleo-heat-templates/environments/major-upgrade-pacemaker.yaml' file, gnocchi-statsd services are up-and-running on all 3 controllers.

E.g:

systemctl status openstack-gnocchi-statsd
● openstack-gnocchi-statsd.service - OpenStack gnocchi statsd service
   Loaded: loaded (/usr/lib/systemd/system/openstack-gnocchi-statsd.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2016-11-08 12:50:52 UTC; 8min ago
 Main PID: 15047 (/usr/bin/python)
   CGroup: /system.slice/openstack-gnocchi-statsd.service
           └─15047 /usr/bin/python2 /usr/bin/gnocchi-statsd --logfile /var/log/gnocchi/statsd.log

Nov 08 12:50:52 controller-1.localdomain systemd[1]: Started OpenStack gnocchi statsd service.
Nov 08 12:50:52 controller-1.localdomain systemd[1]: Starting OpenStack gnocchi statsd service...
Nov 08 12:50:58 controller-1.localdomain gnocchi-statsd[15047]: /usr/lib/python2.7/site-packages/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for 10.0.0.101 has no `subjectA...
Nov 08 12:50:58 controller-1.localdomain gnocchi-statsd[15047]: SubjectAltNameWarning

Comment 5 errata-xmlrpc 2016-12-14 16:04:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2948.html