datastax / diagnostic-collection

Diagnostic Collector for Apache Cassandra
Apache License 2.0
28 stars 35 forks source link

Keeping artifacts if runOnSingleNode=true #156

Open mieslep opened 1 year ago

michaelsembwever commented 1 year ago

what's the rationale here?

runOnSingleNode only disables the lookup step, so only the specified hosts on the command line are collected. it otherwise works the same as if you specify hosts via collector.conf

a bastion is still required, and still is responsible for pulling the artefact, and then deleting the artefact…

mieslep commented 1 year ago

Rationale: collector was run in "discovery" mode, and ran correctly on all but one node. Files were not uploaded. It was then re-run on that single node (successfully) but all previous collector files were removed...

michaelsembwever commented 1 year ago

It was then re-run on that single node (successfully) but all previous collector files were removed...

As is and would be expected. The presumption would be that runOnSingleNode is being used for the first run of the collector.

This scenario does present a challenge though. When switching to runOnSingleNode on a subsequent run, or any scenario where multiple runs are required to collect all artefacts, there needs to be a way to avoid first wiping $baseDir

I'm wondering if keepArtifact can be reused here, or whether an introduction of a new flag --continue is warranted.