The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #1358

Unable to replace host "X" with host "Y" and alias "X"

Added by Marcin Owsiany over 6 years ago. Updated over 3 years ago.

Status:AcceptedStart date:06/11/2008
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:RAL
Target version:-
Affected Puppet version:0.24.4 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

An excerpt from http://groups.google.com/group/puppet-users/browse_thread/thread/8ed1b795b8b46661

Right after a host called “foo” is built, just before the first puppet run, the /etc/hosts file contains the following entry:

1.2.3.4 foo

However, in order to match the information that is in DNS, I want the line to look like this:

1.2.3.4 somedomain.com foo.colo.domain foo

Let’s try to keep aside the discussion of whether that is actually a sane thing to do, I’m still just experimenting. Let’s focus on what may be necessary to make puppet replace the existing line with what I want there to be. I added something like this to the manifest:

        host { foo: ensure => absent }
        host { "somedomain.com":
                ip => "1.2.3.4",
                alias => [ "foo.colo.domain", "foo" ]
        }

However, surprisingly (or maybe not), what I get is just an early failure:

Host[somedomain.com] is already being managed

This is because of the dual purpose of “alias” param/metaparam.

I think this may be related to #1221

History

#1 Updated by AJ Christensen over 6 years ago

  • Category set to language
  • Status changed from Unreviewed to Needs More Information
  • Assignee set to Luke Kanies

I can verify this behaviour; Luke, could you please clarify if you’d like this accepted (and thus eventually fixed, perhaps renaming the alias parameter to the host{} type.. so we can keep the alias metaparameter functional for this type, while still providing the ability to manage multiple ‘aliases’ per host{}?

#2 Updated by Luke Kanies over 6 years ago

  • Category changed from language to RAL
  • Status changed from Needs More Information to Accepted
  • Target version set to 4

Because we consider aliases to be equivalent to names, in terms of causing naming collisions, it seems that the parser should correctly match these hosts.

It’s probably a good bit of work, though.

#3 Updated by Luke Kanies over 4 years ago

  • Assignee deleted (Luke Kanies)

#4 Updated by James Turnbull over 3 years ago

  • Target version deleted (4)

Also available in: Atom PDF