Skip to content

Commit

Permalink
UCA support for nova compute
Browse files Browse the repository at this point in the history
This changes adds the Ubuntu Cloud Archive repo support for the nova
compute kvm. UCA repo is important to support architecture ppc64le
since the default Ubuntu trusty repo does not contain the all required
packages for libvirt-bin.

Change-Id: Ic1e7619b48a9b12ba876f83507497cf1e557223a
  • Loading branch information
chhagarw committed Jun 2, 2016
1 parent 1fc45e5 commit e37a680
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
8 changes: 8 additions & 0 deletions defaults/main.yml
Expand Up @@ -403,3 +403,11 @@ nova_nova_conf_overrides: {}
nova_rootwrap_conf_overrides: {}
nova_api_paste_ini_overrides: {}
nova_policy_overrides: {}

# Ubuntu Cloud Archive variables
nova_uca_enable: True
uca_openstack_release: mitaka
uca_apt_repo_url: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}"
uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main"

10 changes: 10 additions & 0 deletions releasenotes/notes/nova-uca-support-409b2e6afbce47b1.yaml
@@ -0,0 +1,10 @@
---
features:
- Nova UCA repository support is implemented by default.
This will allow the users to benefit from the updated
packages for KVM.

The ``nova_uca_enable`` variable controls the install
source for the KVM packages. By default this value is set
to ``True`` to make use of UCA repository. User can set to
``False`` to disable.
23 changes: 22 additions & 1 deletion tasks/nova_compute_kvm_install.yml
Expand Up @@ -13,6 +13,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Add ubuntu cloud archive key package
apt:
pkg: ubuntu-cloud-keyring
when: nova_uca_enable
register: add_keys
tags:
- add-apt-keys

- name: Add UCA repo(s)
apt_repository:
repo: "{{ uca_repo }}"
state: present
register: add_repo
when: nova_uca_enable
until: add_repo|success
retries: 5
delay: 2
tags:
- add-uca-repo

#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
#in 1.9.x or we move to 2.0 (if tested working)
Expand All @@ -27,7 +47,8 @@
- name: Update apt if needed
apt:
update_cache: yes
when: "ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}"
when: ("ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}" or
add_keys|changed or add_repo|changed)
tags:
- nova-apt-packages
- nova-compute-kvm-apt-packages
Expand Down

0 comments on commit e37a680

Please sign in to comment.