Salt 'debconf' states fail since move to Python 3

Bug #1752651 reported by Graham Clinch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Salt
Fix Released
Unknown
salt (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Since the move to salt running under Python 3, salt 'debconf' states fail with:

```
[ERROR ] An exception occurred in this state: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/salt/state.py", line 1851, in call
    **cdata['kwargs'])
  File "/usr/lib/python3/dist-packages/salt/loader.py", line 1795, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/salt/states/debconfmod.py", line 197, in set
    if __salt__['debconf.set'](name, key, args['type'], args['value']):
  File "/usr/lib/python3/dist-packages/salt/modules/debconfmod.py", line 130, in set_
    os.write(fd_, line)
TypeError: a bytes-like object is required, not 'str'
```

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: salt-minion 2017.7.3+dfsg1-1
ProcVersionSignature: Ubuntu 4.15.0-10.11-generic 4.15.3
Uname: Linux 4.15.0-10-generic x86_64
ApportVersion: 2.20.8-0ubuntu10
Architecture: amd64
Date: Thu Mar 1 16:42:41 2018
JournalErrors:
 -- Logs begin at Mon 2018-01-29 14:53:26 GMT, end at Thu 2018-03-01 16:42:31 GMT. --
 Mar 01 16:38:24 hostname kernel: piix4_smbus 0000:00:07.3: SMBus Host Controller not enabled!
 Mar 01 16:38:24 hostname kernel: sd 2:0:0:0: [sda] Assuming drive cache: write through
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_GB:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: salt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Graham Clinch (g-clinch) wrote :
Changed in salt:
status: Unknown → New
Benjamin Drung (bdrung)
Changed in salt (Ubuntu):
status: New → In Progress
Revision history for this message
Benjamin Drung (bdrung) wrote :

Fixed in 2017.7.4+dfsg1-1

Changed in salt (Ubuntu):
status: In Progress → Fix Committed
Changed in salt:
status: New → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package salt - 2017.7.4+dfsg1-1

---------------
salt (2017.7.4+dfsg1-1) unstable; urgency=medium

  * New upstream bug-fix release
  * Use xz for repacked source tarball
  * Change salt master user from 'root' to 'salt' by default (Closes: #891303)
  * Fix Python 3 support for debconfmod (LP: #1752651)
  * Support dynamic pillar_root environment (fixes upstream bug #20581)
  * kubernetes: Fix ValueError for template in AppsV1beta1DeploymentSpec
    (see upstream bug #46329)

 -- Benjamin Drung <email address hidden> Mon, 05 Mar 2018 15:36:11 +0100

Changed in salt (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.