choria-plugins / shell-agent

Choria Plugin for running arbitrary shell commands
Apache License 2.0
1 stars 2 forks source link

module fails to run #3

Closed vchepkov closed 6 years ago

vchepkov commented 6 years ago
$ mco shell run ls

error 2018/03/06 02:10:33: pluginmanager.rb:171:in `rescue in loadclass' Failed to load MCollective::Application::Shell: cannot load such file -- mcollective/application/shell/watcher
Application 'shell' failed to load:

   cannot load such file -- mcollective/application/shell/watcher (LoadError)

       /opt/puppetlabs/puppet/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
vchepkov commented 6 years ago

I copied this from slack, I had the same issue in the past

ripienaar commented 6 years ago

Thanks, will fix this on the new round of release!

ripienaar commented 6 years ago

@vchepkov I pushed version 1.0.1 which will hopefully improve the situation - I dont use this agent so would appreciate testing

vchepkov commented 6 years ago

I did, something amiss

Error: Cannot create /opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell; parent directory /opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent does not exist
Error: /Stage[main]/Mcollective_agent_shell/Mcollective::Module_plugin[mcollective_agent_shell]/File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell]/ensure: change from 'absent' to 'directory' failed: Cannot create /opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell; parent directory /opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent does not exist
Error: /Stage[main]/Mcollective_agent_shell/Mcollective::Module_plugin[mcollective_agent_shell]/File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell.ddl]: Could not evaluate: Could not retrieve information from environment shell source(s) puppet:///modules/mcollective_agent_shell/mcollective/lib/mcollective/agent/shell.ddl
Error: /Stage[main]/Mcollective_agent_shell/Mcollective::Module_plugin[mcollective_agent_shell]/File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell.rb]: Could not evaluate: Could not retrieve information from environment shell source(s) puppet:///modules/mcollective_agent_shell/mcollective/lib/mcollective/agent/shell.rb
Notice: /Stage[main]/Mcollective_agent_shell/Mcollective::Module_plugin[mcollective_agent_shell]/File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell/job.rb]: Dependency File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell] has failures: true
Warning: /Stage[main]/Mcollective_agent_shell/Mcollective::Module_plugin[mcollective_agent_shell]/File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell/job.rb]: Skipping because of failed dependencies
Error: /Stage[main]/Mcollective_agent_shell/Mcollective::Module_plugin[mcollective_agent_shell]/File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/application/shell.rb]: Could not evaluate: Could not retrieve information from environment shell source(s) puppet:///modules/mcollective_agent_shell/mcollective/lib/mcollective/application/shell.rb
Notice: /Stage[main]/Mcollective::Service/Service[mcollective]: Dependency File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell] has failures: true
Notice: /Stage[main]/Mcollective::Service/Service[mcollective]: Dependency File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell.ddl] has failures: true
Notice: /Stage[main]/Mcollective::Service/Service[mcollective]: Dependency File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell.rb] has failures: true
Notice: /Stage[main]/Mcollective::Service/Service[mcollective]: Dependency File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/application/shell.rb] has failures: true
Warning: /Stage[main]/Mcollective::Service/Service[mcollective]: Skipping because of failed dependencies
Notice: /Stage[main]/Mcollective::Facts/Exec[mcollective_facts_yaml_refresh]: Dependency File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell] has failures: true
Notice: /Stage[main]/Mcollective::Facts/Exec[mcollective_facts_yaml_refresh]: Dependency File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell.ddl] has failures: true
Notice: /Stage[main]/Mcollective::Facts/Exec[mcollective_facts_yaml_refresh]: Dependency File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/agent/shell.rb] has failures: true
Notice: /Stage[main]/Mcollective::Facts/Exec[mcollective_facts_yaml_refresh]: Dependency File[/opt/puppetlabs/mcollective/plugins/mcollective/lib/mcollective/application/shell.rb] has failures: true
Warning: /Stage[main]/Mcollective::Facts/Exec[mcollective_facts_yaml_refresh]: Skipping because of failed dependencies
vchepkov commented 6 years ago

Version 1.0.2 works

[vagrant@master ~]$  mco shell run date

 * [ ============================================================> ] 2 / 2

master.localdomain:
Wed Mar  7 11:19:47 UTC 2018

node.localdomain:
Wed Mar  7 11:19:47 UTC 2018

Finished processing 2 / 2 hosts in 165.89 ms

Thanks a lot

ripienaar commented 6 years ago

👍