(PDB-221) Add facts to import/export #875

Merged
merged 2 commits into from Mar 4, 2014

Conversation

Projects
None yet
3 participants
@senior
Contributor

senior commented Feb 28, 2014

This commit imports/exports facts similar to how we currently import/export catalogs and reports. Anonymize doesn't currently work for facts, which is going to be added separately.

Ryan Senior
(PDB-221) Add facts to import/export
This commit imports/exports facts similar to how we currently import/export
catalogs and reports. Anonymize doesn't currently work for facts, which is
going to be added separately.
@pljenkinsro

This comment has been minimized.

Show comment
Hide comment
@pljenkinsro

pljenkinsro Feb 28, 2014

💚 Test passed.
Refer to this link for build results: https://jenkins.puppetlabs.com/job/PuppetDB%20Acceptance%20-%20Pull%20Requests/272/

@kbarber

This comment has been minimized.

Show comment
Hide comment
@kbarber

kbarber Mar 2, 2014

Contributor

@senior this all seems pretty good.

Although through manual testing I've picked up 1 gotcha with our current solution.

(cli.export/get-active-node-names) will only return nodes that have recent catalogs. However, some users only use PuppetDB to store facts. So in my case, I had thrown a whole bunch of facts at the system but none of these nodes show exports.

We never saw this for reports, because most people who have report storage also have catalog storage.

I've tried removing the filter but it looks like then we just don't handle the later 404's gracefully. The end solution might be getting 3 lists one for each data object, or either skipping over missing data (and just swallowing the 404's?). Either way, I think this needs solving.

Contributor

kbarber commented Mar 2, 2014

@senior this all seems pretty good.

Although through manual testing I've picked up 1 gotcha with our current solution.

(cli.export/get-active-node-names) will only return nodes that have recent catalogs. However, some users only use PuppetDB to store facts. So in my case, I had thrown a whole bunch of facts at the system but none of these nodes show exports.

We never saw this for reports, because most people who have report storage also have catalog storage.

I've tried removing the filter but it looks like then we just don't handle the later 404's gracefully. The end solution might be getting 3 lists one for each data object, or either skipping over missing data (and just swallowing the 404's?). Either way, I think this needs solving.

@pljenkinsro

This comment has been minimized.

Show comment
Hide comment
@pljenkinsro

pljenkinsro Mar 4, 2014

🔴 Test failed.
Refer to this link for build results: https://jenkins.puppetlabs.com/job/PuppetDB%20Acceptance%20-%20Pull%20Requests/274/

🔴 Test failed.
Refer to this link for build results: https://jenkins.puppetlabs.com/job/PuppetDB%20Acceptance%20-%20Pull%20Requests/274/

+ ;; version of a command is. We should improve that.
+ {:replace-catalog catalog-version
+ :store-report 2
+ :facts 1}})})

This comment has been minimized.

@kbarber

kbarber Mar 4, 2014

Contributor

:replace-facts

@kbarber

kbarber Mar 4, 2014

Contributor

:replace-facts

@pljenkinsro

This comment has been minimized.

Show comment
Hide comment
@pljenkinsro

pljenkinsro Mar 4, 2014

🔴 Test failed.
Refer to this link for build results: https://jenkins.puppetlabs.com/job/PuppetDB%20Acceptance%20-%20Pull%20Requests/275/

🔴 Test failed.
Refer to this link for build results: https://jenkins.puppetlabs.com/job/PuppetDB%20Acceptance%20-%20Pull%20Requests/275/

Ryan Senior
Added support for exporting facts/reports when
no catalog has been persisted for the given node
@pljenkinsro

This comment has been minimized.

Show comment
Hide comment
@pljenkinsro

pljenkinsro Mar 4, 2014

💚 Test passed.
Refer to this link for build results: https://jenkins.puppetlabs.com/job/PuppetDB%20Acceptance%20-%20Pull%20Requests/276/

💚 Test passed.
Refer to this link for build results: https://jenkins.puppetlabs.com/job/PuppetDB%20Acceptance%20-%20Pull%20Requests/276/

kbarber added a commit that referenced this pull request Mar 4, 2014

Merge pull request #875 from senior/ticket/master/pdb-221
(PDB-221) Add facts to import/export

@kbarber kbarber merged commit f0fc29d into puppetlabs:master Mar 4, 2014

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment