Skip to content

Commit

Permalink
Install linux_crashdump and update grub file
Browse files Browse the repository at this point in the history
Also, reboot the compute node even when running in container mode.

Change-Id: I1dca538ed21e78fc360842f24a26decefdc42221
partial-bug: #1694216
  • Loading branch information
haripk committed May 31, 2017
1 parent a1d47d8 commit 442525c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions playbooks/roles/node/tasks/agent.yml
Expand Up @@ -81,6 +81,21 @@
- name: Create /var/crash on host for kernel dump
file: path=/var/crash state=directory mode=777

- name: Install kernel crashdump
package: name=linux-crashdump state=present

- name: Update the grub configuration for ubuntu 16.04
shell: 'sudo sed -i "s/crashkernel=.*\([ | \"]\)/crashkernel=384M-2G:64M,2G-16G:128M,16G-:256M\1/g" /etc/default/grub.d/kexec-tools.cfg; sudo update-grub'
when:
- ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- ansible_distribution_version == '16.04'

- name: Update the grub configuration for ubuntu 14.04
shell: 'sudo sed -i "s/crashkernel=.*\([ | \"]\)/crashkernel=384M-2G:64M,2G-16G:128M,16G-:256M\1/g" /etc/default/grub.d/kexec-tools.cfg; [ -f /etc/default/kdump-tools ] && sudo sed -i "s/USE_KDUMP=0/USE_KDUMP=1/" /etc/default/kdump-tools; sudo update-grub'
when:
- ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
- ansible_distribution_version == '14.04'

- name: "Start contrail agent container (non-kubernetes)"
docker_container:
name: agent
Expand Down
4 changes: 2 additions & 2 deletions playbooks/site.yml
Expand Up @@ -68,12 +68,12 @@
poll: 0
sudo: true
ignore_errors: true
when: contrail_compute_mode == 'bare_metal'
when: contrail_compute_mode == 'bare_metal' or contrail_compute_mode == 'container'

- name: Waiting for server to come back
local_action: wait_for port=22 host={{ inventory_hostname }} state=started delay=30 timeout=600
sudo: false
when: contrail_compute_mode == 'bare_metal'
when: contrail_compute_mode == 'bare_metal' or contrail_compute_mode == 'container'

- name: Setup ceph compute node
hosts: ceph-compute
Expand Down

0 comments on commit 442525c

Please sign in to comment.