Giter Club home page Giter Club logo

puppet-opendaylight's Introduction

puppet-opendaylight's People

Contributors

akshitajha avatar amar266 avatar davidblaisonneau-orange avatar dfarrell07 avatar fepan avatar gitter-badger avatar jluhrsen avatar mwhahaha avatar radez avatar semihalf-kardach-stanislaw avatar trozet avatar umeshksingla avatar vpramo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-opendaylight's Issues

Try Docker as Beaker provider

Most people seem to use Vagrant as the provider Beaker uses for standing up test VMs. I have that setup working well, but it's quite slow. Docker would allow caching of unchanged steps, dramatically speeding up the process.

This is a long-term TODO.

Update ODL class param docs

The docs for the ODL class's params, in init.pp, haven't been updated from the ODL mod skeleton defaults.

# === Parameters
# TODO: Update these param docs
# [*sample_parameter*]
#   Explanation of what this parameter affects and what it defaults to.

Need to update them, of course.

Convert strings of checks to hashes

These very hard to read strings of checks were done this way for Ruby 1.8.7 support. Since I've recently abandoned attempting to support 1.8.7 (#34), I should move back to the more elegant style.

  # Confirm properties of other resources
  # There's a more elegant way to do these long sets of checks
  #   using multi-line hashes, but it breaks in Ruby 1.8.7
  it { should contain_yumrepo('opendaylight').with_enabled('1').with_gpgcheck('0').with_descr('OpenDaylight SDN controller').with_baseurl(yum_repo) }
  it { should contain_package('opendaylight').with_ensure('present') }
  it { should contain_service('opendaylight').with_ensure('running').with_enable('true').with_hasstatus('true').with_hasrestart('true') }
  it { should contain_file('org.apache.karaf.features.cfg').with_ensure('file').with_path('/opt/opendaylight-0.2.2/etc/org.apache.karaf.features.cfg').with_content(/^featuresBoot=#{features.join(",")}/) }

Run Beaker against multiple types of VMs

Right now, bundle exec rake beaker runs our Beaker tests against the VM defined in default.cfg, but none of the other boxes defined in other *.cfg files. Two parts of this TODO:

  • Figure out how to run Beaker against a set of VMs back-to-back. Might be via --hosts flag?
  • Create rake tests to easily do that batch-test

Metadata lint warning

I'm seeing the following warning from metadata-json-lint:

metadata-json-lint metadata.json
Warning: Dependency puppetlabs-stdlib has an open ended dependency version requirement >= 1.0.0

It's clearly non-critical, but it'd be nice to get rid of it.

Beaker test coverage for ODL port param

Basically the same as #47, but for Beaker tests. The odl_rest_port param added in #35 needs Beaker test coverage. Ideally it would have been added in the PR, but there was a big rush to get it merged for OPNFV use.

Update README

The current README is mostly default info from the module skeleton. Needs to be updated with actual info.

Add Fedora 21 Beaker node

Fedora 21 is a critical OS to test against, just below CentOS 7. Unfortunately, the Chef folks haven't released a Vagrant base box for it yet. I raised an issue to get the process started, but I have a good bit of learning to do before I could do much to contribute to the creation effort. This TODO might take a while to complete.

A short-term, fairly undesirable fix is to use one of the very-unofficial Fedora 21 boxes on Vagrantcloud. I'm not thrilled about this for all the reasons, but it's better than not testing Fedora 21 at all.

`should contain` is being deprecated, avoid

According to these docs (grep for contain), contain is being deprecated in favor of its(:content) { should match /stuff/ }. Need to move to that syntax. For example, in class_spec.rb:

      it { should contain 'featuresBoot' }

Scope of features var in template

A downstream consumer of this Puppet mod reported issues with the scope of the @features var in the Karaf config template. Although he didn't have many details, his guess was that because he was consuming the ODL mod along with many others, the tests local to the ODL mod weren't picking up the issue. I added a ton of relevant Beaker tests in 082f0d6 to try to highlight the issue (because TDD), but was unable to do so. Reading the docs, I did find this potentially relevant. Using the scope.lookupvar('opendaylight::features').join(",") format doesn't break anything for the mod's rspec-puppet or Beaker tests, but I'm waiting on feedback from the other dev to know if it fixed the issue in their more complex environment.

Open required ports

OpenDaylight requires various ports to be open for it to function. Need to handling opening these in the Puppet module.

Need to both provide reasonable defaults and allow the user to override them via an ODL class param.

Configure ODL startup params

When OpenDaylight is started, various params are passed to the process (-XX:MaxPermSize=512m...). Need to be able to configure these, via params to the ODL class. This seems fairly difficult, as systemd is what's actually kicking off that process. Not really sure where the config should go.

Not-my-fault gem error

There's a somewhat complex gem naming/version error (described here, here and here) that I can't satisfactorily fix at the moment. For now, I've commented out the following line to get Travis CI passing, but it must be uncommitted for Beaker (which I only run locally, too much work for Travis).

In Rakefile:

# Necessary when running Beaker tests, but breaks Puppet <= 3.5
# https://github.com/maestrodev/puppet-blacksmith/issues/14
#require 'puppet/vendor/semantic/lib/semantic'

rspec-puppet test coverage for tarball-based installs

After #43 is done, need to add rspec tests for installs that use install_mode=tarball. Likely just going to accept default tarball_url and unitfile_url params, as it would be super hard and inelegant to have custom-built ODLs sitting around on servers for testing this module.

Start actually doing versioning

Everything's in place for proper semantic versioning, but I haven't really been doing it as the project has been super new and unstable. It's starting to stabilize, and people are starting to consume it, so I need to start doing versioning properly.

Install ODL from tar/zip

This is not a feature that's meant for general users to consume.

The devs doing OpenStack+OpenDaylight integration in the context of OPNFV need a way to install a custom built ODL from an archive, to test their changes/fixes.

Better test coverage

It'd be awesome to get to 100% coverage.

Total resources:   9
Touched resources: 6
Resource coverage: 66.67%
Untouched resources:

  Class[Opendaylight]
  File[/etc/profile.d/opendaylight.sh]
  Yumrepo[opendaylight]
metadata-json-lint metadata.json

Use or remove lib dir

The root-level lib/ directory was created by the module skeleton tool. I'm not currently using it, and I don't know what I could/should use it for. Need to learn more about it, and either use it or delete it.

Add RSpec tests that pass ODL config

The current RSpec tests pass no params to the ODL class, thereby using the default featuresBoot list. Need tests that pass non-standard features.

Ignore third-party resources in test coverage metrics

RSpec seems to have a really bad default behavior of including coverage stats for resources that are external to your module (and therefore you can't control). Hopefully there's a way to ignore them.

Finished in 7.22 seconds (files took 0.52142 seconds to load)
302 examples, 0 failures

Total resources:   35
Touched resources: 11
Resource coverage: 31.43%
Untouched resources:

  Archive::Download[opendaylight-0.2.2.tar.gz]
  Archive::Download[opendaylight-systemd.tar.gz]
  Archive::Extract[opendaylight-0.2.2]
  Archive::Extract[opendaylight-systemd]
  Class[Archive::Prerequisites]
  Class[Stdlib::Stages]
  Class[Stdlib]
  Exec[Unpack opendaylight-0.2.2]
  Exec[Unpack opendaylight-systemd]
  Exec[download archive opendaylight-0.2.2.tar.gz and check sum]
  Exec[download archive opendaylight-systemd.tar.gz and check sum]
  Exec[rm-on-error-opendaylight-0.2.2.tar.gz]
  Exec[rm-on-error-opendaylight-systemd.tar.gz]
  File_line[tomcatport]
  Package[curl]
  Package[tar]
  Package[unzip]
  Stage[deploy]
  Stage[deploy_app]
  Stage[deploy_infra]
  Stage[runtime]
  Stage[setup]
  Stage[setup_app]
  Stage[setup_infra]

Ruby 1.8.7 tests failing

Travis is showing a remarkably obtuse error for tests run with Ruby 1.8.7. I currently have no idea what it means. Because of #33, I'm not sure when it was introduced. sigh

$ bundle exec rake test
---> syntax:manifests
---> syntax:templates
---> syntax:hiera:yaml
Cloning into 'spec/fixtures/modules/stdlib'...
remote: Counting objects: 6183, done.
remote: Total 6183 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6183/6183), 1.23 MiB | 0 bytes/s, done.
Resolving deltas: 100% (2643/2643), done.
Checking connectivity... done.
/home/travis/.rvm/rubies/ruby-1.8.7-p374/bin/ruby -I/home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib:/home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-support-3.2.0/lib /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/exe/rspec --pattern spec/\{classes,defines,unit,functions,hosts,integration\}/\*\*/\*_spec.rb --color
Total resources:   0
Touched resources: 0
Resource coverage:  -nan%
Untouched resources:
/home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/hooks.rb:512:in `all_hooks_for': return from proc-closure (LocalJumpError)
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/hooks.rb:564:in `process'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/flat_map.rb:11:in `map'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/flat_map.rb:11:in `flat_map'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/hooks.rb:563:in `process'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/hooks.rb:429:in `register_globals'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/example_group.rb:394:in `set_it_up'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/example_group.rb:361:in `subclass'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/example_group.rb:253:in `describe'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/dsl.rb:43:in `__send__'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/dsl.rb:43:in `describe'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/dsl.rb:82:in `__send__'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/dsl.rb:82:in `describe'
    from /home/travis/build/dfarrell07/puppet-opendaylight/spec/classes/opendaylight_spec.rb:3
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:in `load'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:in `load_spec_files'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in `each'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:97:in `setup'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:85:in `run'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:70:in `run'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:38:in `invoke'
    from /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/exe/rspec:4
/home/travis/.rvm/rubies/ruby-1.8.7-p374/bin/ruby -I/home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/lib:/home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-support-3.2.0/lib /home/travis/.rvm/gems/ruby-1.8.7-p374/gems/rspec-core-3.2.0/exe/rspec --pattern spec/\{classes,defines,unit,functions,hosts,integration\}/\*\*/\*_spec.rb --color failed
The command "bundle exec rake test" exited with 1.
Done. Your build exited with 1.

Revisit `archive` mod consumed

Because everything's a bit rushed atm, I'm consuming a less-than-ideal Puppet mod that provides the ability to work with tarball archives.

Known gripes:

  • It doesn't have any test coverage.
  • It always installs the unzip package, even though I don't need it.
  • It's an unmerged fork of camptocamp/puppet-archive, which is more popular but doesn't support the strip_components feature of gini/puppet-archive/.

Will likely need to submit some PRs to make one of the mods better. I'd hate to leave ODL depending on Puppet mods that I'm less-than-confident in.

Update README with port param docs

#35 added the ability to configure which port ODL listens for NB REST calls on. Need to update the README to reflect that change (should have done it in PR, but w/e).

Tests reporting twice

Beaker test results seem to be outputting their results twice. I'm seeing this behavior both using the RS_SET=centos-7 bundle exec rake beaker format and the bundle exec rake centos format.

centos-7 executed in 0.04 seconds
      should be installed
      should be installed
    Service "opendaylight"
    Service "opendaylight"

centos-7 09:51:17$ /bin/sh -c systemctl\ --plain\ list-dependencies\ runlevel3.target\ \|\ grep\ \'\\\(\^\\\|\ \\\)opendaylight.service\$\'
opendaylight.service

centos-7 executed in 0.04 seconds
      should be enabled
      should be enabled

centos-7 09:51:17$ /bin/sh -c systemctl\ is-active\ opendaylight
active

centos-7 executed in 0.04 seconds
      should be running
      should be running
removing temporory ssh-config files per-vagrant box
Destroying vagrant boxes
==> centos-7: Forcing shutdown of VM...
==> centos-7: Destroying VM and associated drives...

Finished in 7 minutes 25 seconds (files took 3 minutes 46.4 seconds to load)
4 examples, 0 failures

Finished in 7 minutes 25 seconds (files took 3 minutes 46.4 seconds to load)
4 examples, 0 failures

Add param to configure log level

The folks consuming this mod in context of OpenDaylight+OpenStack need a way to set the verbosity of ODL's log output, for better debugging.

Separate ODL class features into defaults and extras

The current ODL class accepts a features param, which it uses to set default features to be installed. My beta user of the ODL Puppet mod ran into issues when they simply provided the additional features they wanted installed, overriding (and not getting) the default ones. One solution is to separate the two lists of features. The normal way to add features would be to pass them as extra_features, leaving default_features the same. It could be overridden, of course.

Install ODL via Copr repo

I'm currently using a Yum repo on a DigitalOcean box I stood up myself. That looks pretty sketch, since it's just an un-named IP you're installing software from. Should move to installing via the dfarrell07/OpenDaylight Copr repo I just configured.

Avoid auto-gen of spec/fixtures dir

The spec/fixtures directory as well as the manifests and modules subdirs are not checked into version control, but are repeatedly automatically generated by the tests. If they are not necessary, it'd be cleaner to avoid creating them at all.

Move to chef/fedora-21 Beaker node

I'm currently using a very un-official F21 Vagrant box for my F21 Beaker node. Eventually it'd be much better to move to an official-ish one, like chef/fedora-21. There are complicating factors, like the Chef box not being on Vagrantcloud yet. See details on #10.

Roll of tests/init.pp

I'm unclear on the intended roll for tests/init.pp. It was created by the module skeleton tool and I haven't touched it. I have what I believe to be great test coverage via rspec_puppet and Beaker, and I don't think either of those use this file. Either need to confirm it's needed or remove it.

Accept class params for ODL configuration

The ODL Puppet class should accept params that eventually result in configuration changes to ODL. This is a large TODO that will likely eventually be handled as smaller issues.

Home dir for odl user

The latest ODL RPM (version 5) has support for using user:group odl:odl. The creation of the user odl is done like this:

%pre
# Create `odl` user/group
# Short circuits if the user/group already exists
getent passwd odl > /dev/null || useradd odl -M
getent group odl > /dev/null || groupadd odl

The -M flag should prevent the creation of a home directory. However, the Beaker tests added in 2383679 suggest that a home directory is being created anyway:

Failures:

  1) opendaylight class default parameters User "odl" should not have home directory "/home/odl"
     Failure/Error: it { should_not have_home_directory '/home/odl' }
       expected #has_home_directory?("/home/odl") to return false, got true
       /bin/sh -c getent\ passwd\ odl\ \|\ cut\ -f\ 6\ -d\ \':\'\ \|\ grep\ -w\ --\ /home/odl
       /home/odl

     # ./spec/acceptance/class_spec.rb:40:in `block (4 levels) in <top (required)>'

Refactor rspec-puppet tests

The current rspec-puppet tests are pretty great, but the architecture isn't going to scale as I continue adding param combinations to test. They basically work like this at the moment:

# tests for param0=x
  # tests for param1=x'
    # punt tests to shared fn
  # tests for param1=y'
    # punt tests to shared fn
# tests for param0=y
  # tests for param1=x'
    # punt tests to shared fn
  # tests for param1=y'
    # punt tests to shared fn

If I add a third layer, like I need to do for #41, it would look like this:

# tests for param0=x
  # tests for param1=x'
    # tests for param2=x''
      # punt tests to shared fn
    # tests for param2=y''
      # punt tests to shared fn
  # tests for param1=y'
    # tests for param2=x''
      # punt tests to shared fn
    # tests for param2=y''
      # punt tests to shared fn
# tests for param0=y
  # tests for param1=x'
    # tests for param2=x''
      # punt tests to shared fn
    # tests for param2=y''
      # punt tests to shared fn
  # tests for param1=y'
    # tests for param2=x''
      # punt tests to shared fn
    # tests for param2=y''
      # punt tests to shared fn

Clearly this doesn't scale, although it provides awesome coverage (every param combo).

I think something like this would provide solid practical coverage, without covering every possible param combo:

# tests for param0=x
  # punt tests to fn specialized in testing for param0
# tests for param0=y
  # punt tests to fn specialized in testing for param0
# tests for param1=x'
  # punt tests to fn specialized in testing for param1
# tests for param1=y'
  # punt tests to fn specialized in testing for param1
<continue pattern>

Better acceptance test coverage

I currently only have a handful of Beaker acceptances tests (dfarrell07-opendaylight/spec/acceptance/class_spec.rb). Need to build them out.

Use or remove templates dir

The root-level templates/ directory was created by the module skeleton tool. I'm not currently using it, and I don't know what I could/should use it for. Need to learn more about it, and either use it or delete it.

Consider repo rename

It was pointed out by a community member that puppet-opendaylight might be a better name for this repo. I actually considered this in some detail when I was initially learning about Puppet, and intentionally picked <username>-<software>, but it's worth re-evaluating that decision given the greater experience of the person who suggested the change.

Fedora 20 Beaker tests failing

Both the Fedora 20 and Fedora 21 Baker tests are failing with similar (I think the same) errors. CentOS 7 is working fine.

Failures:

  1) opendaylight class default parameters should work idempotently with no errors
     Failure/Error: apply_manifest(pp, :catch_failures => true)
     Beaker::Host::CommandFailure:
       Host 'fedora-21' exited with 6 running:
        puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.l3JGDA
       Last 10 lines of output were:
        Info: Computing checksum on file /opt/opendaylight-0.2.2/etc/org.apache.karaf.features.cfg
        Info: /Stage[main]/Opendaylight::Config/File[org.apache.karaf.features.cfg]: Filebucketed /opt/opendaylight-0.2.2/etc/org.apache.karaf.features.cfg to puppet with sum ebe3dbe5595f28c3b32b35b59e1d36cc
        Notice: /Stage[main]/Opendaylight::Config/File[org.apache.karaf.features.cfg]/content: content changed '{md5}ebe3dbe5595f28c3b32b35b59e1d36cc' to '{md5}bf207ae2ade316ddc100da27488fa722'
        Info: Class[Opendaylight::Config]: Scheduling refresh of Class[Opendaylight::Service]
        Info: Class[Opendaylight::Service]: Scheduling refresh of Service[opendaylight]
        Error: Could not enable opendaylight: Execution of '/sbin/chkconfig --add opendaylight' returned 1: error reading information on service opendaylight: No such file or directory
        Error: /Stage[main]/Opendaylight::Service/Service[opendaylight]/ensure: change from stopped to running failed: Could not enable opendaylight: Execution of '/sbin/chkconfig --add opendaylight' returned 1: error reading information on service opendaylight: No such file or directory
        Notice: /Stage[main]/Opendaylight::Service/Service[opendaylight]: Triggered 'refresh' from 1 events
        Info: Creating state file /var/lib/puppet/state/state.yaml
        Notice: Finished catalog run in 111.68 seconds

     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/host.rb:285:in `exec'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:88:in `block in on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/shared/host_manager.rb:74:in `run_block_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/patterns.rb:32:in `block_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:78:in `on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:950:in `block in apply_manifest_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/shared/host_manager.rb:74:in `run_block_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/patterns.rb:32:in `block_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:879:in `apply_manifest_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:957:in `apply_manifest'
     # ./spec/acceptance/class_spec.rb:15:in `block (3 levels) in <top (required)>'

  2) opendaylight class default parameters Service "opendaylight" should be enabled
     Failure/Error: it { should be_enabled }
       expected Service "opendaylight" to be enabled
       /bin/sh -c systemctl\ --plain\ list-dependencies\ runlevel3.target\ \|\ grep\ \'\\\(\^\\\|\ \\\)opendaylight.service\$\'

     # ./spec/acceptance/class_spec.rb:46:in `block (4 levels) in <top (required)>'

  3) opendaylight class default parameters Service "opendaylight" should be enabled
     Failure/Error: it { should be_enabled.with_level(3) }
       expected Service "opendaylight" to be enabled
       /bin/sh -c systemctl\ --plain\ list-dependencies\ runlevel3.target\ \|\ grep\ \'\\\(\^\\\|\ \\\)opendaylight.service\$\'

     # ./spec/acceptance/class_spec.rb:47:in `block (4 levels) in <top (required)>'

Failures:

  1) opendaylight class default parameters should work idempotently with no errors
     Failure/Error: apply_manifest(pp, :catch_failures => true)
     Beaker::Host::CommandFailure:
       Host 'fedora-21' exited with 6 running:
        puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.l3JGDA
       Last 10 lines of output were:
        Info: Computing checksum on file /opt/opendaylight-0.2.2/etc/org.apache.karaf.features.cfg
        Info: /Stage[main]/Opendaylight::Config/File[org.apache.karaf.features.cfg]: Filebucketed /opt/opendaylight-0.2.2/etc/org.apache.karaf.features.cfg to puppet with sum ebe3dbe5595f28c3b32b35b59e1d36cc
        Notice: /Stage[main]/Opendaylight::Config/File[org.apache.karaf.features.cfg]/content: content changed '{md5}ebe3dbe5595f28c3b32b35b59e1d36cc' to '{md5}bf207ae2ade316ddc100da27488fa722'
        Info: Class[Opendaylight::Config]: Scheduling refresh of Class[Opendaylight::Service]
        Info: Class[Opendaylight::Service]: Scheduling refresh of Service[opendaylight]
        Error: Could not enable opendaylight: Execution of '/sbin/chkconfig --add opendaylight' returned 1: error reading information on service opendaylight: No such file or directory
        Error: /Stage[main]/Opendaylight::Service/Service[opendaylight]/ensure: change from stopped to running failed: Could not enable opendaylight: Execution of '/sbin/chkconfig --add opendaylight' returned 1: error reading information on service opendaylight: No such file or directory
        Notice: /Stage[main]/Opendaylight::Service/Service[opendaylight]: Triggered 'refresh' from 1 events
        Info: Creating state file /var/lib/puppet/state/state.yaml
        Notice: Finished catalog run in 111.68 seconds

     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/host.rb:285:in `exec'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:88:in `block in on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/shared/host_manager.rb:74:in `run_block_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/patterns.rb:32:in `block_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:78:in `on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:950:in `block in apply_manifest_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/shared/host_manager.rb:74:in `run_block_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/patterns.rb:32:in `block_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:879:in `apply_manifest_on'
     # /home/daniel/.gem/ruby/gems/beaker-2.2.0/lib/beaker/dsl/helpers.rb:957:in `apply_manifest'
     # ./spec/acceptance/class_spec.rb:15:in `block (3 levels) in <top (required)>'

  2) opendaylight class default parameters Service "opendaylight" should be enabled
     Failure/Error: it { should be_enabled }
       expected Service "opendaylight" to be enabled
       /bin/sh -c systemctl\ --plain\ list-dependencies\ runlevel3.target\ \|\ grep\ \'\\\(\^\\\|\ \\\)opendaylight.service\$\'

     # ./spec/acceptance/class_spec.rb:46:in `block (4 levels) in <top (required)>'

  3) opendaylight class default parameters Service "opendaylight" should be enabled
     Failure/Error: it { should be_enabled.with_level(3) }
       expected Service "opendaylight" to be enabled
       /bin/sh -c systemctl\ --plain\ list-dependencies\ runlevel3.target\ \|\ grep\ \'\\\(\^\\\|\ \\\)opendaylight.service\$\'

     # ./spec/acceptance/class_spec.rb:47:in `block (4 levels) in <top (required)>'

Finished in 2 minutes 15.2 seconds (files took 3 minutes 5.8 seconds to load)
25 examples, 3 failures

Failed examples:

rspec ./spec/acceptance/class_spec.rb:9 # opendaylight class default parameters should work idempotently with no errors
rspec ./spec/acceptance/class_spec.rb:46 # opendaylight class default parameters Service "opendaylight" should be enabled
rspec ./spec/acceptance/class_spec.rb:47 # opendaylight class default parameters Service "opendaylight" should be enabled

Finished in 2 minutes 15.2 seconds (files took 3 minutes 5.8 seconds to load)
25 examples, 3 failures

Failed examples:

rspec ./spec/acceptance/class_spec.rb:9 # opendaylight class default parameters should work idempotently with no errors
rspec ./spec/acceptance/class_spec.rb:46 # opendaylight class default parameters Service "opendaylight" should be enabled
rspec ./spec/acceptance/class_spec.rb:47 # opendaylight class default parameters Service "opendaylight" should be enabled
/usr/bin/ruby -I/home/daniel/.gem/ruby/gems/rspec-core-3.1.7/lib:/home/daniel/.gem/ruby/gems/rspec-support-3.1.2/lib /home/daniel/.gem/ruby/gems/rspec-core-3.1.7/exe/rspec spec/acceptance --color failed
rake aborted!
Command failed with status (1): [RS_SET=fedora-21 bundle exec rake beaker...]
/home/daniel/puppet-opendaylight/Rakefile:62:in `block in <top (required)>'
Tasks: TOP => fedora_21
(See full trace by running task with --trace)

Switch back to official rspec-puppet

There's a issue with a Gem version required by the latest rspec-puppet. For now, I'm successfully using a fork with the fix. Hopefully the fork will be merged back into master soon (there's an open PR that's not getting much attention). Once it's merged, I should update my source for rspec-puppet in the Gemfile. See #10 for details.

  gem "rspec-puppet", :git => 'https://github.com/logicminds/rspec-puppet'

Verify name: example_spec.rb

I'm not sure if spec/classes/example_spec.rb is named that way because it's an example from the skeleton (likely) or if it's giving examples, in the form of tests, and it's a best practice to keep it named that way. Likely need to look around at other Puppet mods and figure out how they name those things.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.