On Oct 30, 2:42 am, Galed Friedmann <
galed.friedm...@onavo.com> wrote:
> I didn't know there was such a difference between exporting the ensure and
> setting it when collecting, I thought it was supposed to be the same thing
As I seem to be saying frequently of late, the effect on the client
should be the same if the catalog compiles, but the effect on catalog
compilation is not necessarily the same. Also, it's cleaner design-
wise to collect resources without overriding their properties.
Overriding has legitimate uses, but you should prefer to export the
full target state of a resource when you can do so.
> ...
>
> Anyways, I fixed this but I still see the error happening from time to
> time, got a few of those this morning:
> Oct 30 07:34:16 ubuntu puppet-master[10501]: Exported resource Host[proxy4]
> cannot override local resource on node lb2
> Oct 30 07:34:16 ubuntu puppet-master[10501]: Exported resource Host[proxy4]
> cannot override local resource on node lb2
> Oct 30 07:34:17 ubuntu puppet-master[10337]: Exported resource Host[proxy4]
> cannot override local resource on node lb5
> Oct 30 07:34:17 ubuntu puppet-master[10337]: Exported resource Host[proxy4]
> cannot override local resource on node lb5
> Oct 30 07:34:19 ubuntu puppet-master[10337]: Exported resource Host[proxy4]
> cannot override local resource on node lb3back
>
> This is the new manifest:
> proxy* servers:
> @@host { "$hostname":
> comment => "$hostname",
> ip => "$ec2_local_ipv4",
> name => "stable_host$proxy_id",
> tag => "production-proxy",
> ensure => present,
> }
>
> lb* servers:
> Host <<| tag == "production-proxy" |>> {
> }
>
> Host <<| tag =="backup-proxy" |>> {
> }
If you're not performing any actual overrides then you should remove
the empty braces, too. It seems unlikely that that would solve the
problem, but not completely out of the question. I'd remove for
clarity, though, if for no other reason.
> Still no idea why this is happening. I have some hosts that sometime change
> their IP address and I have to sync this with the other servers. Is it
> possible that the cause is that there is already a host record in the
> /etc/hosts file that has another IP address in it? (Although I'd assume
> puppet should just change it and not take it as a local resource...)
It is conceivable that Puppet gets confused if in /etc/hosts it finds
separate records, one having the same host name as the collected
resource but a different address, and the other having the same IP
address but a different name. I agree, however, that that *shouldn't*
be a problem, and I would be surprised if it were. You should be able
to test that case.
Do you have hosts with duplicate hostnames (perhaps in different
domains)? Are any of the affected hosts flipping between being
primary and backup proxies, or have they done since you turned on
storeconfigs? If you clear out your storeconfig database do the
problems continue and/or come back later?
John