Giter Site home page Giter Site logo

Comments (5)

skx avatar skx commented on June 29, 2024

At the moment this is hard-wired to 24 hour, looking at the code. If we're going to change it I imagine it should default to the history rotation period (i.e. 7 days).

But this just reinforces my belief that we have too many options! Because right now any orphan-period would want to go under puppet-summary serve, but the pruning of days belongs under puppet-summary prune - i.e. This should be a global option, not a command-specific one.

I'd suggest:

  • Change the default to be seven days.
  • Add "puppet-summary prune -orphaned"
    • Which kinda matches puppet-summary prune -unchanged"

Does that seem reasonable?

I'll revisit all the options in the near future and probably add a global configuration file:

  • puppet-summary -config=path/to/file $command

At that point almost 100% of the existing flags will be removed.

from puppet-summary.

mgeorge avatar mgeorge commented on June 29, 2024

I'm not convinced that the orphan time and the prune time should be the same (or even related). If this is the case then wouldn't that mean that there would rarely be orphans since they would get pruned at pretty much the same time that they were declared orphan? Maybe I am misunderstanding.

To me an orphan is a node that is likely not reporting due to some kind of failure with either the puppet agent itself, or the hardware. I want to know about that since these nodes need attention. That is the reason I made the request, since after a weekend most of my nodes are declared as orphans, so the orphan list is not useful for identifying the nodes that may be failing.

from puppet-summary.

skx avatar skx commented on June 29, 2024

If this is the case then wouldn't that mean that there would rarely be orphans since they would get pruned at pretty much the same time that they were declared orphan? Maybe I am misunderstanding.

No you're right. I've made a mistake here.

I guess any single value is liable to annoy somebody, but I'll set it to 3.5 days for the moment while I think. That should cover Friday->Monday.

I really don't want to add any more flags, though I can see that if the orphaned nodes exist for a long time then pruning them is going to be wanted (which is why I added prune -orphaned.)

from puppet-summary.

mgeorge avatar mgeorge commented on June 29, 2024

3.5 days works for me. Thanks for this.

I guess any single value is liable to annoy somebody

Which is why we have flags. ;-)

Wouldn't the existing pruning eventually deal with cleaning stale (decommissioned) orphans anyway?

from puppet-summary.

skx avatar skx commented on June 29, 2024

Which is why we have flags. ;-)

True, but we can have too many and they can go in the wrong place!

i.e. The orphans are viewed in the UI, so the obvious place to put the flag is in p-s serve -orphan-days=4, but actually the "normal" vs. "orphan" is a property of the database record. And the database-stuff is global. So it should be a global flag, and that means that the p-s metrics output would be able to use the same setting.

But a global flag seems like overkill. We have too many flags as-is, and this is just the most recent example of one where you'd kinda like to put it in once place, but it belongs elsewhere.

The sanest thing I think I could do is use a configuration-file, but that's a big change too. So I'll wait.

Wouldn't the existing pruning eventually deal with cleaning stale (decommissioned) orphans anyway?

Yes.

I can just see that if you have to look at them for N-days you might think "That host has been decomissioned, we should be able to remove it".

from puppet-summary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.