salt: pkg.installed fails on installing from HTTPS rpm source
Description of Issue/Question
I have a formula that installs the Graylog repo package from its https source url. It worked fine until I upgraded Salt to 2017.7.0 this week.
Setup
graylog.repo:
pkg.installed:
- sources:
- graylog-2.2-repository: 'https://packages.graylog2.org/repo/packages/graylog-2.3-repository_latest.rpm'
Steps to Reproduce Issue
Please use the docker container created to reproduce the issue.
docker run -it danlsgiga/salt-pkg-http:2017.7.0
It returns with the following error but works just fine from curl or any browser:
[ERROR ] Uncaught exception
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/tornado/http1connection.py", line 184, in _read_message
header_future = delegate.headers_received(start_line, headers)
File "/usr/lib64/python2.7/site-packages/tornado/simple_httpclient.py", line 457, in headers_received
self.request.header_callback('%s %s %s\r\n' % first_line)
File "/usr/lib64/python2.7/site-packages/tornado/stack_context.py", line 274, in null_wrapper
return fn(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/salt/fileclient.py", line 626, in on_header
write_body[1].parse_line(hdr) # pylint: disable=no-member
File "/usr/lib64/python2.7/site-packages/tornado/httputil.py", line 188, in parse_line
name, value = line.split(":", 1)
ValueError: need more than 1 value to unpack
[ERROR ] Exception in callback <functools.partial object at 0x23040a8>
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/tornado/ioloop.py", line 591, in _run_callback
ret = callback()
File "/usr/lib64/python2.7/site-packages/tornado/stack_context.py", line 342, in wrapped
raise_exc_info(exc)
File "/usr/lib64/python2.7/site-packages/tornado/stack_context.py", line 313, in wrapped
ret = fn(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/tornado/simple_httpclient.py", line 400, in <lambda>
lambda f: f.result())
File "/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
raise_exc_info(self._exc_info)
File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 879, in run
yielded = self.gen.send(value)
File "/usr/lib64/python2.7/site-packages/tornado/http1connection.py", line 186, in _read_message
yield header_future
File "/usr/lib64/python2.7/site-packages/tornado/http1connection.py", line 54, in __exit__
raise _QuietException
_QuietException
[ERROR ] An error was encountered while installing package(s): Error: HTTP 599: Connection closed reading https://packages.graylog2.org/repo/packages/graylog-2.3-repository_latest.rpm
local:
----------
ID: graylog.repo
Function: pkg.installed
Result: False
Comment: An error was encountered while installing package(s): Error: HTTP 599: Connection closed reading https://packages.graylog2.org/repo/packages/graylog-2.3-repository_latest.rpm
Started: 14:51:02.811192
Duration: 16953.582 ms
Changes:
Summary for local
------------
Succeeded: 0
Failed: 1
------------
Total states run: 1
Total run time: 16.954 s
Versions Report
Salt Version:
Salt: 2017.7.0
Dependency Versions:
cffi: Not Installed
cherrypy: unknown
dateutil: 2.5.3
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.4.8
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: 3.4.3
pygit2: Not Installed
Python: 2.7.5 (default, Nov 6 2016, 00:28:07)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
System Versions:
dist: centos 7.3.1611 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-514.26.2.el7.x86_64
system: Linux
version: CentOS Linux 7.3.1611 Core
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (15 by maintainers)
Actually, ignore my earlier comment about the connection being closed. I’ve found the actual problem and will have a fix in soon.
Fix has been submitted in https://github.com/saltstack/salt/pull/42967.