Jira (PUP-3502) Puppet provider fails on first run if features are delivered during run (Windows)

1 view
Skip to first unread message

Josh Cooper (JIRA)

unread,
Jan 6, 2015, 2:55:24 AM1/6/15
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-3502
 
Re: Puppet provider fails on first run if features are delivered during run (Windows)

Damien Buckley can you point us to your custom type & provider and sample manifest, because you should be able to confine a provider on windows in the same way you do on Linux.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a)
Atlassian logo

Josh Cooper (JIRA)

unread,
Jan 6, 2015, 2:55:30 AM1/6/15
to puppe...@googlegroups.com

Damien Buckley (JIRA)

unread,
Jan 6, 2015, 6:11:22 AM1/6/15
to puppe...@googlegroups.com

Damien Buckley (JIRA)

unread,
Jan 6, 2015, 6:12:23 AM1/6/15
to puppe...@googlegroups.com
Damien Buckley commented on Bug PUP-3502
 
Re: Puppet provider fails on first run if features are delivered during run (Windows)

Hi Josh,

Please find a the attached zip file which contains the custom type & provider and sample manifest.

Thanks,
Damien,

Damien Buckley (JIRA)

unread,
Jan 6, 2015, 6:13:24 AM1/6/15
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jan 27, 2015, 12:09:03 AM1/27/15
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-3502
 
Re: Puppet provider fails on first run if features are delivered during run (Windows)

Thanks Damien, at first glance I see a few different problems:

[ 'puppet_x/puppetlabs/transport' ].each do |path|
  begin
    require path
  rescue LoadError => detail
    require 'pathname'
    vmware_module = Puppet::Module.find('vmware_lib', Puppet[:environment].to_s)
    require File.join vmware_module.path, "lib/#{path}"
  end
end

This appears to be working around a long standing issue in puppet, where helper code cannot be loaded by type/providers, see http://projects.puppetlabs.com/issues/4248. Most module authors use File.expand_path with an absolute path relative to the current file (_FILE_).

Josh Cooper (JIRA)

unread,
Jan 27, 2015, 12:41:50 AM1/27/15
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-3502

Damien Buckley I'm going to reassign the ticket to you as Needs Information. Please try the suggestions I made, especially the last one about run_mode. If you can reproduce the issue on windows, can you run puppet agent --test --debug --trace both times, and attach the output to this ticket?

Josh Cooper (JIRA)

unread,
Jan 27, 2015, 12:42:51 AM1/27/15
to puppe...@googlegroups.com

Damien Buckley (JIRA)

unread,
Jan 28, 2015, 7:45:40 AM1/28/15
to puppe...@googlegroups.com
Damien Buckley updated an issue
Change By: Damien Buckley
Attachment: second_run.log
Attachment: first_run.log

Damien Buckley (JIRA)

unread,
Jan 28, 2015, 9:43:39 AM1/28/15
to puppe...@googlegroups.com
Damien Buckley commented on Bug PUP-3502
 
Re: Puppet provider fails on first run if features are delivered during run (Windows)

Hi Josh,

I have tried the above suggestions but the agent still fails on the first run for a windows agent.

I have attached the output of the first run (unsuccessful) and the second run (successful) to the ticket. You will see fom the output of the first run that puppet fails to load the 'rest_client' library contained in the 'restclient' feature. This feature is contained in the vmwarelib module.

I get the same error if I attempt to load the 'rest_client' library from the vcac_appliance feature contained in my provider.

Damien Buckley (JIRA)

unread,
Jan 28, 2015, 9:44:38 AM1/28/15
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
May 15, 2017, 1:45:02 PM5/15/17
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Agent
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Sean McDonald (JIRA)

unread,
May 15, 2017, 1:45:04 PM5/15/17
to puppe...@googlegroups.com

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:49:32 PM5/18/17
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Jun 8, 2018, 2:14:02 PM6/8/18
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-3502
 
Re: Puppet provider fails on first run if features are delivered during run (Windows)

I recently discovered that the agent does not use the correct environment when loading features to determine provider suitability: https://github.com/puppetlabs/puppet/pull/6867/files#diff-f6dce0fbcf55caef42fe28d46c33e340R51. I'm wondering if this is related to the issue you're seeing? I'm not sure why the behavior would be different on Windows vs Unix though.

This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (Jira)

unread,
Nov 11, 2020, 2:35:03 AM11/11/20
to puppe...@googlegroups.com
Josh Cooper assigned an issue to Unassigned
 
Change By: Josh Cooper
Assignee: Josh Cooper
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages