insights-core
insights-core copied to clipboard
WIP: Fix processing of SerializedArchiveContext
All Pull Requests:
Check all that apply:
- [X] Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
- [X] Is this PR to correct an issue?
- [ ] Is this PR an enhancement?
Complete Description of Additions/Changes:
- When core collection archives are hydrated the broker is prepopulated with all data defined in the ./meta_data subdir. Since the specs are already loaded there is no need to collect them again from the archive. The only datasources that need to be collected are those not defined in the ./meta_data subdir, and those are in the / dir, not /data.
- This change removes datasources from the graph where specs are already hydrated in the broker before running.
- Fix #3158
Signed-off-by: Bob Fahr [email protected]
I have tested the behavior and it seems that it is correct.
@bfahr and @ryan-blakley, Hi, I did a bit of modification based on Bob's patch, now the Exceptions from core-collected archive look like:
Traceback (most recent call last):
File "/home/liuxc/work/insights/insights-core/insights/core/plugins.py", line 98, in invoke
return self.component(broker)
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 615, in __call__
return self.kind(ctx.locate_path(self.path), root=ctx.root, ds=self, ctx=ctx)
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 141, in __init__
self.validate()
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 191, in validate
super(MetadataProvider, self).validate()
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 149, in validate
raise ContentException("%s does not exist." % self.path)
insights.core.exceptions.ContentException: /tmp/insights/soscleaner-core_1/tags.json does not exist.
Traceback (most recent call last):
File "/home/liuxc/work/insights/insights-core/insights/core/plugins.py", line 98, in invoke
return self.component(broker)
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 615, in __call__
return self.kind(ctx.locate_path(self.path), root=ctx.root, ds=self, ctx=ctx)
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 141, in __init__
self.validate()
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 149, in validate
raise ContentException("%s does not exist." % self.path)
insights.core.exceptions.ContentException: /tmp/insights/soscleaner-core_1/data/var/lib/pacemaker/cib/cib.xml does not exist
And Exceptions from legacy collection look like:
Traceback (most recent call last):
File "/home/liuxc/work/insights/insights-core/insights/core/plugins.py", line 98, in invoke
return self.component(broker)
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 615, in __call__
return self.kind(ctx.locate_path(self.path), root=ctx.root, ds=self, ctx=ctx)
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 141, in __init__
self.validate()
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 191, in validate
super(MetadataProvider, self).validate()
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 149, in validate
raise ContentException("%s does not exist." % self.path)
insights.core.exceptions.ContentException: /tmp/insights/soscleaner-legacy_1/tags.json does not exist.
Traceback (most recent call last):
File "/home/liuxc/work/insights/insights-core/insights/core/plugins.py", line 98, in invoke
return self.component(broker)
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 615, in __call__
return self.kind(ctx.locate_path(self.path), root=ctx.root, ds=self, ctx=ctx)
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 141, in __init__
self.validate()
File "/home/liuxc/work/insights/insights-core/insights/core/spec_factory.py", line 149, in validate
raise ContentException("%s does not exist." % self.path)
insights.core.exceptions.ContentException: /tmp/insights/soscleaner-legacy_1/var/lib/pacemaker/cib/cib.xml does not exist.
Please kindly review.
test me
test me
test me