diff options
author | QiLiang <liangqi1@huawei.com> | 2017-01-12 09:26:33 +0800 |
---|---|---|
committer | Justin chi <chigang@huawei.com> | 2017-01-13 01:32:29 +0000 |
commit | 2a50e36dfa46b9353840170665fb8a891b18228d (patch) | |
tree | b0ce98c64eaaf5581e7302dbc521024f422dbc6d /deploy/adapters/ansible | |
parent | 09ca28954c94fd9d9336b5fe2a688d2c2d27955b (diff) |
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 <liangqi1@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible')
-rw-r--r-- | deploy/adapters/ansible/roles/nova-compute/tasks/main.yml | 2 |
1 files changed, 1 insertions, 1 deletions
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 |