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

ifupdown-extras required on Debian, but not installed #45

Closed
bitglue opened this issue Jul 1, 2013 · 7 comments
Closed

ifupdown-extras required on Debian, but not installed #45

bitglue opened this issue Jul 1, 2013 · 7 comments
Labels
enhancement New feature or request

Comments

@bitglue
Copy link

bitglue commented Jul 1, 2013

If ifupdown-extras isn't installed, then the network_route provider will refuse to run. This is painfully hard to figure out. The existence of /etc/network/routes in Debian is hardly documented at all, and the only mention of it in puppet-network is a comment in the implementation.

@adrienthebo
Copy link
Member

@bitglue please pardon the delay in response; it's been a long few months. This is the fix that I've thought of for fixing this:

  • add manifests/init.pp for a network class that will install dependencies like ifupdown-extras
  • Document this dependency in the readme and call out that you have to have that packages for network_route to work.

Would this address your problem?

@bitglue
Copy link
Author

bitglue commented Sep 27, 2013

@adrienthebo I think that would do it. puppet-firewall has a similar deal; the user is expected to do class { 'firewall': } to install dependencies, which does something different based on the platform being used.

I'd also suggest improving the error messages so that at least if someone doesn't read the readme carefully, and does not declare the class necessary to install the dependencies (or maybe they don't want to, because it conflicts with something else they are doing), they get a better hint about what's wrong. I'm not sure how that's done, but currently the provider just magically doesn't work, without any hint about why.

@adrienthebo
Copy link
Member

I dumped the rules file for the ifupdown-extra package to see where files are to be installed, and got this:

        install -m755 if-up-scripts/check-network-cable  $(CURDIR)/debian/ifupdown-extra/etc/network/if-up.d/00check-network-cable
        install -m755 if-up-scripts/check-duplicate-ip  $(CURDIR)/debian/ifupdown-extra/etc/network/if-up.d/10check-duplicate-ip
        install -m755 if-up-scripts/static-routes  $(CURDIR)/debian/ifupdown-extra/etc/network/if-up.d/20static-routes
        install -m755 if-up-scripts/check-gateway  $(CURDIR)/debian/ifupdown-extra/etc/network/if-up.d/30check-gateway

What do you think of checking for the presence of /etc/network/if-up.d/20static-routes and using that as a confine?

@jhoblitt
Copy link
Member

How stable have those script names been over time? I don't know enough about Debian to answer that question. If you're going to probe the system directly couldn't you check with apt to see if the package is installed? I realize that's considered dirty but I've never been clear on why it's OK to check for files but packages are generally taboo.

Also, wouldn't it make sense to add an autorequire for ifupdown-extra either way?

@bitglue
Copy link
Author

bitglue commented Sep 30, 2013

What do you think of checking for the presence of /etc/network/if-up.d/20static-routes and using that as a confine?

Isn't that what it already does?

@jyaworski
Copy link
Member

Hello:

What's the status of this issue? I'm just pinging old issues.

@igalic
Copy link
Contributor

igalic commented May 11, 2016

@adrienthebo, 2013:

add manifests/init.pp for a network class that will install dependencies like ifupdown-extras

yes. let's. let's also install ipaddr gem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants