Merge lp:~matsubara/charms/trusty/nova-compute-power/trusty into lp:~zulcss/charms/trusty/nova-compute-power/trusty

Proposed by Diogo Matsubara
Status: Needs review
Proposed branch: lp:~matsubara/charms/trusty/nova-compute-power/trusty
Merge into: lp:~zulcss/charms/trusty/nova-compute-power/trusty
Diff against target: 95 lines (+24/-9)
4 files modified
README (+3/-3)
config.yaml (+15/-0)
hooks/fabfile.py (+1/-1)
hooks/nova_compute_proxy.py (+5/-5)
To merge this branch: bzr merge lp:~matsubara/charms/trusty/nova-compute-power/trusty
Reviewer Review Type Date Requested Status
Chuck Short Pending
Review via email: mp+237297@code.launchpad.net

Description of the change

Fixes to nova_compute_proxy.py to avoid install hook errors:

- fix variable name typo: s/self.respository/self.repository/
- remove trailing command from ssh_key argument as this makes it be interpreted as a tuple
- remove _ from self.key_filename attribute
- remove unnecessary key argument from POWERProxy._write_key() method

To post a comment you must log in.
80. By Diogo Matsubara

add openstack-origin to config.yaml to avoid charmhelpers errors

Revision history for this message
Diogo Matsubara (matsubara) wrote :

Added openstack-origin option to config.yaml to avoid charmhelpers errors such as http://pastebin.ubuntu.com/8508559/ and http://pastebin.ubuntu.com/8510347/

81. By Diogo Matsubara

fix command to create bridge in the power host

82. By Diogo Matsubara

fix typos in README file

Unmerged revisions

82. By Diogo Matsubara

fix typos in README file

81. By Diogo Matsubara

fix command to create bridge in the power host

80. By Diogo Matsubara

add openstack-origin to config.yaml to avoid charmhelpers errors

79. By Diogo Matsubara

small fixes to charm to avoid install errors: typo in var name, trailing comma, private attribute, unnecessary arg for write_key() method

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2014-06-20 19:13:19 +0000
+++ README 2014-10-29 18:12:02 +0000
@@ -8,9 +8,9 @@
88
9* Generate a ssh key that the charm can use to login to the compute node9* Generate a ssh key that the charm can use to login to the compute node
10 to start installing RPMS and configuration file10 to start installing RPMS and configuration file
11* A yum repoistiory which contains the apprioate IBM Openstack Icehouse 11* A yum repository which contains the appropriate IBM Openstack Icehouse
12 RPMs.12 RPMs.
13* Sudo password-les configured for the user on the compute node.13* Sudo password-less configured for the user on the compute node.
1414
15Once you have this setup you must configure the charm as follow:15Once you have this setup you must configure the charm as follow:
1616
@@ -18,7 +18,7 @@
18 charm.18 charm.
192. Create a config.yaml that has the following:192. Create a config.yaml that has the following:
2020
21 * power-user: username used to access and configure the power node.21 * power-user: username used to access and configure the power node.
22 * power-repo: Yum repository url.22 * power-repo: Yum repository url.
23 * power-hosts: IP address of power node23 * power-hosts: IP address of power node
2424
2525
=== modified file 'config.yaml'
--- config.yaml 2014-06-16 15:18:37 +0000
+++ config.yaml 2014-10-29 18:12:02 +0000
@@ -1,4 +1,19 @@
1options:1options:
2 openstack-origin:
3 default: distro
4 type: string
5 description: |
6 Repository from which to install. May be one of the following:
7 distro (default), ppa:somecustom/ppa, a deb url sources entry,
8 or a supported Cloud Archive release pocket.
9
10 Supported Cloud Archive sources include: cloud:precise-folsom,
11 cloud:precise-folsom/updates, cloud:precise-folsom/staging,
12 cloud:precise-folsom/proposed.
13
14 Note that updating this setting to a source that is known to
15 provide a later version of OpenStack will trigger a software
16 upgrade.
2 openstack-release:17 openstack-release:
3 type: string18 type: string
4 default: icehouse19 default: icehouse
520
=== modified file 'hooks/fabfile.py'
--- hooks/fabfile.py 2014-06-16 15:18:37 +0000
+++ hooks/fabfile.py 2014-10-29 18:12:02 +0000
@@ -34,7 +34,7 @@
3434
3535
36def add_bridge():36def add_bridge():
37 sudo('ovs-vsctl -- --may-exist add br-int')37 sudo('ovs-vsctl -- --may-exist add-br br-int')
3838
3939
40def enable_shell(user):40def enable_shell(user):
4141
=== modified file 'hooks/nova_compute_proxy.py'
--- hooks/nova_compute_proxy.py 2014-06-16 15:57:42 +0000
+++ hooks/nova_compute_proxy.py 2014-10-29 18:12:02 +0000
@@ -62,16 +62,16 @@
62 if None in [user, ssh_key, hosts, repository]:62 if None in [user, ssh_key, hosts, repository]:
63 raise Exception('Missing configuration')63 raise Exception('Missing configuration')
64 self.user = user64 self.user = user
65 self.ssh_key = ssh_key,65 self.ssh_key = ssh_key
66 self.hosts = hosts.split()66 self.hosts = hosts.split()
67 self.respository = repository67 self.repository = repository
68 self.password = password68 self.password = password
69 self.conf_path = os.path.join('/var/lib/charm',69 self.conf_path = os.path.join('/var/lib/charm',
70 service_name())70 service_name())
71 self._key_filename = self._write_key()71 self.key_filename = self._write_key()
72 self._init_fabric()72 self._init_fabric()
7373
74 def _write_key(self, key):74 def _write_key(self):
75 return os.path.join(charm_dir(), 'files', self.ssh_key)75 return os.path.join(charm_dir(), 'files', self.ssh_key)
7676
77 def _init_fabric(self):77 def _init_fabric(self):
@@ -89,7 +89,7 @@
8989
90 def _setup_yum(self):90 def _setup_yum(self):
91 log('Setup yum')91 log('Setup yum')
92 context = {'yum_repo': self.respository}92 context = {'yum_repo': self.repository}
93 _, filename = tempfile.mkstemp()93 _, filename = tempfile.mkstemp()
94 with open(filename, 'w') as f:94 with open(filename, 'w') as f:
95 f.write(_render_template('yum.template', context))95 f.write(_render_template('yum.template', context))

Subscribers

People subscribed via source and target branches

to all changes: