Bug #3081
Unable to specify absence of host host_aliases
| Status: | Closed | Start date: | 01/17/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | host | |||
| Target version: | - | |||
| Affected Puppet version: | Branch: | |||
| Keywords: | ||||
| Votes: | 0 |
Description
I doesn’t seem possible to remove and alias from the hosts file
given /etc/hosts 1.1.1.1 buildsun4u notwanted
host { "hosts buildsun4u" :
ip => "1.1.1.1",
name => "buildsun4u",
ensure => present,
host_aliases => absent,
}
changes to 1.1.1.1 buildsun4u absent
host { "hosts buildsun4u" :
ip => "1.1.1.1",
name => "buildsun4u",
ensure => present,
host_aliases => "",
}
changes to “1.1.1.1 buildsun4u ” this is repeated on every run so /etc/hosts is constantly updated Jan 16 18:29:29 buildsun4u puppetd[6572]: [ID 702911 daemon.notice] (//base::default/Host[hosts buildsun4u]/host_aliases) host_aliases changed ‘absent’ to ‘’
History
Updated by James Turnbull about 2 years ago
- Category set to host
- Status changed from Unreviewed to Accepted
- Assignee set to Markus Roberts
- Target version set to 0.25.4
There is no “absent” value for host_aliases – that will just change the alias to “absent”. And undef doesn’t seem to work. So def. a bug.
Over to Markus.
Updated by Markus Roberts about 2 years ago
- Target version changed from 0.25.4 to 0.25.5
The problem is the inconsistent treatment of the trailing delimiter being generated between the name and the (empty) alias list. It should either not be generated in the case of “host_aliases => []” or host aliases should consider the disparate ways of writing “no host aliases” as being in sync.
This same behavior can be seen as far back as 0.24.8, and involves code (the parsed file provider) that’s already being considered for refactoring. Therefore it doesn’t belong in an emergency bug fix release.
Updated by James Turnbull almost 2 years ago
- Target version changed from 0.25.5 to 49
Updated by James Turnbull about 1 year ago
- Target version deleted (
49)
Updated by Stefan Schulte 8 months ago
- Affected Puppet version deleted (
0.25.4rc1)
I guess the issue has already been fixed in puppet 2.6.0 with commit:8b127b1851
Updated by Joshua Lifton about 1 month ago
- Assignee deleted (
Markus Roberts)
This issue was assigned to a former Puppet Labs employee. Adding back to the pool of unreviewed issues.
Updated by Joshua Lifton about 1 month ago
This issue was assigned to a former Puppet Labs employee. Adding back to the pool of unreviewed issues.
Updated by Ben Hughes 22 days ago
- Description updated (diff)
- Status changed from Accepted to Unreviewed
Updated by Michael Stahnke 21 days ago
- Description updated (diff)
- Status changed from Unreviewed to Closed
If you use ‘[ ]’ rather than “” the host alias is removed properly. This was validated on 2.7.9.