Skip to content

Ubuntu 18.04 bionic removed ifdown-ifup #49078

Closed

Description

@spennymac

Description of Issue/Question

Setting a static-ip with network.managed and am getting command not found for ip-down.

Given that ifupdown is no longer installed by default, the commands: ifup and ifdown are also unavailable. Please use the ip command to achieve similar functionality, specifically ip link set $device up and ip link set $device down.
Ubuntu Release Notes

salt code that I beleive to be in question:

Setup

network.sls

eth0:
  network.managed:
    - enabled: True
    - type: eth
    - proto: static
    - ipaddr: 192.168.1.10
    - netmask: 255.255.255.0
    - gateway: 192.168.1.1

Steps to Reproduce Issue

Running the above state that

salt 'minion state.apply network`

----------
      Function: network.managed
      Result: False
     Comment: Unable to run command '[u'ifdown', u'ens160']' with the context '{u'timeout': None, u'with_communicate': True, u'shell': False, u'bg': False, u'stderr': -2, u'env': {'LANG': 'en_US.UTF-8', 'LC_NUMERIC': 'C', 'NOTIFY_SOCKET': '/run/systemd/notify', 'LC_MESSAGES': 'C', 'JOURNAL_STREAM': '9:38838', 'LC_IDENTIFICATION': 'C', 'LC_ADDRESS': 'C', 'LC_NAME': 'C', 'LC_COLLATE': 'C', 'LC_MEASUREMENT': 'C', 'LC_CTYPE': 'C', 'LC_TELEPHONE': 'C', 'LC_MONETARY': 'C', 'LC_PAPER': 'C', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'LC_TIME': 'C', 'INVOCATION_ID': 'c736b3c72d224be28d6090a94f7ebb42'}, u'stdout': -1, u'close_fds': True, u'stdin': None, u'cwd': u'/root'}', reason: command not found
     Started: 15:35:08.626458
    Duration: 121.57 ms
     Changes:   
              ----------
              interface:
                  Added network interface.

Versions Report

Salt Version:
           Salt: 2018.3.0
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.7.3
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.27.0
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.5
 
System Versions:
           dist: Ubuntu 18.04 bionic
         locale: ANSI_X3.4-1968
        machine: x86_64
        release: 4.15.0-23-generic
         system: Linux
        version: Ubuntu 18.04 bionic
 

Activity

  1. gtmanfred commented on Aug 13, 2018

    @gtmanfred
    Contributor

    For the record, you can still install the ifupdown package, even though it does not come with ubuntu 18 by default.

  2. garethgreenaway commented on Aug 14, 2018

    @garethgreenaway
    Contributor

    If we're relying on it in the code, it should probably be a requirement for the package. /cc @dmurphy18

  3. added this to the Approved milestone on Aug 14, 2018
  4. added
    bug
    severity-medium
    Packaging
    P2
    on Aug 14, 2018
  5. gtmanfred commented on Aug 14, 2018

    @gtmanfred
    Contributor

    a check should be added in the __virtual__

  6. mrichar1 commented on Feb 7, 2019

    @mrichar1
    Contributor

    This also affects places in debian_ip.py where systemd networking.service is used, since this is also added by the ifupdown package - e.g.:

    salt/salt/modules/debian_ip.py

    Lines 1895 to 1897 in af96b6e

    stop = __salt__['service.stop']('networking')
    time.sleep(2)
    res = stop and __salt__['service.start']('networking')

  7. dmurphy18 commented on Apr 8, 2019

    @dmurphy18
    Contributor

    @garethgreenaway So should add a dependency on package ifupdown for Ubuntu 18.04 LTS untill the Salt code has been updated to utilize netstat.io or ip set link etc. ?

  8. self-assigned this
    on Apr 8, 2019
  9. 4 remaining items

  10. ewenmcneill commented on Sep 29, 2019

    @ewenmcneill

    Per vmware-archive/salt-pack#682 (comment) and vmware-archive/salt-pack#702 (comment), I'd suggest that it'd perhaps be better to Recommends: or Suggests: ifupdown on Ubuntu 18.04 systems, rather than Depends:, until the salt network code can be made more portable.

    Because salt-common / salt-minion / salt-master can function fine without ifupdown, for all features, except for this one specific (not yet updated 18 months after Ubuntu 18.04 release) feature. And several of us do not want surprise installs of ifupdown on our netplan managed systems causing confusion (either to the people managing the systems, or to the booting and IP addressing).

    Ewen

  11. dmurphy18 commented on Sep 30, 2019

    @dmurphy18
    Contributor

    @garethgreenaway Any comments on the the suggestion by @ewenmcneill as to affecting Salt's operation

  12. dmurphy18 commented on Sep 30, 2019

    @dmurphy18
    Contributor

    reopened vmware-archive/salt-pack#682 and shall make it Suggests:

  13. dmurphy18 commented on Sep 30, 2019

    @dmurphy18
    Contributor

    saltstack/salt-pack-py3#162

    This should appear in the next point release which should be soon due a number of other issues in Salt 2019.2.1.

  14. d-shi commented on Nov 12, 2019

    @d-shi

    FYI -- I just hit an issue WRT to this change to add a dependency on ifupdown. Adding this package causes any AWS AMI that has it installed to fail to launch. After upgrading to salt 2019.2.1 in our Packer builds, the subsequent EC2 instances that used the new AMIs were unreachable after launch.

  15. ewenmcneill commented on Dec 10, 2019

    @ewenmcneill

    Looks like the version with Suggests: ifupdown got released (2019.2.2):

    ewen@naosr620:~$ dpkg -l | grep salt
    ii  salt-common                           2019.2.2+ds-1                                   all          shared libraries that salt requires for all packages
    ii  salt-minion                           2019.2.2+ds-1                                   all          client package for salt, the distributed remote execution system
    ewen@naosr620:~$ apt-cache show salt-common | grep ifupdown
    Suggests: ifupdown
    ewen@naosr620:~$ 
    

    So this issue could probably be closed again now.

    Ewen

  16. albertusQuelle commented on Jan 11, 2020

    @albertusQuelle

    Ubuntu 18.04 is absolutely crap. Removed all the working stuff. Dont know why.

  17. added
    Confirmed
    fixed-pls-verify
    on Jan 13, 2020
  18. dmurphy18 commented on Feb 12, 2020

    @dmurphy18
    Contributor

    @worlvlhole @ewenmcneill Closing this since fixed in Salt v2019.2.2, and Salt 3000 just released.

    Please reopen if you have additional fixes required for this issue

  19. OrangeDog commented on Jun 17, 2020

    @OrangeDog
    Contributor

    @dmurphy18 the actual fix never got released before it was accidentally reverted: #57637

  20. allyunion commented on Jun 18, 2020

    @allyunion

    I am still having this issue. Shouldn't the dependency be on the ip command instead of ifupdown for the maximum compatibility?

    ip link set <interface> down
    ip link set <interface> up

  21. OrangeDog commented on Jun 18, 2020

    @OrangeDog
    Contributor

    @allyunion yes, that's the fix that got accidentally reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ConfirmedP2Packagingbugfixed-pls-verifyseverity-medium

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions