Uploaded image for project: 'Puppet Server'
  1. Puppet Server
  2. SERVER-1744

Missing metrics server-id in config (on upgrade) causes service failure

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: SERVER 5.0.0
    • Component/s: Puppet Server
    • Labels:
      None
    • Environment:

      puppetserver-2.7.2.master-0.1SNAPSHOT.2017.03.05T1104.el7.noarch

    • Release Notes:
      Not Needed
    • QA Risk Assessment:
      Needs Assessment

      Description

      When the metrics server-id is missing from puppetserver.conf, the Puppet Server service now fails to start:

      2017-03-06 04:26:59,528 INFO  [async-dispatch-2] [p.t.s.w.jetty9-service] Initializing web server(s).
      2017-03-06 04:26:59,576 INFO  [async-dispatch-2] [p.s.j.jruby-puppet-service] Initializing the JRuby service
      2017-03-06 04:26:59,602 INFO  [async-dispatch-2] [p.s.j.jruby-pool-manager-service] Initializing the JRuby service
      2017-03-06 04:26:59,644 ERROR [async-dispatch-2] [p.t.internal] Error during service init!!!
      clojure.lang.ExceptionInfo: Input to init-metrics does not match schema: [(named (not (instance? java.lang.String nil)) hostname) nil nil nil]
              at puppetlabs.services.jruby.jruby_metrics_core$eval39039$init_metrics__39044.invoke(jruby_metrics_core.clj:267)
              at puppetlabs.services.jruby.jruby_metrics_service$reify__39178$service_fnk__5255__auto___positional$reify__39193.init(jruby_metrics_service.clj:30)
              at puppetlabs.trapperkeeper.services$eval5057$fn__5058$G__5045__5061.invoke(services.clj:8)
              at puppetlabs.trapperkeeper.services$eval5057$fn__5058$G__5044__5065.invoke(services.clj:8)
              at puppetlabs.trapperkeeper.internal$eval13825$run_lifecycle_fn_BANG___13832$fn__13833.invoke(internal.clj:204)
              at puppetlabs.trapperkeeper.internal$eval13825$run_lifecycle_fn_BANG___13832.invoke(internal.clj:187)
              at puppetlabs.trapperkeeper.internal$eval13854$run_lifecycle_fns__13859$fn__13860.invoke(internal.clj:238)
              at puppetlabs.trapperkeeper.internal$eval13854$run_lifecycle_fns__13859.invoke(internal.clj:215)
              at puppetlabs.trapperkeeper.internal$eval14324$build_app_STAR___14333$fn$reify__14343.init(internal.clj:588)
              at puppetlabs.trapperkeeper.internal$eval14370$boot_services_for_app_STAR__STAR___14377$fn__14378$fn__14380.invoke(internal.clj:616)
              at puppetlabs.trapperkeeper.internal$eval14370$boot_services_for_app_STAR__STAR___14377$fn__14378.invoke(internal.clj:615)
              at puppetlabs.trapperkeeper.internal$eval14370$boot_services_for_app_STAR__STAR___14377.invoke(internal.clj:609)
              at clojure.core$partial$fn__4761.invoke(core.clj:2521)
              at puppetlabs.trapperkeeper.internal$eval13893$initialize_lifecycle_worker__13904$fn__13905$fn__13991$state_machine__11865__auto____13992$fn__13994.invoke(internal.clj:255)
              at puppetlabs.trapperkeeper.internal$eval13893$initialize_lifecycle_worker__13904$fn__13905$fn__13991$state_machine__11865__auto____13992.invoke(internal.clj:255)
              at clojure.core.async.impl.ioc_macros$run_state_machine.invokeStatic(ioc_macros.clj:1012)
              at clojure.core.async.impl.ioc_macros$run_state_machine.invoke(ioc_macros.clj:1011)
              at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invokeStatic(ioc_macros.clj:1016)
              at clojure.core.async.impl.ioc_macros$run_state_machine_wrapped.invoke(ioc_macros.clj:1014)
              at clojure.core.async$ioc_alts_BANG_$fn__12033.invoke(async.clj:383)
              at clojure.core.async$do_alts$fn__11979$fn__11982.invoke(async.clj:252)
              at clojure.core.async.impl.channels.ManyToManyChannel$fn__6789$fn__6790.invoke(channels.clj:95)
              at clojure.lang.AFn.run(AFn.java:22)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

      This is a problem when upgrading from the current Puppet Server 2.7.2 to the nightly/snapshot version (and hence future release) and using the existing configuration file. Ideally the existing config should work gracefully with a sensible default for the server-id (localhost, to match the example config).

      Adding this section to the running config from the example config file does fix the service startup:

      metrics: {
          server-id: "localhost"
      }
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  jeremy.barlow Jeremy Barlow
                  Reporter:
                  domcleal Dominic Cleal
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: