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

Avoid running sensu enterprise service in opensource installation #660

Merged

Conversation

devcfgc
Copy link
Contributor

@devcfgc devcfgc commented Jun 13, 2017

Not sure why this PR #409 was rolled-back in this commit 932324c but as the first PR reported I'm getting:

Error: /Stage[main]/Sensu::Enterprise::Service/Service[sensu-enterprise]: Could not evaluate: Could not find init script or upstart conf file for 'sensu-enterprise'
Notice: /Stage[main]/Sensu::Enterprise::Dashboard/Anchor[sensu::enterprise::dashboard::begin]: Dependency Service[sensu-enterprise] has failures: true
Warning: /Stage[main]/Sensu::Enterprise::Dashboard/Anchor[sensu::enterprise::dashboard::begin]: Skipping because of failed dependencies
Notice: /Stage[main]/Sensu::Enterprise::Dashboard::Config/File[/etc/sensu/dashboard.json]: Dependency Service[sensu-enterprise] has failures: true
Warning: /Stage[main]/Sensu::Enterprise::Dashboard::Config/File[/etc/sensu/dashboard.json]: Skipping because of failed dependencies
Notice: /Stage[main]/Sensu::Enterprise::Dashboard::Config/Sensu_enterprise_dashboard_config[ubuntu1.vagrant.local]: Dependency Service[sensu-enterprise] has failures: true
Warning: /Stage[main]/Sensu::Enterprise::Dashboard::Config/Sensu_enterprise_dashboard_config[ubuntu1.vagrant.local]: Skipping because of failed dependencies
Notice: /Stage[main]/Sensu::Enterprise::Dashboard::Service/Service[sensu-enterprise-dashboard]: Dependency Service[sensu-enterprise] has failures: true
Warning: /Stage[main]/Sensu::Enterprise::Dashboard::Service/Service[sensu-enterprise-dashboard]: Skipping because of failed dependencies
Notice: /Stage[main]/Sensu::Enterprise::Dashboard/Anchor[sensu::enterprise::dashboard::end]: Dependency Service[sensu-enterprise] has failures: true
Warning: /Stage[main]/Sensu::Enterprise::Dashboard/Anchor[sensu::enterprise::dashboard::end]: Skipping because of failed dependencies
Notice: /Stage[main]/Sensu/Anchor[sensu::end]: Dependency Service[sensu-enterprise] has failures: true
Warning: /Stage[main]/Sensu/Anchor[sensu::end]: Skipping because of failed dependencies

@devcfgc devcfgc changed the title Avoid running sensu enterprise service in opensource installation [WIP] Avoid running sensu enterprise service in opensource installation Jun 13, 2017
@devcfgc
Copy link
Contributor Author

devcfgc commented Jun 13, 2017

I'm working on fixing the failed tests 😀

@devcfgc devcfgc changed the title [WIP] Avoid running sensu enterprise service in opensource installation Avoid running sensu enterprise service in opensource installation Jun 13, 2017
@devcfgc
Copy link
Contributor Author

devcfgc commented Jun 13, 2017

There were test failing before my PR:

Finished in 33.67 seconds (files took 1.19 seconds to load)
362 examples, 7 failures

Failed examples:

rspec ./spec/classes/sensu_enterprise_spec.rb:128 # sensu on Debian when enterprise => true should contain Apt::Source[sensu-enterprise] with release => "sensu-enterprise"
rspec ./spec/classes/sensu_package_spec.rb:93 # sensu package repos ubuntu with puppet-apt installed default should contain Apt::Source[sensu] with ensure => "present", location => "http://repositories.sensuapp.org/apt", release => "trusty", repos => "main", include => {"src"=>false}, key => {"id"=>"EE15CFF6AB6E4E290FDAB681A20F259AEB9C94BB", "source"=>"http://repositories.sensuapp.org/apt/pubkey.gpg"} and before => "Package[sensu]"
rspec ./spec/classes/sensu_package_spec.rb:116 # sensu package repos ubuntu with puppet-apt installed unstable repo should contain Apt::Source[sensu] with repos => "unstable"
rspec ./spec/classes/sensu_package_spec.rb:121 # sensu package repos ubuntu with puppet-apt installed override repo url should contain Apt::Source[sensu] with location => "http://repo.mydomain.com/apt"
rspec ./spec/classes/sensu_package_spec.rb:123 # sensu package repos ubuntu with puppet-apt installed override repo url should not contain Apt::Key[sensu] with key => {"id"=>"EE15CFF6AB6E4E290FDAB681A20F259AEB9C94BB", "source"=>"http://repo.mydomain.com/apt/pubkey.gpg"}
rspec ./spec/classes/sensu_package_spec.rb:131 # sensu package repos ubuntu with puppet-apt installed override key ID and key source should not contain Apt::Key[sensu] with key => {"id"=>"FFFFFFFF", "source"=>"http://repo.mydomain.com/apt/pubkey.gpg"}
rspec ./spec/classes/sensu_package_spec.rb:158 # sensu package repos debian repo release should contain Apt::Source[sensu] with ensure => "present", location => "http://repositories.sensuapp.org/apt", release => "jessie", repos => "main", include => {"src"=>false}, key => {"id"=>"EE15CFF6AB6E4E290FDAB681A20F259AEB9C94BB", "source"=>"http://repositories.sensuapp.org/apt/pubkey.gpg"} and before => "Package[sensu]"

@dzeleski
Copy link
Contributor

409 was rolled back due to it breaking the ability to use manage_service = false for enterprise users.

Your changes are inline with that I was thinking to fix #662

Let me know if you need assistance on this.

@devcfgc
Copy link
Contributor Author

devcfgc commented Jun 14, 2017

@dzeleski It'd be lovely to have the build of this repository fixed travis-ci url
There are some test failing related to sensu package repos ubuntu
Thank you for your help 👍

@dzeleski
Copy link
Contributor

@devcfgc I've reached out to Sensu and included @cwjohnston on this. It appears the apt module from puppet was updated a few weeks ago adding a new required fact which is causing the spec test to fail. We are still looking into it but I assume one of us will send a PR to your branch to resolve it.

@dzeleski
Copy link
Contributor

@devcfgc do me a favor. https://github.com/devcfgc/sensu-puppet/blob/9913cf998fea3e18d9412cb83f0efb9677281d0e/spec/classes/sensu_enterprise_spec.rb#L121

Make that line look like this:

let(:facts) { { :osfamily => 'Debian', :lsbdistid => 'ubuntu', :lsbdistrelease => '14.04', :lsbdistcodename => 'trusty', :os => {'name' => 'Debian'}, }

Push that up and see if this entry goes away: https://travis-ci.org/sensu/sensu-puppet/jobs/242385983#L2169

If that works we can correct the others.

@devcfgc
Copy link
Contributor Author

devcfgc commented Jun 14, 2017

@dzeleski there wasn't any luck :'( , after adding this line:
let(:facts) { { :osfamily => 'Debian', :lsbdistid => 'ubuntu', :lsbdistrelease => '14.04', :lsbdistcodename => 'trusty', :os => {'name' => 'debian'}, } }
I'm still getting:
rspec ./spec/classes/sensu_enterprise_spec.rb:128 # sensu on Debian when enterprise => true should contain Apt::Source[sensu-enterprise] with release => "sensu-enterprise"
Let me know if you need me to do some other test 👍

@cwjohnston
Copy link
Contributor

@devcfgc I have fixed the apt related failures in #663. Will you please rebase your branch on current master and see where that gets us?

@devcfgc devcfgc force-pushed the avoid_running_enterprise_service_in_opensource branch from 9913cf9 to 367c2ab Compare June 14, 2017 21:12
@devcfgc
Copy link
Contributor Author

devcfgc commented Jun 14, 2017

nice!! good job, now all the test are green 👍
@cwjohnston @dzeleski Thank you guys for your help.

@dzeleski
Copy link
Contributor

Yep no problem. Apologies on re introducing that issue.

@cwjohnston let me know if we want to test this stuff on the enterprise side before merging I can pull it into our lab and test.

@jaxxstorm jaxxstorm merged commit 8d566d1 into sensu:master Jun 15, 2017
@devcfgc devcfgc deleted the avoid_running_enterprise_service_in_opensource branch June 15, 2017 09:09
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

Successfully merging this pull request may close these issues.

4 participants