Jira (PUP-9495) Implement `print` method for `server_list_settings`

2 views
Skip to first unread message

Melissa Stone (JIRA)

unread,
Feb 12, 2019, 6:44:03 PM2/12/19
to puppe...@googlegroups.com
Melissa Stone created an issue
 
Puppet / Task PUP-9495
Implement `print` method for `server_list_settings`
Issue Type: Task Task
Assignee: Unassigned
Created: 2019/02/12 3:43 PM
Priority: Normal Normal
Reporter: Melissa Stone

Right now, when you run `puppet config print server_list`, you get a gross looking array. This should print what you see in `puppet.conf`, a comma separated list of servers. Not the strange ruby array we get now

[1] Melissa@bubba:/Users/Melissa/puppet:(5.5.x)$ be ./bin/puppet config set server_list server_list_1,server_list_2
[0] Melissa@bubba:/Users/Melissa/puppet:(5.5.x)$ be ./bin/puppet config print server_list
[["server_list_1"], ["server_list_2"]]
[0] Melissa@bubba:/Users/Melissa/puppet:(5.5.x)$ cat ~/.puppetlabs/etc/puppet/puppet.conf
[main]
server = server1
server_list = server_list_1,server_list_2

It looks like this is a more general problem for settings that derive from `:array`.

All of this is from Josh Cooper's comment:
https://github.com/puppetlabs/puppet/pull/7384#issuecomment-462976534

to quote him,

I'd expect the `ArraySetting` to implement `print` to join using comma:

def print(value)
  vals = super(value)
  vals.join(',')
end

And for `ServerListSetting` to override it so that each host and optional port are first joined with ':', and then that result is comma-joined:

def print(value)
  vals = munge(value)
  super(vals.map { |v| v.join(':') })
end

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Melissa Stone (JIRA)

unread,
Feb 12, 2019, 6:46:03 PM2/12/19
to puppe...@googlegroups.com

Melissa Stone (JIRA)

unread,
Feb 12, 2019, 6:46:04 PM2/12/19
to puppe...@googlegroups.com
Melissa Stone updated an issue
Change By: Melissa Stone
Sprint: Coremunity Hopper

Melissa Stone (JIRA)

unread,
Feb 12, 2019, 6:46:04 PM2/12/19
to puppe...@googlegroups.com
Melissa Stone updated an issue
Change By: Melissa Stone
Fix Version/s: PUP 5.5.z

Jorie Tappa (JIRA)

unread,
Feb 20, 2019, 12:29:04 PM2/20/19
to puppe...@googlegroups.com

Jorie Tappa (JIRA)

unread,
Feb 20, 2019, 12:30:05 PM2/20/19
to puppe...@googlegroups.com
Jorie Tappa updated an issue
Change By: Jorie Tappa
Sprint: Coremunity Hopper Platform Core KANBAN

Josh Cooper (JIRA)

unread,
Feb 21, 2019, 12:17:03 PM2/21/19
to puppe...@googlegroups.com
Josh Cooper commented on Task PUP-9495
 
Re: Implement `print` method for `server_list_settings`

Also please make sure the error message when exhausting the server_list uses the print method, so we get a comma separated list instead of nested arrays:

$ bundle exec puppet agent -td --server_list neptune,jupiter --server mars
...
Error: Could not run Puppet configuration client: Could not select a functional puppet master from server_list: neptune:8140, jupiter:8140

Kris Bosland (JIRA)

unread,
May 14, 2019, 4:55:03 PM5/14/19
to puppe...@googlegroups.com

Jorie Tappa (JIRA)

unread,
May 15, 2019, 10:14:04 AM5/15/19
to puppe...@googlegroups.com
Jorie Tappa updated an issue
Change By: Jorie Tappa
Release Notes Summary: Previously, if you wanted to view your `server_list` in `config print`, Puppet would output it in a human-unfriendly nested Array that was hard to read. Now it will output the text in the same format it's entered in puppet.conf. It will also output it this way when Puppet errors from being unable to connect to any server in `server_list`.
Release Notes: Enhancement

Josh Cooper (JIRA)

unread,
Jun 6, 2019, 12:55:03 AM6/6/19
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jun 6, 2019, 12:55:05 AM6/6/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Fix Version/s: PUP 5.5.z
Fix Version/s: PUP 6.5.0
Fix Version/s: PUP 6.0.10
Fix Version/s: PUP 5.5.15

Heston Hoffman (JIRA)

unread,
Jun 13, 2019, 2:25:03 PM6/13/19
to puppe...@googlegroups.com
Heston Hoffman updated an issue
Change By: Heston Hoffman
Labels: resolved-issue-added

Gheorghe Popescu (JIRA)

unread,
Jul 12, 2019, 4:44:03 AM7/12/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages