Ask Your Question
0

how to change the masterport in a pe monolithic installation

asked 2018-08-22 12:36:38 -0600

mmoossen gravatar image

Hi there,

till now i have been using puppet-enterprise 3.8.6 and i am finally allowed to upgrade to the latest version (2018.1.3) in puppet 3.8.6 i was able to change the masterport by

  1. setting the puppet_enterprise::puppet_master_port parameter,
  2. execute puppet agent (which fails),
  3. stopping all puppet services,
  4. by hand looking for config files under /etc/puppetlabs and /opt/puppetlabs still containing 8140, and replace that value by the new port value in all places,
  5. restarting all puppet services and
  6. executing puppet agent once more

which is not nice nor easy nor fast, but it worked.

when i try to do that with the latest version i get on step 6 that there are still some few places where the value is reverted and the agent fails, in special:

puppet:~ # find /etc/puppetlabs/ -name "*.conf" -o -name "*.yaml" | xargs grep 8140
/etc/puppetlabs/console-services/conf.d/console.conf:          "url": "https://puppet:8140"
/etc/puppetlabs/client-tools/services.conf:        "port": 8140,
/etc/puppetlabs/client-tools/services.conf:        "status_url": "https://puppet:8140/status",
/etc/puppetlabs/client-tools/services.conf:        "url": "https://puppet:8140/"

and i figured out that those files are managed by the classes trapperkeeper/console_services.pp and cli_config.pp, respectively, and there the wrong port value comes from a "service_port" parameter, which i do not understand from which hiera value is read, but it does not default to the puppet_enterprise::puppet_master_port parameter.

Any hint how to get the service_port parameter set to a new value? Or, is not there a better way to change the master port?

many thanks

Michael

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-08-23 08:00:58 -0600

mmoossen gravatar image

i now understand that the parameter service_port a local variable is, as well as the status_port, that are read from class_parameters in an iteration.

and the relevant parameter is set a few lines above as Puppet_enterprise::Profile::Master::ssl_listen_port which defaults to puppet_enterprise::puppet_master_port. so i still do not understand why it does not work.

at the end i managed to run the puppet agent, shortly redirecting traffic from old port to the new one, with:

socat tcp-listen:8140,reuseaddr,fork tcp:localhost:<newport>
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-08-22 12:34:41 -0600

Seen: 51 times

Last updated: Aug 23