Merge lp:~opnfv-team/charms/trusty/percona-cluster/power8 into lp:~openstack-charmers/charms/trusty/percona-cluster/next

Proposed by Narinder Gupta
Status: Rejected
Rejected by: James Page
Proposed branch: lp:~opnfv-team/charms/trusty/percona-cluster/power8
Merge into: lp:~openstack-charmers/charms/trusty/percona-cluster/next
Diff against target: 61 lines (+13/-2)
3 files modified
charmhelpers/contrib/database/mysql.py (+5/-2)
hooks/percona_hooks.py (+2/-0)
hooks/percona_utils.py (+6/-0)
To merge this branch: bzr merge lp:~opnfv-team/charms/trusty/percona-cluster/power8
Reviewer Review Type Date Requested Status
David Ames Pending
OpenStack Charmers Pending
Review via email: mp+288723@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Narinder Gupta (narindergupta) wrote :

this merge proposal is from IBM where percona-cluster charm was failing to install on power8 system. It seems there was no root-password was set during install and even config option did not help. But after doing this modification we are able to install this on Power8 system.

Revision history for this message
James Page (james-page) wrote :

Hi Narinder

percona-cluster charm development moved under the openstack project last week; please take a read of https://github.com/openstack-charmers/openstack-community/blob/master/README.dev-charms.md and re-submit your change in the new location.

Thanks!

Unmerged revisions

90. By Narinder Gupta

modified to include the power8 changes.

89. By Jill Rouleau

Add backup action

Add a new action to backup the pxc database on a unit.

Backups by default are stored in /opt/backups/mysql and can
optionally be compressed and done as incremental backups.

Change-Id: I5c6ab9fd8be7cb6cdb2a26e849ec0b22d8d4f9a6

88. By James Page

Add tox support for check/gate

This charm was missed pre-migration to git/gerrit.

Add support for executing pep8 and unit tests using tox.

Change-Id: I5518e870c572ccc292d6fe4e9b7c910c7f3f0260

87. By uosci-testing-bot

Adapt imports and metadata for github move

86. By James Page

Add gitreview prior to migration to openstack

85. By Liam Young

[thedac, r=gnuoy] Charm helpers sync. Make the service_running status check cover percona-cluster's unique status message.

84. By David Ames

[jamespage, r=thedac] Fix Bug:1481362 Make datadir dynamic depending on ubuntu version

83. By Liam Young

Update test combo definitions, remove Vivid deprecated release tests, update bundletester testplan yaml, update tests README.

82. By Liam Young

[hopem, r=gnuoy]
Improve shared-db rel logging and tidy get_db_host
Closes-Bug: 1512293

81. By James Page

Update maintainer

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'charmhelpers/contrib/database/mysql.py'
--- charmhelpers/contrib/database/mysql.py 2015-09-18 13:38:56 +0000
+++ charmhelpers/contrib/database/mysql.py 2016-03-10 22:58:16 +0000
@@ -58,8 +58,11 @@
5858
59 def connect(self, user='root', password=None):59 def connect(self, user='root', password=None):
60 log("Opening db connection for %s@%s" % (user, self.host), level=DEBUG)60 log("Opening db connection for %s@%s" % (user, self.host), level=DEBUG)
61 self.connection = MySQLdb.connect(user=user, host=self.host,61 if password==None:
62 passwd=password)62 self.connection = MySQLdb.connect(user=user, host=self.host)
63 else:
64 self.connection = MySQLdb.connect(user=user, host=self.host,
65 passwd=password)
6366
64 def database_exists(self, db_name):67 def database_exists(self, db_name):
65 cursor = self.connection.cursor()68 cursor = self.connection.cursor()
6669
=== modified file 'hooks/percona_hooks.py'
--- hooks/percona_hooks.py 2016-01-15 00:04:57 +0000
+++ hooks/percona_hooks.py 2016-03-10 22:58:16 +0000
@@ -49,6 +49,7 @@
49 get_host_ip,49 get_host_ip,
50 get_cluster_hosts,50 get_cluster_hosts,
51 configure_sstuser,51 configure_sstuser,
52 configure_rootpw,
52 configure_mysql_root_password,53 configure_mysql_root_password,
53 relation_clear,54 relation_clear,
54 assert_charm_supports_ipv6,55 assert_charm_supports_ipv6,
@@ -109,6 +110,7 @@
109 render_config()110 render_config()
110 apt_update(fatal=True)111 apt_update(fatal=True)
111 apt_install(determine_packages(), fatal=True)112 apt_install(determine_packages(), fatal=True)
113 configure_rootpw(config('root-password'))
112 configure_sstuser(config('sst-password'))114 configure_sstuser(config('sst-password'))
113115
114116
115117
=== modified file 'hooks/percona_utils.py'
--- hooks/percona_utils.py 2016-01-15 00:04:57 +0000
+++ hooks/percona_utils.py 2016-03-10 22:58:16 +0000
@@ -180,6 +180,7 @@
180 "ON *.* TO 'sstuser'@'ip6-localhost' IDENTIFIED "180 "ON *.* TO 'sstuser'@'ip6-localhost' IDENTIFIED "
181 "BY '{}'")181 "BY '{}'")
182182
183SQL_SET_ROOTPW = ("UPDATE mysql.user SET Password=PASSWORD('{}') WHERE User='root'")
183184
184def get_db_helper():185def get_db_helper():
185 return MySQLHelper(rpasswdf_template='/var/lib/charm/%s/mysql.passwd' %186 return MySQLHelper(rpasswdf_template='/var/lib/charm/%s/mysql.passwd' %
@@ -194,6 +195,11 @@
194 m_helper.execute(SQL_SST_USER_SETUP.format(sst_password))195 m_helper.execute(SQL_SST_USER_SETUP.format(sst_password))
195 m_helper.execute(SQL_SST_USER_SETUP_IPV6.format(sst_password))196 m_helper.execute(SQL_SST_USER_SETUP_IPV6.format(sst_password))
196197
198def configure_rootpw(password):
199 m_helper = get_db_helper()
200 m_helper.connect()
201 m_helper.execute(SQL_SET_ROOTPW.format(password))
202 m_helper.execute("FLUSH PRIVILEGES")
197203
198# TODO: mysql charmhelper204# TODO: mysql charmhelper
199def configure_mysql_root_password(password):205def configure_mysql_root_password(password):

Subscribers

People subscribed via source and target branches

to all changes: