Issue #17798 has been updated by eric sorenson.

Status changed from Unreviewed to Needs More Information
Assignee set to Steffen Zieger

Looking at the output, the first one is an array and the second is a quoted 
string, so the comparison is not matching.

<pre>
/Stage[main]/Ssh::Hostkeys/Sshkey[db7.domain.tld_rsa]/host_aliases: 
host_aliases changed ['db7.domain.tld', 'db7', '1.2.3.4', 
'2001:0db8:85a3::8a2e:0370:7334'] to 'db7.domain.tld db7 1.2.3.4 
2001:0db8:85a3::8a2e:0370:7334'
</pre>

Are you doing a to_s or join somewhere after the `insync?` that is causing this?

I’ve put this ticket’s status into “Needs more Information” and assigned it to 
you. Please either (a) update it with the information I’ve requested and 
re-assign it to me if you need more help, or (b) change the status to “Closed” 
if you were able to resolve the issue on your own.


----------------------------------------
Bug #17798: sshkey changed on every run when using a custom function, except 
there is no change
https://projects.puppetlabs.com/issues/17798#change-89048

* Author: Steffen Zieger
* Status: Needs More Information
* Priority: Normal
* Assignee: Steffen Zieger
* Category: 
* Target version: 
* Affected Puppet version: 
* Keywords: 
* Branch: 
----------------------------------------
Everything is working, as long as I'm not using my custom function to collect 
all ipaddresses (IPv4 and IPv6) in an array.

The manifest used to collect the keys: 
[[https://github.com/saz/puppet-ssh/blob/master/manifests/hostkeys.pp]]
The manifest used to realize the keys: 
[[https://github.com/saz/puppet-ssh/blob/master/manifests/knownhosts.pp]]

*Puppet agent run with `host_aliases = [ $::fqdn, $::hostname, $::ipaddress ]` 
(ssh_known_hosts entry already exists)*

    root@db7:~# puppet agent -t
    Info: Retrieving plugin
    Info: Caching catalog for db7.domain.tld
    Info: Applying configuration version '1353689020'
    Finished catalog run in 6.63 seconds

`$ipaddresses = ipaddresses()` # Custom function from 
[[https://github.com/saz/puppet-ssh/blob/master/lib/puppet/parser/functions/ipaddresses.rb]]

Puppet agent run with `host_aliases = [ $::fqdn, $::hostname, $ipaddresses ]`

    root@db7:~# puppet agent -t
    Info: Retrieving plugin
    Info: Caching catalog for db7.domain.tld
    Info: Applying configuration version '1353689093'
    /Stage[main]/Ssh::Hostkeys/Sshkey[db7.domain.tld_rsa]/host_aliases: 
host_aliases changed ['db7.domain.tld', 'db7', '1.2.3.4'] to 'db7.domain.tld 
db7 1.2.3.4 2001:0db8:85a3::8a2e:0370:7334'
    Info: FileBucket adding {md5}8f0bcbf289ef43240021c9fab4af4a6a
    /Stage[main]/Ssh::Hostkeys/Sshkey[db7.domain.tld_dsa]/host_aliases: 
host_aliases changed ['db7.domain.tld', 'db7', '1.2.3.4'] to 'db7.domain.tld 
db7 1.2.3.4 2001:0db8:85a3::8a2e:0370:7334'
    Finished catalog run in 7.08 seconds

As expected, host_aliases changes, as IPv6 address has been added.

Next Puppet agent run with same settings as before:

    root@db7:~# puppet agent -t
    Info: Retrieving plugin
    Info: Caching catalog for db7.domain.tld
    Info: Applying configuration version '1353689093'
    /Stage[main]/Ssh::Hostkeys/Sshkey[db7.domain.tld_rsa]/host_aliases: 
host_aliases changed ['db7.domain.tld', 'db7', '1.2.3.4', 
'2001:0db8:85a3::8a2e:0370:7334'] to 'db7.domain.tld db7 1.2.3.4 
2001:0db8:85a3::8a2e:0370:7334'
    Info: FileBucket adding {md5}474fa7e20bcc0d9bb9f5e17823d433ce
    /Stage[main]/Ssh::Hostkeys/Sshkey[db7.domain.tld_dsa]/host_aliases: 
host_aliases changed ['db7.domain.tld', 'db7', '1.2.3.4', 
'2001:0db8:85a3::8a2e:0370:7334'] to 'db7.domain.tld db7 1.2.3.4 
2001:0db8:85a3::8a2e:0370:7334'
    Finished catalog run in 7.25 seconds
    root@db7:~#

host_aliases changed again, but I can't see why.
 
Generated ssh_known_hosts entries:

    
db7.domain.tld_rsa,db7.domain.tld,db7,1.2.3.4,2001:0db8:85a3::8a2e:0370:7334 
ssh-rsa [..key..]
    
db7.domain.tld_dsa,db7.domain.tld,db7,1.2.3.4,2001:0db8:85a3::8a2e:0370:7334 
ssh-dss [..key..]


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to