Merge lp:~opnfv-team/maas-deployer/power8 into lp:~maas-deployers/maas-deployer/next

Proposed by Narinder Gupta
Status: Merged
Merged at revision: 65
Proposed branch: lp:~opnfv-team/maas-deployer/power8
Merge into: lp:~maas-deployers/maas-deployer/next
Diff against target: 76 lines (+17/-5)
3 files modified
maas_deployer/vmaas/engine.py (+1/-1)
maas_deployer/vmaas/templates/cloud-init.cfg (+3/-0)
maas_deployer/vmaas/vm.py (+13/-4)
To merge this branch: bzr merge lp:~opnfv-team/maas-deployer/power8
Reviewer Review Type Date Requested Status
Narinder Gupta (community) fixed Approve
Billy Olsen Needs Fixing
Edward Hope-Morley Pending
Review via email: mp+288335@code.launchpad.net

Commit message

modified it to accommodate the review comments.

Description of the change

This patch is submitted from IBM power 8 and wants to merge this patch to enable MAAS deployer for IBM power 8 systems and VMs.
IBM is enabling opnfv JOID (Juju opnfv infratstruture deployer) with POWER 8 and this is first patch to enable the same. I think we are commenting one package in the patch but that is needed as that package does not exist for power8 system.

To post a comment you must log in.
Revision history for this message
Billy Olsen (billy-olsen) wrote :

Rather than simply commenting this out, I think we need to refactor this to pass the architecture through to the template that renders the cloud-init.cfg and handle it properly, rather than commenting it out which may risk breaking other arches, e.g.:

{% if not arch == 'power' -%}
- linux-image-extra-virtual
{% endif -%}

review: Needs Fixing
Revision history for this message
Narinder Gupta (narindergupta) wrote :

Hi Billy,
Please review it again as i have updated the changes to check for
architecture. If you can review ASAP that will help IBM to test the final
build based on this branch.

https://code.launchpad.net/~opnfv-team/maas-deployer/power8/+merge/288335

Thanks and Regards,
Narinder Gupta (PMP) <email address hidden>
Canonical, Ltd. narindergupta [irc.freenode.net]
+1.281.736.5150 narindergupta2007[skype]

Ubuntu- Linux for human beings | www.ubuntu.com | www.canonical.com

On Mon, Mar 7, 2016 at 1:15 PM, Billy Olsen <email address hidden>
wrote:

> Review: Needs Fixing
>
> Rather than simply commenting this out, I think we need to refactor this
> to pass the architecture through to the template that renders the
> cloud-init.cfg and handle it properly, rather than commenting it out which
> may risk breaking other arches, e.g.:
>
> {% if not arch == 'power' -%}
> - linux-image-extra-virtual
> {% endif -%}
>
> --
> https://code.launchpad.net/~opnfv-team/maas-deployer/power8/+merge/288335
> Your team OPNFV Team is subscribed to branch
> lp:~opnfv-team/maas-deployer/power8.
>

Revision history for this message
Narinder Gupta (narindergupta) :
review: Needs Resubmitting (resubmit after fix)
Revision history for this message
Narinder Gupta (narindergupta) :
review: Approve (fixed)
lp:~opnfv-team/maas-deployer/power8 updated
65. By Billy Olsen

Enable Power8 system deployment with MAAS deployer.

This patch was authored by Narinder Gupta and IBM in order to enable
ppc64/Power8 support in maas-deployer.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'maas_deployer/vmaas/engine.py'
2--- maas_deployer/vmaas/engine.py 2016-02-18 04:49:17 +0000
3+++ maas_deployer/vmaas/engine.py 2016-03-08 13:59:47 +0000
4@@ -85,7 +85,7 @@
5 """
6 node = {
7 'name': juju_domain.name,
8- 'architecture': 'amd64/generic',
9+ 'architecture': juju_config.get('arch'),
10 'mac_addresses': [x for x in juju_domain.mac_addresses],
11 'tags': 'bootstrap'
12 }
13
14=== modified file 'maas_deployer/vmaas/templates/cloud-init.cfg'
15--- maas_deployer/vmaas/templates/cloud-init.cfg 2016-02-04 19:06:52 +0000
16+++ maas_deployer/vmaas/templates/cloud-init.cfg 2016-03-08 13:59:47 +0000
17@@ -43,7 +43,10 @@
18 - maas-dns
19 # Used to manage KVM instances via libvirt
20 - libvirt-bin
21+ # Below package does not exist on Power8 architecture.
22+{% if arch != 'ppc64' -%}
23 - linux-image-extra-virtual
24+{% endif -%}
25 - jq
26 - juju-core
27 - juju-deployer
28
29=== modified file 'maas_deployer/vmaas/vm.py'
30--- maas_deployer/vmaas/vm.py 2015-09-23 15:57:45 +0000
31+++ maas_deployer/vmaas/vm.py 2016-03-08 13:59:47 +0000
32@@ -47,6 +47,7 @@
33 self.memory = params.get('memory', 1024)
34 self.pool = params.get('pool', 'default')
35 self.netboot = params.get('netboot', False)
36+ self.video = params.get('video', 'cirrus')
37
38 self.working_dir = tempfile.mkdtemp()
39 self.conn = libvirt.open(cfg.remote)
40@@ -130,7 +131,9 @@
41 '--connect', cfg.remote,
42 '--name', self.name,
43 '--ram', str(self.memory),
44- '--vcpus', str(self.vcpus)]
45+ '--vcpus', str(self.vcpus),
46+ '--video', str(self.video),
47+ '--arch', str(self.arch)]
48
49 for disk in self._get_disks():
50 cmd.extend(['--disk', disk])
51@@ -307,8 +310,13 @@
52 Returns a tuple with the cloud-image url and the file it
53 should be saved as.
54 """
55- url = ('https://cloud-images.ubuntu.com/{release}/current/'
56- '{release}-server-cloudimg-{arch}-disk1.img')
57+ if self.arch == "ppc64":
58+ url = ('https://cloud-images.ubuntu.com/{release}/current/'
59+ '{release}-server-cloudimg-{arch}el-disk1.img')
60+ else:
61+ url = ('https://cloud-images.ubuntu.com/{release}/current/'
62+ '{release}-server-cloudimg-{arch}-disk1.img')
63+
64 url = url.format(release=self.release, arch=self.arch)
65 f = url.split('/')[-1]
66 return (url, f)
67@@ -450,7 +458,8 @@
68 'ssh_key': self._get_ssh_key(),
69 'apt_http_proxy': self.apt_http_proxy,
70 'apt_sources': self.apt_sources,
71- 'network_config': '\n'.join(etc_net_interfaces)
72+ 'network_config': '\n'.join(etc_net_interfaces),
73+ 'arch': self.arch
74 }
75 content = template.load('cloud-init.cfg', parms)
76 with open(base_file, 'w+') as f:

Subscribers

People subscribed via source and target branches