507228a228
As an operator I want to be able to persist raw and processed introspection data so that I am able to view it at a later date. As an operator I want to be able to persist raw and processed introspection data so that I am able to reprocess the data after the initial inspection process has completed. In the absence of swift, we can use the bifrost nginx web server - masquerading as an object store - to store raw and processed introspection data for nodes. This allows introspection data to be retrieved and reprocessed after the initial inspection has completed. This can be useful when the processing pipeline or introspection rules are changed. Change-Id: Ia2bd16080594e854054f380d4f7670eaea98e82b Closes-Bug: #1685879
41 lines
1.6 KiB
YAML
41 lines
1.6 KiB
YAML
# Copyright (c) 2018 StackHPC Ltd.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
---
|
|
# TODO(mgoddard): Ideally we would grab inspection data from ironic inspector
|
|
# rather than going direct to the web server. That would require either
|
|
# installing python-openstackclient, or creating an ansible module that uses
|
|
# python-ironic-inspector-client.
|
|
- block:
|
|
- name: Check node hardware inspection data
|
|
uri:
|
|
url: "{{ inspector_store_data_url ~ '/ironic-inspector/inspector_data-' ~ uuid }}"
|
|
method: GET
|
|
return_content: True
|
|
register: inspection_data
|
|
|
|
# TODO(mgoddard): More validation of data format and contents.
|
|
- name: Validate the inspection data format
|
|
assert:
|
|
that:
|
|
- "'inventory' in data"
|
|
- "'memory' in inventory"
|
|
- "'cpu' in inventory"
|
|
- "'bmc_address' in inventory"
|
|
- "'interfaces' in inventory"
|
|
- "'disks' in inventory"
|
|
vars:
|
|
data: "{{ inspection_data.content | from_json }}"
|
|
inventory: "{{ data.inventory }}"
|
|
when: inspector_store_data_in_nginx | bool
|