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

Multiple 'up' lines in options hash #18

Closed
saz opened this issue Dec 19, 2012 · 8 comments
Closed

Multiple 'up' lines in options hash #18

saz opened this issue Dec 19, 2012 · 8 comments

Comments

@saz
Copy link
Sponsor

saz commented Dec 19, 2012

Debian allows multiple 'up' lines in iface stanza. They will be executed in the order written to the file.

But this isn't possible as there can only be one key in the options hash.

@adrienthebo
Copy link
Member

My idea for implementing this was to allow up to take an array, within the options hash, like so:

network_config { 'eth0':
  ensure => present,
  options => {
    up => [
      '/sbin/route add net 10.20.30.40/24 via eth0',
      '/sbin/route add net 10.30.50.70/24 via eth0',
      [etc]
    ]
}

Is this an acceptable solution?

@saz
Copy link
Sponsor Author

saz commented Dec 28, 2012

Looks good to me.

@vjanelle
Copy link

Just strictly speaking, there is an file(/etc/sysconfig/static-routes) that manages routes - is this in the scope of this module as well?

@adrienthebo
Copy link
Member

@saz I have a topic branch that should have the necessary work to support multiple options in a hash. It passes my unit tests but I don't have the bandwidth to do a lot of acceptance testing on it right now. The branch is at https://github.com/adrienthebo/puppet-network/tree/reimplement_debian_parsing ; would you be willing to test it and see if it works as expected?

@adrienthebo
Copy link
Member

@vjanelle So the situation with static routing configuration is really messy right now. I plan on implementing some sort of static route management, but on Debian it's all but impossible to extract routing and interface configuration. On Redhat it's easier since there are the individual route files as you mention, but the problem I have run into is how to manage the data. If I create a new ticket regarding route configuration with a request for comments on how people want to see it implemented would you be willing to toss you input into that?

@vjanelle
Copy link

vjanelle commented Jan 6, 2013

Sure.

@adrienthebo
Copy link
Member

@vjanelle I've made #20 , feedback on that would be much appreciated!

adrienthebo added a commit that referenced this issue Jan 23, 2013
Debian can have multiple arbitrary commands for iface blocks, but the
previous behavior was concatenating array entries. This commit adds a
separate line for each entry in the value array.
@adrienthebo
Copy link
Member

Released in 0.3.0-rc1

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

No branches or pull requests

3 participants