Bug 195235 - sysutils/py-salt: Requires lsof as a dependency
Summary: sysutils/py-salt: Requires lsof as a dependency
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Kubilay Kocak
URL:
Keywords: easy, patch, patch-ready
Depends on:
Blocks:
 
Reported: 2014-11-21 00:39 UTC by Juan Garcia
Modified: 2015-01-02 03:32 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback+


Attachments
addition of lsof requirement (900 bytes, text/plain)
2014-11-30 23:20 UTC, Christer Edwards
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juan Garcia 2014-11-21 00:39:11 UTC
When running the latest py27-salt-2014.7.0 port as master, we get the following error. This is solved by installing lsof. The problem didn't exist in previous versions.


salt -v "*" test.ping
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/local/bin/salt", line 9, in 
    load_entry_point('salt==2014.7.0', 'console_scripts', 'salt')()
  File "/usr/local/lib/python2.7/site-packages/salt/scripts.py", line 240, in salt_main
    client.run()
  File "/usr/local/lib/python2.7/site-packages/salt/cli/__init__.py", line 186, in run
    for full_ret in cmd_func(**kwargs):
  File "/usr/local/lib/python2.7/site-packages/salt/client/__init__.py", line 584, in cmd_cli
    **kwargs):
  File "/usr/local/lib/python2.7/site-packages/salt/client/__init__.py", line 1212, in get_cli_event_returns
    connected_minions = salt.utils.minions.CkMinions(self.opts).connected_ids()
  File "/usr/local/lib/python2.7/site-packages/salt/utils/minions.py", line 418, in connected_ids
    addrs = salt.utils.network.local_port_tcp(int(self.opts['publish_port']))
  File "/usr/local/lib/python2.7/site-packages/salt/utils/network.py", line 882, in local_port_tcp
    ret = remotes_on_local_tcp_port(port)
  File "/usr/local/lib/python2.7/site-packages/salt/utils/network.py", line 982, in remotes_on_local_tcp_port
    data = subprocess.check_output(['lsof', '-i4TCP:{0:d}'.format(port), '-n'])
  File "/usr/local/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/local/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/local/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/local/bin/salt", line 9, in 
    load_entry_point('salt==2014.7.0', 'console_scripts', 'salt')()
  File "/usr/local/lib/python2.7/site-packages/salt/scripts.py", line 240, in salt_main
    client.run()
  File "/usr/local/lib/python2.7/site-packages/salt/cli/__init__.py", line 186, in run
    for full_ret in cmd_func(**kwargs):
  File "/usr/local/lib/python2.7/site-packages/salt/client/__init__.py", line 584, in cmd_cli
    **kwargs):
  File "/usr/local/lib/python2.7/site-packages/salt/client/__init__.py", line 1212, in get_cli_event_returns
    connected_minions = salt.utils.minions.CkMinions(self.opts).connected_ids()
  File "/usr/local/lib/python2.7/site-packages/salt/utils/minions.py", line 418, in connected_ids
    addrs = salt.utils.network.local_port_tcp(int(self.opts['publish_port']))
  File "/usr/local/lib/python2.7/site-packages/salt/utils/network.py", line 882, in local_port_tcp
    ret = remotes_on_local_tcp_port(port)
  File "/usr/local/lib/python2.7/site-packages/salt/utils/network.py", line 982, in remotes_on_local_tcp_port
    data = subprocess.check_output(['lsof', '-i4TCP:{0:d}'.format(port), '-n'])
  File "/usr/local/lib/python2.7/subprocess.py", line 566, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/local/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/local/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-21 00:39:11 UTC
Maintainer CC'd
Comment 2 Christer Edwards 2014-11-30 22:34:07 UTC
pushed this issue upstream to see if lsof is an intentional added requirement. (https://github.com/saltstack/salt/issues/18584).

In the meantime I will submit a patch to add lsof to RUN_DEPENDS on the py-salt port.
Comment 3 Christer Edwards 2014-11-30 23:20:12 UTC
Created attachment 150053 [details]
addition of lsof requirement
Comment 4 Christer Edwards 2014-12-15 03:04:23 UTC
Can this be closed now? Anything more needed from me?
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-18 11:22:57 UTC
Do you want to backport the following commit instead?

https://github.com/saltstack/salt/pull/18894
Comment 6 Christer Edwards 2014-12-27 06:23:12 UTC
This has been fixed upstream. In the next release I'll remove the requirement on lsof.
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2014-12-27 08:34:55 UTC
What should be done with this issue?

a) Update patch to backport lsof dependency removal?
b) Commit this patch, revert in next update?
Comment 8 Christer Edwards 2014-12-27 22:42:46 UTC
Let's just commit this patch and we'll revert it with the next release.
Comment 9 commit-hook freebsd_committer freebsd_triage 2015-01-02 03:31:27 UTC
A commit references this bug:

Author: koobs
Date: Fri Jan  2 03:30:43 UTC 2015
New revision: 376039
URL: https://svnweb.freebsd.org/changeset/ports/376039

Log:
  sysutils/py-salt: Requires lsof as a dependency

  - Add lsof as a dependency (temporarily) [1][2]

  [1] https://github.com/saltstack/salt/issues/18584
  [2] https://github.com/saltstack/salt/pull/18894

  PR:		195235
  Submitted by:	Christer Edwards <christer dot edwards gmail com> (maintainer)

Changes:
  head/sysutils/py-salt/Makefile