cristifalcas / puppet-etcd

etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines.
https://coreos.com/etcd/
Apache License 2.0
9 stars 39 forks source link

Failed to create etcd config file #31

Open ngoduykhanh opened 6 years ago

ngoduykhanh commented 6 years ago

Hi,

I am using the latest version of this module and faced problem with creating the etcd config on Ubuntu 16.04 LTS.

Detail error: Error: Could not set 'file' on ensure: No such file or directory @ dir_s_rmdir - /etc/etcd/etcd.yml20180307-6798-1fd3cyp.lock at 15:/etc/puppet/environments/production/modules/etcd/manifests/config.pp Error: Could not set 'file' on ensure: No such file or directory @ dir_s_rmdir - /etc/etcd/etcd.yml20180307-6798-1fd3cyp.lock at 15:/etc/puppet/environments/production/modules/etcd/manifests/config.pp Wrapped exception: No such file or directory @ dir_s_rmdir - /etc/etcd/etcd.yml20180307-6798-1fd3cyp.lock Error: /Stage[main]/Etcd::Config/File[/etc/etcd/etcd.yml]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory @ dir_s_rmdir - /etc/etcd/etcd.yml20180307-6798-1fd3cyp.lock at 15:/etc/puppet/environments/production/modules/etcd/manifests/config.pp Notice: /Stage[main]/Etcd::Service/Service[etcd]: Dependency File[/etc/etcd/etcd.yml] has failures: true Warning: /Stage[main]/Etcd::Service/Service[etcd]: Skipping because of failed dependencies

If i manually create the folder mkdir /etc/etcd then puppet can run without issue.

This line shows config_yaml_path is being hardcode while /etc/etcd directory isn't created by default.

Is this a bug or we have to make sure /etc/etcd exist before applying the config?