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

Add ability to set default restart value; add schedule and default schedule #132

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

esalberg
Copy link
Contributor

@esalberg esalberg commented Oct 6, 2017

add schedule and default schedule options to enable network restarts during change windows

@esalberg
Copy link
Contributor Author

esalberg commented Oct 6, 2017

I did not add any spec tests so far, because 1) I wasn't sure how to test getting a class variable specifically (the restart functionality is already spec tested), and 2) I wasn't sure how to test schedules. Please let me know what sort of testing is needed (and point me in the right direction if possible).

@esalberg
Copy link
Contributor Author

esalberg commented Oct 6, 2017

In case it's useful, this is the functional testing I completed:

Functional testing:
DONE - restart false global (hiera global yaml)

  • updates file, does not refresh
    DONE - restart true global (hiera node yaml override)
  • updates file, refreshes
    DONE - schedule with global (restart true)
    -- does not update file
    DONE - schedule with global with override (restart true)
    -- updates file, refreshes
    DONE - schedule with global (restart false)
    -- updates file, does not refresh
    DONE - default restart true (unspecified in Hiera)
    -- updates file, refreshes
    DONE - default restart false (hiera global yaml)
    -- updates file, does not refresh
    DONE - default restart false with true override (hiera node yaml override; alias)
    -- updates file, refreshes
    DONE - default restart false with static interface change with schedule [assume without sched is the same]
    -- updates file, does not refresh
    DONE - default restart true with static interface change with schedule
    -- does not update file
    DONE - default restart true with static interface change without schedule
    -- updates file, refreshes
    DONE - default restart false with true override and schedule
    -- does not update file
    DONE - schedule with alias, schedule not on default interface
    -- updates default interface and not alias
    DONE - default schedule set in global.yaml
    -- does not update file
    DONE - default schedule set in global overridden in node file
    -- updates file, refreshes

@esalberg
Copy link
Contributor Author

esalberg commented Oct 6, 2017

I know my tests are failing - I figured out how to run them locally and have fixed most of the issues. I'll update as soon as I'm done (lots of files).

@esalberg
Copy link
Contributor Author

esalberg commented Oct 9, 2017

Rspec is updated. I also had to do a couple of rspec fixes for network_alias_spec.rb and network_if_static_spec.rb.

I also ran into a runtime error when trying to run spec tests against all the defines at once:
RuntimeError:
fact "hostname" already has the maximum number of resolutions allowed (100).

It looks like it's related to this ticket - but I wasn't sure when I might need to call Facter.clear - every spec test that uses facts? Just specific ones using facts in a certain way?

https://tickets.puppetlabs.com/browse/FACT-1016

@esalberg
Copy link
Contributor Author

FYI - if you're at PuppetConf, let me know if you want to discuss the module there.

…); add schedule and default schedule options to enable network restarts during change windows

rspec fixes
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.

1 participant