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
1=== modified file 'charmhelpers/contrib/database/mysql.py'
2--- charmhelpers/contrib/database/mysql.py 2015-09-18 13:38:56 +0000
3+++ charmhelpers/contrib/database/mysql.py 2016-03-10 22:58:16 +0000
4@@ -58,8 +58,11 @@
5
6 def connect(self, user='root', password=None):
7 log("Opening db connection for %s@%s" % (user, self.host), level=DEBUG)
8- self.connection = MySQLdb.connect(user=user, host=self.host,
9- passwd=password)
10+ if password==None:
11+ self.connection = MySQLdb.connect(user=user, host=self.host)
12+ else:
13+ self.connection = MySQLdb.connect(user=user, host=self.host,
14+ passwd=password)
15
16 def database_exists(self, db_name):
17 cursor = self.connection.cursor()
18
19=== modified file 'hooks/percona_hooks.py'
20--- hooks/percona_hooks.py 2016-01-15 00:04:57 +0000
21+++ hooks/percona_hooks.py 2016-03-10 22:58:16 +0000
22@@ -49,6 +49,7 @@
23 get_host_ip,
24 get_cluster_hosts,
25 configure_sstuser,
26+ configure_rootpw,
27 configure_mysql_root_password,
28 relation_clear,
29 assert_charm_supports_ipv6,
30@@ -109,6 +110,7 @@
31 render_config()
32 apt_update(fatal=True)
33 apt_install(determine_packages(), fatal=True)
34+ configure_rootpw(config('root-password'))
35 configure_sstuser(config('sst-password'))
36
37
38
39=== modified file 'hooks/percona_utils.py'
40--- hooks/percona_utils.py 2016-01-15 00:04:57 +0000
41+++ hooks/percona_utils.py 2016-03-10 22:58:16 +0000
42@@ -180,6 +180,7 @@
43 "ON *.* TO 'sstuser'@'ip6-localhost' IDENTIFIED "
44 "BY '{}'")
45
46+SQL_SET_ROOTPW = ("UPDATE mysql.user SET Password=PASSWORD('{}') WHERE User='root'")
47
48 def get_db_helper():
49 return MySQLHelper(rpasswdf_template='/var/lib/charm/%s/mysql.passwd' %
50@@ -194,6 +195,11 @@
51 m_helper.execute(SQL_SST_USER_SETUP.format(sst_password))
52 m_helper.execute(SQL_SST_USER_SETUP_IPV6.format(sst_password))
53
54+def configure_rootpw(password):
55+ m_helper = get_db_helper()
56+ m_helper.connect()
57+ m_helper.execute(SQL_SET_ROOTPW.format(password))
58+ m_helper.execute("FLUSH PRIVILEGES")
59
60 # TODO: mysql charmhelper
61 def configure_mysql_root_password(password):

Subscribers

People subscribed via source and target branches

to all changes: