Giter Site home page Giter Site logo

Comments (5)

ripienaar avatar ripienaar commented on June 15, 2024

It's covered just above and below https://github.com/ripienaar/mcollective-choria/wiki#dns-srv-records - I do not parse puppet.conf - probably could though.

Most typically you're going to go simple 1 node so default behaviour as puppet or have to configure a multi node cluster where SRV records are better alternatively manual config as at the bottom of the wiki.

I'll keep this one around to see about parsing puppet.conf agent section

from mcollective-choria.

MikaelSmith avatar MikaelSmith commented on June 15, 2024

Ah, I only skimmed that section and don't scroll to the bottom. A link to the specific section for manual config would be nice.

from mcollective-choria.

MikaelSmith avatar MikaelSmith commented on June 15, 2024

I'm fine with manual config otherwise, there's no reason to tie gnatsd to your puppet master.

from mcollective-choria.

ripienaar avatar ripienaar commented on June 15, 2024

This came up on the users list so I thought I'd have a closer look:

The problem is the performance of doing this:

require "benchmark"

Benchmark.bm(10) do |bm|
  bm.report(:require) { require "puppet" }

  bm.report(:config) do
    unless Puppet.settings.app_defaults_initialized?
      Puppet.settings.preferred_run_mode = :agent

      Puppet.settings.initialize_global_settings([])
      Puppet.settings.initialize_app_defaults(Puppet::Settings.app_defaults_for_run_mode(Puppet.run_mode))
    end
  end

  bm.report(:get) { Puppet.settings[:ssldir] }
end
                 user     system      total        real
require      0.930000   0.070000   1.000000 (  1.017435)
config       0.010000   0.000000   0.010000 (  0.005174)
get          0.000000   0.000000   0.000000 (  0.000036)

So just doing require puppet takes a second, its a noticeable and very annoying slow down on the CLI.

So I'd do this:

  • make it configurable with choria.ssldir that understands ~ path expansion
  • talk to puppet when run as root only - ie. the daemon

I think this strikes a good balance - the daemon loads up puppet anyway for the puppet agent so no wasted effort/time there really

I realise this ticket is about puppet and not about SSL but the same problem exist, I'm definitely not introducing a 1 second slow down to find the puppet master. For the servername though I could just parse the config myself I suppose, such a hack though so I'll rather support a more robust setup - SRV records to maintain the Just Works - which is compatible with Puppet - or manual config.

from mcollective-choria.

ripienaar avatar ripienaar commented on June 15, 2024

Closing this one, while I wont solve the puppet thing just yet for reasons stated above there is now code to handle puppet settings and its used for ssl dir location when not root

from mcollective-choria.

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.