Public bug reported: SYMPTOM My computer is set up with static IP on interface eno1 and running 'sudo apt update' fails. Adding nameserver aaa.bbb.ccc.ddd in resolv.conf helps, as a workaround, but this is reset on reboot. Another workaround is to create a secondary IP on the same interface using DHCP (it works), but I don't want that.
ANALYSIS I have traced the problem to the IF_* variables not being set at "post-up" phase, where resolvconf tries to get the values. (see 000resolvconf file in /etc/network/if-up.d.) To verify this I created a script named 0000dbg which I placed in all the if-*.d folders: #---- Start DBGDIR=/etc/test mkdir -p $DBGDIR DEBUGFILE=$DBGDIR/$PHASE set | grep -E "^(IF_|(IFACE|LOGICAL|ADDRFAM|METHOD|MODE|PHASE|VERBOSITY|PATH)\b)" > $DEBUGFILE #--- end (For some reason the mkdir command did not work, so I created the directory manually.) These where the resulting files (listed with tail -n20 ...): ==> /etc/test/post-down <== ADDRFAM='meta' IFACE='--all' LOGICAL='auto' METHOD='none' MODE='stop' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='post-down' VERBOSITY='0' ==> /etc/test/post-up <== ADDRFAM='meta' IFACE='--all' LOGICAL='auto' METHOD='none' MODE='start' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='post-up' VERBOSITY='0' ==> /etc/test/pre-down <== ADDRFAM='inet' IFACE='eno1' IF_ADDRESS='192.168.0.3' IF_BROADCAST='192.168.0.255' IF_DNSNAMESERVERS='193.213.112.4 IF_GATEWAY='192.168.0.1' IF_HOSTNAME='hopper' IF_NETMASK='255.255.255.0' LOGICAL='eno1' METHOD='static' MODE='stop' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='pre-down' VERBOSITY='0' ==> /etc/test/pre-up <== ADDRFAM='inet' IFACE='lo' LOGICAL='lo' METHOD='loopback' MODE='start' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='pre-up' VERBOSITY='0' As you can see the IF_* variables were created in the 'pre-down' phase but not in the 'post-up' as expected. I would expect that some of the code in the ifdown program should have been in the ifup program. VERSIONS Distribution: Ubuntu 16.04 (LTS) (latest and greatest) ifupdown 0.8.10ubuntu1.1 amd64 I also found this one <http://irclogs.thegrebs.com/debian/2014/02/03> (search for "IF_" ) ** Affects: ifupdown (Ubuntu) Importance: Undecided Status: New ** Description changed: SYMPTOM My computer is set up with static IP on interface eno1 and running 'sudo apt update' fails. Adding nameserver aaa.bbb.ccc.ddd in resolv.conf helps, as a workaround, but this is reset on reboot. Another workaround is to create a secondary IP on the same interface using DHCP (it works), but I don't want that. - I have traced the problem to the IF_* variables not being set at "post- - up" phase, where resolvconf tries to get the values. (see 000resolvconf - file in /etc/network/if-up.d.) + ANALYSIS + I have traced the problem to the IF_* variables not being set at "post-up" phase, where resolvconf tries to get the values. (see 000resolvconf file in /etc/network/if-up.d.) To verify this I created a script named 0000dbg which I placed in all the if-*.d folders: #---- Start DBGDIR=/etc/test mkdir -p $DBGDIR DEBUGFILE=$DBGDIR/$PHASE set | grep -E "^(IF_|(IFACE|LOGICAL|ADDRFAM|METHOD|MODE|PHASE|VERBOSITY|PATH)\b)" > $DEBUGFILE #--- end (For some reason the mkdir command did not work, so I created the directory manually.) These where the resulting files (listed with tail -n20 ...): ==> /etc/test/post-down <== ADDRFAM='meta' IFACE='--all' LOGICAL='auto' METHOD='none' MODE='stop' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='post-down' VERBOSITY='0' ==> /etc/test/post-up <== ADDRFAM='meta' IFACE='--all' LOGICAL='auto' METHOD='none' MODE='start' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='post-up' VERBOSITY='0' ==> /etc/test/pre-down <== ADDRFAM='inet' IFACE='eno1' IF_ADDRESS='192.168.0.3' IF_BROADCAST='192.168.0.255' IF_DNSNAMESERVERS='193.213.112.4 IF_GATEWAY='192.168.0.1' IF_HOSTNAME='hopper' IF_NETMASK='255.255.255.0' LOGICAL='eno1' METHOD='static' MODE='stop' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='pre-down' VERBOSITY='0' ==> /etc/test/pre-up <== ADDRFAM='inet' IFACE='lo' LOGICAL='lo' METHOD='loopback' MODE='start' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='pre-up' VERBOSITY='0' As you can see the IF_* variables were created in the 'pre-down' phase but not in the 'post-up' as expected. I would expect that some of the code in the ifdown program should have been in the ifup program. - VERSIONS Distribution: Ubuntu 16.04 (LTS) (latest and greatest) ifupdown 0.8.10ubuntu1.1 amd64 ** Description changed: SYMPTOM My computer is set up with static IP on interface eno1 and running 'sudo apt update' fails. Adding nameserver aaa.bbb.ccc.ddd in resolv.conf helps, as a workaround, but this is reset on reboot. Another workaround is to create a secondary IP on the same interface using DHCP (it works), but I don't want that. ANALYSIS I have traced the problem to the IF_* variables not being set at "post-up" phase, where resolvconf tries to get the values. (see 000resolvconf file in /etc/network/if-up.d.) To verify this I created a script named 0000dbg which I placed in all the if-*.d folders: #---- Start DBGDIR=/etc/test mkdir -p $DBGDIR DEBUGFILE=$DBGDIR/$PHASE set | grep -E "^(IF_|(IFACE|LOGICAL|ADDRFAM|METHOD|MODE|PHASE|VERBOSITY|PATH)\b)" > $DEBUGFILE #--- end (For some reason the mkdir command did not work, so I created the directory manually.) These where the resulting files (listed with tail -n20 ...): ==> /etc/test/post-down <== ADDRFAM='meta' IFACE='--all' LOGICAL='auto' METHOD='none' MODE='stop' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='post-down' VERBOSITY='0' ==> /etc/test/post-up <== ADDRFAM='meta' IFACE='--all' LOGICAL='auto' METHOD='none' MODE='start' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='post-up' VERBOSITY='0' ==> /etc/test/pre-down <== ADDRFAM='inet' IFACE='eno1' IF_ADDRESS='192.168.0.3' IF_BROADCAST='192.168.0.255' IF_DNSNAMESERVERS='193.213.112.4 IF_GATEWAY='192.168.0.1' IF_HOSTNAME='hopper' IF_NETMASK='255.255.255.0' LOGICAL='eno1' METHOD='static' MODE='stop' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='pre-down' VERBOSITY='0' ==> /etc/test/pre-up <== ADDRFAM='inet' IFACE='lo' LOGICAL='lo' METHOD='loopback' MODE='start' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='pre-up' VERBOSITY='0' As you can see the IF_* variables were created in the 'pre-down' phase but not in the 'post-up' as expected. I would expect that some of the code in the ifdown program should have been in the ifup program. VERSIONS Distribution: Ubuntu 16.04 (LTS) (latest and greatest) ifupdown 0.8.10ubuntu1.1 amd64 + + I also found this one <http://irclogs.thegrebs.com/debian/2014/02/03> + (search for "IF_" ) ** Description changed: SYMPTOM My computer is set up with static IP on interface eno1 and running 'sudo apt update' fails. Adding nameserver aaa.bbb.ccc.ddd in resolv.conf helps, as a workaround, but this is reset on reboot. Another workaround is to create a secondary IP on the same interface using DHCP (it works), but I don't want that. ANALYSIS I have traced the problem to the IF_* variables not being set at "post-up" phase, where resolvconf tries to get the values. (see 000resolvconf file in /etc/network/if-up.d.) To verify this I created a script named 0000dbg which I placed in all the if-*.d folders: #---- Start DBGDIR=/etc/test mkdir -p $DBGDIR DEBUGFILE=$DBGDIR/$PHASE set | grep -E "^(IF_|(IFACE|LOGICAL|ADDRFAM|METHOD|MODE|PHASE|VERBOSITY|PATH)\b)" > $DEBUGFILE #--- end - (For some reason the mkdir command did not work, so I created the directory manually.) + (For some reason the mkdir command did not work, so I created the + directory manually.) + These where the resulting files (listed with tail -n20 ...): ==> /etc/test/post-down <== ADDRFAM='meta' IFACE='--all' LOGICAL='auto' METHOD='none' MODE='stop' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='post-down' VERBOSITY='0' ==> /etc/test/post-up <== ADDRFAM='meta' IFACE='--all' LOGICAL='auto' METHOD='none' MODE='start' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='post-up' VERBOSITY='0' ==> /etc/test/pre-down <== ADDRFAM='inet' IFACE='eno1' IF_ADDRESS='192.168.0.3' IF_BROADCAST='192.168.0.255' IF_DNSNAMESERVERS='193.213.112.4 IF_GATEWAY='192.168.0.1' IF_HOSTNAME='hopper' IF_NETMASK='255.255.255.0' LOGICAL='eno1' METHOD='static' MODE='stop' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='pre-down' VERBOSITY='0' ==> /etc/test/pre-up <== ADDRFAM='inet' IFACE='lo' LOGICAL='lo' METHOD='loopback' MODE='start' PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' PHASE='pre-up' VERBOSITY='0' As you can see the IF_* variables were created in the 'pre-down' phase but not in the 'post-up' as expected. I would expect that some of the code in the ifdown program should have been in the ifup program. VERSIONS Distribution: Ubuntu 16.04 (LTS) (latest and greatest) ifupdown 0.8.10ubuntu1.1 amd64 I also found this one <http://irclogs.thegrebs.com/debian/2014/02/03> (search for "IF_" ) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1641108 Title: IF_* variables are not defined (for static IP) in post-up phase To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1641108/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs