Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global_defs.pp depends on a not found Exec #40

Closed
PhilJung opened this issue Jul 4, 2014 · 7 comments
Closed

Global_defs.pp depends on a not found Exec #40

PhilJung opened this issue Jul 4, 2014 · 7 comments

Comments

@PhilJung
Copy link

PhilJung commented Jul 4, 2014

Hi,
I have a problem using global_defs. I receive message
err: Failed to apply catalog: Could not find dependent Exec[concat_/keepalived.conf] for File[/var/lib/puppetSystem/concat/_keepalived.conf/fragments/010_keepalived.conf_globaldefs] at /var/lib/puppet/default/modules/concat/manifests/fragment.pp:122

Configuration comes from an external node classifier. Parts regarding my keepalived service are (generic resources are dynamically created):

classes:
..keepalived: {service_manage: false}
..keepalived::global_defs:
....notification_email: [blah@blh.fr, blah2@blah.fr]`
....smtp_connect_timeout: '18'
....smtp_server: localhost
..generic:
....resources:
......keepalived::vrrp::instance:
........VIP_HAPROXY: {interface: bond0.778, priority: '2', state: MASTER, virtual_ipaddress: 192.168.78.60, virtual_router_id: '78'}
......keepalived::vrrp::sync_group:
........VIP_SVC_NUAGE:
..........ensure: present
..........group: [VIP_HAPROXY]

Changing in global_defs.pp
target => "${keepalived::config_dir}/keepalived.conf",
to
target => "/etc/keepalived/keepalived.conf",
fixed my problem.

Do I miss something when calling global_defs ? Is it because we dynamically create resources ?
Philippe

@arioch
Copy link
Contributor

arioch commented Jul 4, 2014

Could you try the following to see if it's a problem resolving the correct namespace?

target => "${::keepalived::config_dir}/keepalived.conf",
instead of
target => "${keepalived::config_dir}/keepalived.conf",

Changing it to ${::keepalived::config_dir} would force it to start looking at top level.

@PhilJung
Copy link
Author

PhilJung commented Jul 4, 2014

Still the same error:
err: Failed to apply catalog: Could not find dependent Exec[concat_/keepalived.conf] for File[/var/lib/puppetSystem/concat/_keepalived.conf/fragments/010_keepalived.conf_globaldefs] at /var/lib/puppet/default/modules/concat/manifests/fragment.pp:122

@PhilJung
Copy link
Author

PhilJung commented Jul 4, 2014

Don't know if it helps but adding
) inherits keepalived::params {
to global_defs and using it
target => "${::keepalived::params::config_dir}/keepalived.conf"
works

@arioch
Copy link
Contributor

arioch commented Jul 4, 2014

Ah! Must have slipped my mind.
6d25c46 should fix the problem then...

@PhilJung
Copy link
Author

PhilJung commented Jul 4, 2014

Nop, does not work. In my target I was using keepalived::params::config and not keepalived::config. This is probably not your intention as it looks you allow this value to be overridden in keepalived constructor.

@arioch
Copy link
Contributor

arioch commented Jul 4, 2014

Ugh. My bad.
I've rebased the fix to have a single commit (7a0e1c7) containing the fix.
Be sure to git pull --rebase.

@PhilJung
Copy link
Author

PhilJung commented Jul 4, 2014

OK works for me now.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants