Repository navigation
Closed
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEP2Priority 2PackagingRelated to packaging of Salt, not Salt's support for package management.bugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone
Description
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.1Steps 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
Reacted by Matthew Richardson
Metadata
Metadata
Assignees
Labels
ConfirmedSalt engineer has confirmed bug/feature - often including a MCVEP2Priority 2PackagingRelated to packaging of Salt, not Salt's support for package management.bugbroken, incorrect, or confusing behaviorfixed-pls-verifyfix is linked, bug author to confirm fixseverity-medium3rd level, incorrect or bad functionality, confusing and lacks a work around
Activity
gtmanfred commentedon Aug 13, 2018
For the record, you can still install the
ifupdownpackage, even though it does not come with ubuntu 18 by default.garethgreenaway commentedon Aug 14, 2018
If we're relying on it in the code, it should probably be a requirement for the package. /cc @dmurphy18
gtmanfred commentedon Aug 14, 2018
a check should be added in the
__virtual__mrichar1 commentedon Feb 7, 2019
This also affects places in
debian_ip.pywhere systemdnetworking.serviceis used, since this is also added by theifupdownpackage - e.g.:salt/salt/modules/debian_ip.py
Lines 1895 to 1897 in af96b6e
[lib] Skip base/VCP image fetch when not used
[lib] Skip base/VCP image fetch when not used
[lib] Skip base/VCP image fetch when not used
[lib] Skip base/VCP image fetch when not used
dmurphy18 commentedon Apr 8, 2019
@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. ?
4 remaining items
ewenmcneill commentedon Sep 29, 2019
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:orSuggests:ifupdownon Ubuntu 18.04 systems, rather thanDepends:, until thesaltnetwork code can be made more portable.Because
salt-common/salt-minion/salt-mastercan function fine withoutifupdown, 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 ofifupdownon ournetplanmanaged systems causing confusion (either to the people managing the systems, or to the booting and IP addressing).Ewen
dmurphy18 commentedon Sep 30, 2019
@garethgreenaway Any comments on the the suggestion by @ewenmcneill as to affecting Salt's operation
dmurphy18 commentedon Sep 30, 2019
reopened vmware-archive/salt-pack#682 and shall make it Suggests:
dmurphy18 commentedon Sep 30, 2019
https://github.com/saltstack/salt-pack-py3/issues/161
dmurphy18 commentedon Sep 30, 2019
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 commentedon 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 commentedon Dec 10, 2019
Looks like the version with
Suggests: ifupdowngot released (2019.2.2):So this issue could probably be closed again now.
Ewen
albertusQuelle commentedon Jan 11, 2020
Ubuntu 18.04 is absolutely crap. Removed all the working stuff. Dont know why.
dmurphy18 commentedon Feb 12, 2020
@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 commentedon Jun 17, 2020
@dmurphy18 the actual fix never got released before it was accidentally reverted: #57637
allyunion commentedon 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> downip link set <interface> upOrangeDog commentedon Jun 18, 2020
@allyunion yes, that's the fix that got accidentally reverted.