Skip to content

Refactor to allow tool to be used with kayobe overcloud introspection data save#10

Open
jovial wants to merge 1 commit into
masterfrom
feature/kayobe-introspection-save
Open

Refactor to allow tool to be used with kayobe overcloud introspection data save#10
jovial wants to merge 1 commit into
masterfrom
feature/kayobe-introspection-save

Conversation

@jovial

@jovial jovial commented Apr 30, 2020

Copy link
Copy Markdown
Collaborator

The m2-gen tool has been split in two:

  • The saving of the introspection data has been moved to another tool: m2-collect.
  • m2-extract processes the data

Other changes:

  • The structure of the output from m2-collect has been modified to be consistent withkayobe overcloud introspection save`.
  • The extra_hardware data is now extracted from the data field in the introspection data. It is no longer collected separately from swift.

Comment thread README.rst
m2-gen --limit 4 -vv
m2-collect --limit 4 -vv

To extract the the introspection data and process it ready for cardiff input:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/the the/the/

Comment thread README.rst

m2-extract introspection-data/*.json

This will have created the directores: ``extra-hardware``, ``extra-hardware-json``

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

directories

Comment thread README.rst
Dependencies
============

Requires the python `hardware <https://pypi.org/project/hardware/>`_

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that's purely for running hardware-cardiff, we should point out that it is only included up to version 0.24.0 of the hardware package.

Comment thread mungetout/extract.py
Comment on lines +87 to +89
os.mkdir("extra-hardware")
os.mkdir("extra-hardware-filtered")
os.mkdir("extra-hardware-json")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep going if these already exist. Currently we fail with:

FileExistsError: [Errno 17] File exists: 'extra-hardware'

Comment thread mungetout/extract.py
with open(path, 'r') as f:
introspection_data = json.load(f)

extra_data = introspection_data["data"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gracefully skip here, maybe with a warning, if the data key doesn't exist. This happens if the extra-hardware collector wasn't enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants