From 2a50e36dfa46b9353840170665fb8a891b18228d Mon Sep 17 00:00:00 2001 From: QiLiang Date: Thu, 12 Jan 2017 09:26:33 +0800 Subject: FIX kvm_cpu_num fetch bug If the compute node not support kvm virtualization, will get error: TASK: [nova-compute | get number of cpu support virtualization] ********* failed: [host-1] => {"changed": true, "cmd": "egrep -c '(vmx|svm)' /proc/cpuinfo", "delta": "0:00:00.054521", "end": "2017-01-11 10:46:12.093745", "rc": 1, "start": "2017-01-11 10:46:12.039224", "warnings": []} JIRA: - Change-Id: I773d6c703c23c8c0eb477e1d61eb0ca5366e6722 Signed-off-by: QiLiang --- deploy/adapters/ansible/roles/nova-compute/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'deploy/adapters') diff --git a/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml b/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml index 321edaab..417f8771 100644 --- a/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml +++ b/deploy/adapters/ansible/roles/nova-compute/tasks/main.yml @@ -31,7 +31,7 @@ when: ansible_os_family == "Debian" - name: get number of cpu support virtualization - shell: egrep -c '(vmx|svm)' /proc/cpuinfo + shell: egrep -c '(vmx|svm)' /proc/cpuinfo || echo 0 register: kvm_cpu_num - name: update nova-compute conf -- cgit 1.2.3-korg