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

Ubuntu 18.04 bionic removed ifdown-ifup #49078

Closed
spennymac opened this issue Aug 13, 2018 · 21 comments
Closed

Ubuntu 18.04 bionic removed ifdown-ifup #49078

spennymac opened this issue Aug 13, 2018 · 21 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 Packaging Related to packaging of Salt, not Salt's support for package management. severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@spennymac
Copy link

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
 
@gtmanfred
Copy link
Contributor

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

@garethgreenaway
Copy link
Contributor

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

@garethgreenaway garethgreenaway added this to the Approved milestone Aug 14, 2018
@garethgreenaway garethgreenaway added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Packaging Related to packaging of Salt, not Salt's support for package management. P2 Priority 2 labels Aug 14, 2018
@gtmanfred
Copy link
Contributor

a check should be added in the __virtual__

@mrichar1
Copy link
Contributor

mrichar1 commented Feb 7, 2019

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')

alexandruavadanii added a commit to alexandruavadanii/fuel that referenced this issue Feb 21, 2019
If a POD only has baremetal nodes, without VCP, skip fetching Ubuntu
cloud image.

While at it, prepare for supporting Ubuntu 18.04 base image:
- workaround systemd-resolved being used instead of resolvconf;
- preinstall ifupdown to workaround [1];

[1] saltstack/salt#49078

Change-Id: If51db0bc95eff1a497e1df5d457e26a7b902aa5a
Signed-off-by: Alexandru Avadanii <[email protected]>
alexandruavadanii added a commit to alexandruavadanii/fuel that referenced this issue Feb 21, 2019
If a POD only has baremetal nodes, without VCP, skip fetching Ubuntu
cloud image.

While at it, prepare for supporting Ubuntu 18.04 base image:
- workaround systemd-resolved being used instead of resolvconf;
- preinstall ifupdown to workaround [1];

[1] saltstack/salt#49078

Change-Id: If51db0bc95eff1a497e1df5d457e26a7b902aa5a
Signed-off-by: Alexandru Avadanii <[email protected]>
alexandruavadanii added a commit to alexandruavadanii/fuel that referenced this issue Feb 21, 2019
If a POD only has baremetal nodes, without VCP, skip fetching Ubuntu
cloud image.

While at it, prepare for supporting Ubuntu 18.04 base image:
- workaround systemd-resolved being used instead of resolvconf;
- preinstall ifupdown to workaround [1];

[1] saltstack/salt#49078

Change-Id: If51db0bc95eff1a497e1df5d457e26a7b902aa5a
Signed-off-by: Alexandru Avadanii <[email protected]>
alexandruavadanii added a commit to alexandruavadanii/fuel that referenced this issue Feb 25, 2019
If a POD only has baremetal nodes, without VCP, skip fetching Ubuntu
cloud image.

While at it, prepare for supporting Ubuntu 18.04 base image:
- workaround systemd-resolved being used instead of resolvconf;
- preinstall ifupdown to workaround [1];

[1] saltstack/salt#49078

Change-Id: If51db0bc95eff1a497e1df5d457e26a7b902aa5a
Signed-off-by: Alexandru Avadanii <[email protected]>
@dmurphy18
Copy link
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. ?

@dmurphy18 dmurphy18 self-assigned this Apr 8, 2019
@dmurphy18
Copy link
Contributor

dmurphy18 commented Apr 22, 2019

Will add package ifupdown for Ubuntu 18.04 LTS. Also need to check if this is required for Buster

@dmurphy18
Copy link
Contributor

Updated packaging to add dependency for ifupdown for an immediate fix, until code changes have been applied.

see vmware-archive/salt-pack#683 and saltstack/salt-pack-py3#132

@dmurphy18
Copy link
Contributor

PR #52670 submitted

@dmurphy18
Copy link
Contributor

@worlvlhole This will appear in a future point release, unfortunately it has missed the cut off for 2019.2.1, but I shall see what I can do.

If this is sufficient, please consider closing this issue.

@ewenmcneill
Copy link

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

@dmurphy18
Copy link
Contributor

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

@dmurphy18
Copy link
Contributor

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

@dmurphy18
Copy link
Contributor

@dmurphy18
Copy link
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.

@d-shi
Copy link

d-shi commented Nov 12, 2019

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.

@ewenmcneill
Copy link

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

@lordvalium
Copy link

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

@waynew waynew added Confirmed Salt engineer has confirmed bug/feature - often including a MCVE fixed-pls-verify fix is linked, bug author to confirm fix labels Jan 13, 2020
@dmurphy18
Copy link
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

@OrangeDog
Copy link
Contributor

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

@allyunion
Copy link

allyunion commented Jun 18, 2020

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

@OrangeDog
Copy link
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
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 Packaging Related to packaging of Salt, not Salt's support for package management. severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests