Page MenuHomePhabricator

Unable to set parameters to types other than String in horizon puppet parameters
Closed, DuplicatePublic

Description

I'm trying to set profile::rsyslog::kafka_shipper::kafka_brokers to an Array for prefix puppet deployment-mediawiki- in deployment prep but it looks like I'm unable to:

  1. Apply class profile::rsyslog::kafka_shipper from https://horizon.wikimedia.org/project/prefixpuppet/?tab=prefix_puppet__puppet-deployment-mediawiki-
  2. Input ['deployment-logstash2.deployment-prep.eqiad.wmflabs:9093'] as the parameter value and apply
  3. The class shows as applied: profile::rsyslog::kafka_shipper logging_kafka_brokers: ['deployment-logstash2.deployment-prep.eqiad.wmflabs:9093']
  4. Puppet on the host fails with
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error whi
le evaluating a Resource Statement, Class[Profile::Rsyslog::Kafka_shipper]: parameter 'logging_kafka_brokers' expects an Array value, got String on node deployment-mediawiki-07.deployment-prep.eqiad.wmflabs

Event Timeline

Something else I tried which seems to work:

  1. With the class not applied yet, add this to prefix puppet "hiera config" at the bottom of the page
profile::rsyslog::kafka_shipper::kafka_brokers:
- deployment-logstash2.deployment-prep.eqiad.wmflabs:9093
  1. Apply class, leave parameters empty
  2. The parameter is removed from bottom "hiera config" textarea
  3. Class shows as applied: profile::rsyslog::kafka_shipper kafka_brokers: ['deployment-logstash2.deployment-prep.eqiad.wmflabs:9093']
  4. The class shows up in puppet's catalog:
{
  "type": "Class",
  "title": "Profile::Rsyslog::Kafka_shipper",
  "tags": [
    "class",
    "profile::rsyslog::kafka_shipper",
    "profile",
    "rsyslog",
    "kafka_shipper",
    "node",
    "default"
  ],
  "exported": false,
  "parameters": {
    "logging_kafka_brokers": [
      "deployment-logstash2.deployment-prep.eqiad.wmflabs:9093"
    ],
    "require": [
      "Class[Packages::Rsyslog_kafka]"
    ]
  }
},
Krenair renamed this task from Unable to set hiera variable to Array in prefix puppet to Unable to set parameters to types other than String in horizon puppet parameters.Apr 1 2019, 9:16 PM
Krenair added a subscriber: MSantos.

@MSantos tried to use use_nodejs10: true when applying profile::maps::apps but at some point it mysteriously becomes a String:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Profile::Maps::Apps]: parameter 'use_nodejs10' expects a Boolean value, got String on node deployment-maps04.deployment-prep.eqiad.wmflabs
I've seen this before somewhere so this may be a dupe.

Bstorm triaged this task as Medium priority.