simp config is removing existing hosts from /etc/hosts

Description

This was discovered when working on debugging acceptance tests for SIMP-6343.

While trying to debug the rsyslog tests, it was noted that the /etc/hosts file was dropping the client systems on the puppet server at some point.

Debugging, it turned out to be in the `should run simp config` test which executes `on(master, "simp config -a /root/simp_config.yaml #extra_args")`.

Before -> From: spec/acceptance/shared_examples/simp_server_bootstrap.rb @ line 105

After -> From: spec/acceptance/shared_examples/simp_server_bootstrap.rb @ line 108 :

Acceptance Criteria

None

Activity

Show:
Liz Nemsick
July 12, 2019, 7:50 PM
Edited

https://github.com/simp/rubygem-simp-cli/blob/master/lib/simp/cli/config/items/action/add_puppet_hosts_entry_action.rb#L37-L38 are the source of the problem.

Per this should be changed to remove lines with 'localhost', 'localhost.*', 'localhost6', and 'localhost6.*' instead.

Trevor Vaughan
January 20, 2020, 5:40 PM

I seem to remember you working on this. Was it completed?

Labels

Epic Link

None

Story Points

None

Components

Assignee

Liz Nemsick

Priority

Medium
Configure