[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
It does not sound like there is anything for us to do on systemd. If someone is still interested in a related feature request, please open an RFE with upstream: https://github.com/systemd/systemd/labels/RFE%20%F0%9F%8E%81. ** Changed in: systemd (Ubuntu) Status: Triaged => Won't Fix -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: Fix Committed Status in systemd package in Ubuntu: Won't Fix Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
Netplan does not support any pre/post-up/down hooks on its own, but is referring to a mapping table from ifupdown to its two backend renderers “NetworkManager-dispatcher” and “networkd-dispatcher”, which we are currently updating to better explain the details, pitfalls and differences: https://github.com/canonical/netplan.io/pull/245 It’s not a 1:1 mapping, as the three hook dispatchers behave slightly differently, especially wrt. Networkd-dispatcher being a pure listener, running hook scripts asynchronous, whereas ENI and NM handle the hook scripts natively and allow them to interject the interface configuration process. Also, systemd-networkd does not keep an internal state (in contrast to ENI & NM) but relies on the kernel’s netlink state, thus uses different stages and cannot implement a “pre-down” hook at all. Unfortunately, this is the best we can do for now, without requiring upstream changes to systemd, inroducing a possibility to block network configuration, controlled by external hooks, which the systemd devs want to avoid, due to performance concerns. ** Changed in: netplan Status: New => Fix Committed -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: Fix Committed Status in systemd package in Ubuntu: Triaged Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
There is some documentation around how to implement this with netplan here: https://netplan.io/faq/#use-pre-up%2C-post-up%2C-etc.-hook-scripts But its basically using the underlying renderer's (NM or networkd- dispatcher) hooks, as netplan itself is not a networking daemon and cannot easily listen to netlink changes. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: New Status in systemd package in Ubuntu: Triaged Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
To my knowledge, networkd-dispatcher has no way to do 'pre' hooks on systemd-networkd events, so this is still a valid feature request. ** Changed in: systemd (Ubuntu) Status: Invalid => Triaged ** Changed in: systemd (Ubuntu) Milestone: ubuntu-17.05 => None ** Changed in: systemd (Ubuntu) Assignee: Mathieu Trudel-Lapierre (cyphermox) => (unassigned) -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: New Status in systemd package in Ubuntu: Triaged Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
marking this as invalid for systemd as arbitrary code can be run using networkd-dispatcher and/or suggestions from comment 4. ** Changed in: systemd (Ubuntu) Status: Triaged => Invalid -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: New Status in systemd package in Ubuntu: Invalid Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
I too have special action rely on these commands, mainly inserting/removing iptables rule and/or creating virtual sub-interfaces. While this most likely able to be achieved by systemd, but learning systemd itself requires time. It will be wise for netplan to incorporate these functionality generate the appropriate drop-in snippets, otherwise I will have to fallback to ifupdown instead. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: New Status in systemd package in Ubuntu: Triaged Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
I need to add routing information to one interface to allow ssh that enters via the non-default gateway. Before metalanguage this was easy. Now it's so difficult! The closest advice was networkd-dispatcher but the advised directory doesn't exist. I can't see why "legacy" functionality is jettisoned in such a cavalier fashion -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: New Status in systemd package in Ubuntu: Triaged Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
You mention that all the examples can already be done by netplan, yet one, he mentioned was modifying iptables, something I use myself, and have yet to find that anywhere in netplan. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: New Status in systemd package in Ubuntu: Triaged Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
I'm kind of concerned about any non-declarative functionality here. For example, DHCP client and receiving/updating routes are all handled by netwokrd already. You can bind a systemd unit to e.g. sys-subsystem-net-devices- eth0.device and then any number of systemd units should be started and stopped in concert. One can also block and wait until the relevant interface is up with /lib/systemd/systemd-networkd-wait-online --help However, I'd rather avoid running arbitrary code as all the examples provided at the moment can be achieve as specifications to the networkd units. (either as generated by netplan, or as drop-in snippets in /etc or /run). -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: New Status in systemd package in Ubuntu: Triaged Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1664818] Re: Not possible to render pre-up, pre-down, post-up, or post-down snippets
> The requirement here is, I need to know when ens1 goes up or down, so > that I can make changes to the bridge interface. The `ifmonitor` script > will monitor the link status of ens1, and then take appropriate actions, > such as restarting a DHCP client, adding or removing routes that have > been programmed via the lan0 bridge to egress on ens1, adding or > removing IP addresses from the configuration, etc. Knowing the status of the physical link so that you can take appropriate action on the bridge/bond makes sense. But it seems to me that should be handled intrinsically by networkd, not something you could or should configure with scripts. Opening a task on systemd for us to verify the behavior here. When all the physical links in a bridge/bond drop, does networkd treat that as a down / subsequent up event? When you say "egress on ens1", what do you mean? Your network config doesn't show any such routes. Why would these routes be managed externally to networkd? > In the ifupdown world, the other horrible hack I've sometimes found > necessary (although the reason why is eluding me at the moment) is when > I want an interface to be 'manual', yet behave like a 'static' > definition, in that it should configure itself automatically when it > comes online. So I might have something like: In ifupdown, I would expect to handle this as a static network without 'auto'. For netplan / networkd, this looks like it needs some further work to support, already captured in bug #1664844. ** Also affects: systemd (Ubuntu) Importance: Undecided Status: New ** Changed in: systemd (Ubuntu) Importance: Undecided => High ** Changed in: systemd (Ubuntu) Status: New => Triaged ** Changed in: systemd (Ubuntu) Milestone: None => ubuntu-17.05 ** Changed in: systemd (Ubuntu) Assignee: (unassigned) => Mathieu Trudel-Lapierre (cyphermox) -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1664818 Title: Not possible to render pre-up, pre-down, post-up, or post-down snippets Status in netplan: New Status in systemd package in Ubuntu: Triaged Bug description: Many configurations require scripts to run before or after an interface comes up or down. Example: I had a situation where I needed to render a post-up script to monitor an interface with ifupdown (and with the interface set to manual mode, because if the link was down I didn't want to require DHCP to run before the system continued booting). This is similar to what NetworkManager does in order to launch (or kill) a DHCP client. Other use cases involve setting up custom routes (such as when complex logic involving metrics or source routing is required) or anything else the designers of the netplan rendering engine didn't think of, such as invoking workarounds or special settings required for a particular NIC or environment, iptables rules that should be added or removed, etc. A follow-on issue is, it should be possible to ask that custom scripts run if the *link* is detected to come up or down. But I'll be happy if netplan first can simply replicate the custom-script-invoking behavior of ifupdown. To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/1664818/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp