{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/673","repository_url":"https://api.github.com/repos/elastic/puppet-elasticsearch","labels_url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/673/labels{/name}","comments_url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/673/comments","events_url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/673/events","html_url":"https://github.com/elastic/puppet-elasticsearch/issues/673","id":169043785,"number":673,"title":"Module 0.13.0 not supported with Puppet 3.4.3","user":{"login":"mattyindustries","id":1063470,"avatar_url":"https://avatars.githubusercontent.com/u/1063470?v=3","gravatar_id":"","url":"https://api.github.com/users/mattyindustries","html_url":"https://github.com/mattyindustries","followers_url":"https://api.github.com/users/mattyindustries/followers","following_url":"https://api.github.com/users/mattyindustries/following{/other_user}","gists_url":"https://api.github.com/users/mattyindustries/gists{/gist_id}","starred_url":"https://api.github.com/users/mattyindustries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattyindustries/subscriptions","organizations_url":"https://api.github.com/users/mattyindustries/orgs","repos_url":"https://api.github.com/users/mattyindustries/repos","events_url":"https://api.github.com/users/mattyindustries/events{/privacy}","received_events_url":"https://api.github.com/users/mattyindustries/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-03T04:11:42Z","updated_at":"2016-08-03T15:35:14Z","closed_at":null,"body":"* Module version: 0.13.0\r\n* Puppet version: 3.4.3\r\n* OS and version: RHEL 6\r\n\r\n## Bug description\r\n\r\nI've recently updated the Puppet Forge module for elasticsearch to 0.13.0.\r\n\r\nIf I run my elasticsearch node against this version I get the Puppet error:\r\n\r\nError: Failed to apply catalog: undefined method `environment_instance' for #<Puppet::Resource::Catalog:0x7fea5163e618>\r\n\r\nSearching through the module code I found that environment_instance is used here:/lib/puppet/type/elasticsearch_template.rb\r\n\r\n````\r\n158     # If a source was passed, retrieve the source content from Puppet's\r\n159     # FileServing indirection and set the content property\r\n160     if !self[:source].nil?\r\n161       unless Puppet::FileServing::Metadata.indirection.find(self[:source])\r\n162         fail \"Could not retrieve source %s\" % self[:source]\r\n163       end\r\n164\r\n165       unless self.catalog.nil?\r\n166         tmp = Puppet::FileServing::Content.indirection.find(\r\n167           self[:source],\r\n168           :environment => self.catalog.environment_instance\r\n169         )\r\n170       else\r\n171         tmp = Puppet::FileServing::Content.indirection.find(self[:source])\r\n172       end\r\n173\r\n174       fail \"Could not find any content at %s\" % self[:source] unless tmp\r\n175       self[:content] = PSON::load(tmp.content)\r\n176     end\r\n```\r\n\r\nThat call to self.catalog.environment_instance is looking for the Puppet library 'puppet/resource/catalog.rb' which when I look at the version installed with Puppet 3.4.3 it does not support this variable.\r\n\r\nLooking through the history of Puppet code it appears that this variable is introduced in Puppet 3.6.0.\r\nhttps://docs.omniref.com/ruby/gems/puppet/3.6.0/files/lib/puppet/resource/catalog.rb\r\n\r\n```\r\n52\t  # The actual environment instance that was used during compilation\r\n53      attr_accessor :environment_instance\r\n```\r\n\r\nI don't think you need to fix this issue to work with older versions of Puppet but probably just update the supported versions of Puppet in your documentation so that the minimum version of Puppet is 3.6.0.\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/comments/237274525","html_url":"https://github.com/elastic/puppet-elasticsearch/issues/673#issuecomment-237274525","issue_url":"https://api.github.com/repos/elastic/puppet-elasticsearch/issues/673","id":237274525,"user":{"login":"tylerjl","id":1733846,"avatar_url":"https://avatars.githubusercontent.com/u/1733846?v=3","gravatar_id":"","url":"https://api.github.com/users/tylerjl","html_url":"https://github.com/tylerjl","followers_url":"https://api.github.com/users/tylerjl/followers","following_url":"https://api.github.com/users/tylerjl/following{/other_user}","gists_url":"https://api.github.com/users/tylerjl/gists{/gist_id}","starred_url":"https://api.github.com/users/tylerjl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylerjl/subscriptions","organizations_url":"https://api.github.com/users/tylerjl/orgs","repos_url":"https://api.github.com/users/tylerjl/repos","events_url":"https://api.github.com/users/tylerjl/events{/privacy}","received_events_url":"https://api.github.com/users/tylerjl/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T15:35:14Z","updated_at":"2016-08-03T15:35:14Z","body":"Thanks for looking into this - if there's an easy workaround to keep supporting older versions I'll drop that in; otherwise, agreed that updating the min supported version looks like the right way to go. 👍 "}}
{"actor":{"display_login":"tylerjl"}}