Bug 1040359 - [vdsm] Failure in postun scriptlet: saslpasswd2: user not found (vdsm@ovirt != vdsm@rhevh)
Summary: [vdsm] Failure in postun scriptlet: saslpasswd2: user not found (vdsm@ovirt !...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.3.0
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
: 3.3.0
Assignee: Yaniv Bronhaim
QA Contact: Jiri Belka
URL:
Whiteboard: infra
Depends On:
Blocks: 3.3rc1
TreeView+ depends on / blocked
 
Reported: 2013-12-11 10:03 UTC by Jiri Belka
Modified: 2016-02-10 19:20 UTC (History)
12 users (show)

Fixed In Version: is28
Doc Type: Bug Fix
Doc Text:
The SASL downstream user name has been changed from vdsm@ovirt to vdsm@rhevh to prevent a postrun scriptlet error.
Clone Of:
Environment:
Last Closed: 2014-01-21 16:25:42 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0040 0 normal SHIPPED_LIVE vdsm bug fix and enhancement update 2014-01-21 20:26:21 UTC

Description Jiri Belka 2013-12-11 10:03:58 UTC
Description of problem:

1. first issue:
---------------

Post-install db list:

-%-
 sasldblistusers2 -f /etc/libvirt/passwd.db 
vdsm@rhevh: userPassword
-%-

-%-
# rpm -ev mom vdsm vdsm-python vdsm-python-cpopen vdsm-xmlrpc                                                                           
saslpasswd2: user not found
/var/tmp/rpm-tmp.qYSj9k: line 22: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.qYSj9k: line 22: `fi'
warning: %postun(vdsm-4.13.2-0.2.rc.el6ev.x86_64) scriptlet failed, exit status 2
-%-

But now it tried to delete vdsm@ovirt!

-%-
if [ "$1" -eq 0 ]
then
    /sbin/service vdsmd stop > /dev/null 2>&1 || :
    /sbin/chkconfig --del vdsmd
    /sbin/service supervdsmd stop > /dev/null 2>&1 || :
    /sbin/chkconfig --del supervdsmd
    /sbin/chkconfig --del vdsm-restore-net-config

    /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \
        /etc/sysctl.conf

    /usr/bin/vdsm-tool sebool-unconfig || :

    /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@ovirt

    if /sbin/initctl status libvirtd >/dev/null 2>/dev/null ; then
        /sbin/initctl stop libvirtd  >/dev/null 2>/dev/null
        rm -f /etc/init/libvirtd.conf

        /sbin/chkconfig libvirtd on
        /sbin/service libvirtd start >/dev/null
    fi
fi
-%-

2. issue
---------

-%-
D:     erase: %postun(vdsm-4.13.2-0.2.rc.el6ev.x86_64) scriptlet start
D:     erase: %postun(vdsm-4.13.2-0.2.rc.el6ev.x86_64)  execv(/bin/sh) pid 27917
+ '[' 0 -ge 1 ']'
+ '[' '' = yes ']'
+ '[' '' = yes ']'
/var/tmp/rpm-tmp.Y4Dxrh: line 23: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.Y4Dxrh: line 23: `fi'
D:     erase: waitpid(27917) rc 27917 status 200 secs 0.012
warning: %postun(vdsm-4.13.2-0.2.rc.el6ev.x86_64) scriptlet failed, exit status 2
-%-

Bogus line - 15!

-%-
# rpm --scripts -qp vdsm-4.13.2-0.2.rc.el6ev.x86_64.rpm | sed -n '/postun/,$p' | tail -n +2 | cat -nvte
     1  if [ "$1" -ge 1 ]; then$
     2      supervdsmd_start_required='no'$
     3      vdsmd_start_required='no'$
     4      if /usr/bin/vdsm-tool service-status vdsmd >/dev/null 2>&1; then$
     5          /usr/bin/vdsm-tool service-stop vdsmd >/dev/null 2>&1$
     6          vdsmd_start_required='yes'$
     7      fi$
     8      if /usr/bin/vdsm-tool service-status supervdsmd >/dev/null 2>&1; then$
     9          /usr/bin/vdsm-tool service-stop supervdsmd >/dev/null 2>&1$
    10          supervdsmd_start_required='yes'$
    11      fi$
    12  $
    13      /usr/bin/vdsm-tool libvirt-configure >/dev/null 2>&1$
    14  $
    15      fi$
    16      if [ "${supervdsmd_start_required}" = 'yes' ]; then$
    17          /usr/bin/vdsm-tool service-start supervdsmd >/dev/null 2>&1$
    18      fi$
    19      if [ "${vdsmd_start_required}" = 'yes' ]; then$
    20          /usr/bin/vdsm-tool service-start vdsmd >/dev/null 2>&1$
    21      fi$
    22  fi$
    23  exit 0$
-%-


Version-Release number of selected component (if applicable):
is26 - vdsm-4.13.2-0.2.rc.el6ev.x86_64.rpm

How reproducible:
100%

Steps to Reproduce:
1. rpm -ev vdsm
2.
3.

Actual results:
rpm -ev vdsm
saslpasswd2: user not found
/var/tmp/rpm-tmp.BS96EV: line 22: syntax error near unexpected token `fi'
/var/tmp/rpm-tmp.BS96EV: line 22: `fi'
warning: %postun(vdsm-4.13.2-0.2.rc.el6ev.x86_64) scriptlet failed, exit status 2

Expected results:
no failure, no spam

Additional info:

Comment 1 Yaniv Bronhaim 2013-12-12 17:30:13 UTC

*** This bug has been marked as a duplicate of bug 1040232 ***

Comment 2 Jiri Belka 2013-12-13 11:23:04 UTC
Reopening because BZ1040232 (gerrit[1]) does not solve saslpasswd2 issue.

So solve 1st issue described in comment #0 here. Thx.

[1] http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=commitdiff;h=783b5f8ed4f149fcf406c54887074da75b38eaf1;hp=e6bbe0fb0f8425f2d0b3a27dd2383ed0122fa884

Comment 7 Kiril Nesenko 2013-12-19 15:31:54 UTC
Yaniv please ack the bug. We need to add into the errata.

- Kiril

Comment 8 Jiri Belka 2014-01-13 14:07:22 UTC
ok, is28/is31.

# sasldblistusers2 -f /etc/libvirt/passwd.db
vdsm@rhevh: userPassword

$ for i in 3 6 ; do rpm --scripts -qp vdsm-4.13.2-0.${i}.el6ev.x86_64.rpm | fgrep "vdsm@" ; done
    /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@rhevh
    /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm@rhevh

Comment 9 errata-xmlrpc 2014-01-21 16:25:42 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.

http://rhn.redhat.com/errata/RHBA-2014-0040.html


Note You need to log in before you can comment on or make changes to this bug.