Bug 1261136

Summary: Start of *-ask-password-*.path units fails without Message= field in existing ini file
Product: Red Hat Enterprise Linux 7 Reporter: Stanislav Zidek <szidek>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: low    
Version: 7.2CC: bblaskov, jscotka, lnykryn, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-219-20.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 00:42:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1289485, 1313485    

Description Stanislav Zidek 2015-09-08 16:45:18 UTC
Description of problem:
If I run some ask-password path unit, e.g.:

# systemctl start systemd-ask-password-console.path

and there is a file without Message= present in /run/systemd/ask-password/, e.g.

# cat /run/systemd/ask-password/ask.foo
[Ask]
Id=cryptsetup:xxx
Socket=/tmp/foo
NotAfter=0

then the start fails with:

# systemctl start systemd-ask-password-console.path
Assertion 'message' failed at src/shared/ask-password-api.c:73, function ask_password_tty(). Aborting.

(Note: file /tmp/foo must really exist)

Version-Release number of selected component (if applicable):
systemd-219-11.el7

How reproducible:
always

Steps to Reproduce:
1. touch /tmp/foo
2. cp ask.foo /run/systemd/ask-password/
3. systemctl (re)start systemd-ask-password-console.path

Actual results:
Assertion 'message' failed at src/shared/ask-password-api.c:73, function ask_password_tty(). Aborting.

Expected results:
Not aborting, starts normally.

Comment 1 Lukáš Nykrýn 2016-01-28 15:21:39 UTC
pushed to staging https://github.com/lnykryn/systemd-rhel/commit/2737fab0dba5ed238b4e0e927139e46e4911e1b4 -> post

Comment 4 Branislav Blaškovič 2016-08-17 14:45:17 UTC
Testing with TC /CoreOS/systemd/Regression/ask-password-path-units-fails-without-Message-field-in-existing-ini-file

NEW VERSION:
:: [ 10:39:43 ] :: Package versions:
:: [ 10:39:43 ] ::   systemd-219-26.el7.x86_64
:: [  BEGIN   ] :: Running 'touch /tmp/foo'
:: [   PASS   ] :: Command 'touch /tmp/foo' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'cp ask.foo /run/systemd/ask-password/'
:: [   PASS   ] :: Command 'cp ask.foo /run/systemd/ask-password/' (Expected 0, got 0)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'timeout 3s systemctl start systemd-ask-password-console.path'
Password:
:: [   PASS   ] :: Command 'timeout 3s systemctl start systemd-ask-password-console.path' (Expected 124, got 124)


OLD VERSION:
:: [ 10:39:41 ] :: Package versions:
:: [ 10:39:41 ] ::   systemd-219-19.el7.x86_64
:: [  BEGIN   ] :: Running 'touch /tmp/foo'
:: [   PASS   ] :: Command 'touch /tmp/foo' (Expected 0, got 0)
:: [  BEGIN   ] :: Running 'cp ask.foo /run/systemd/ask-password/'
:: [   PASS   ] :: Command 'cp ask.foo /run/systemd/ask-password/' (Expected 0, got 0)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [  BEGIN   ] :: Running 'timeout 3s systemctl start systemd-ask-password-console.path'
Assertion 'message' failed at src/shared/ask-password-api.c:73, function ask_password_tty(). Aborting.
:: [   FAIL   ] :: Command 'timeout 3s systemctl start systemd-ask-password-console.path' (Expected 124, got 0)
:: [   PASS   ] :: File '/var/tmp/tmp.BPtRUgx5z5' should not contain 'Assertion 'message' failed at'

Comment 6 errata-xmlrpc 2016-11-04 00:42:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2216.html