Bug 1027338

Summary: Account provider: cannot delete user when his home directory couldn't be deleted
Product: Red Hat Enterprise Linux 7 Reporter: Petr Sklenar <psklenar>
Component: openlmi-providersAssignee: Tomáš Bžatek <tbzatek>
Status: CLOSED CURRENTRELEASE QA Contact: Robin Hack <rhack>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: tbzatek, tsmetana
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openlmi-providers-0.4.1-7.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:01:34 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: 922084    

Description Petr Sklenar 2013-11-06 15:24:19 UTC
Description of problem:
Account provider: cannot delete user after his modification

Version-Release number of selected component (if applicable):
openlmi-0.4.1-1.el7.noarch
openlmi-tools-0.9-3.el7.noarch
libuser-0.60-3.el7.x86_64


How reproducible:
always

Steps to Reproduce:

1, create user
2, modify user
3, delete user
-------
import unittest

import lmi.shell as lmishell
import os
import shutil
import threading
import string
import random
import time

from methods import *

HOST =      "localhost"
USER =      os.environ.get("LMI_CIMOM_USERNAME", "root")
PASSWD =    os.environ.get("LMI_CIMOM_PASSWORD", "blank")

def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
   return ''.join(random.choice(chars) for x in range(size))
#setup
conn = lmishell.connect(HOST, USER, PASSWD)
cs = conn.root.cimv2.PG_ComputerSystem.first_instance()
lams = conn.root.cimv2.LMI_AccountManagementService.first_instance()

#create
for i in range(10):
    myuser = "lmishell-user" + id_generator(10)
    print myuser
    user = lams.CreateAccount(Name=myuser, System=cs)
    user_mod = conn.root.cimv2.LMI_Account.first_instance({"Name" : myuser})
    grp_mod = conn.root.cimv2.LMI_Group.first_instance({"Name": myuser})
    anystring = 'x' * i
    myshell = '/bin/' + anystring
    myhome = '/tmp/' + anystring
    user_mod.LoginShell = myshell
    user_mod.HomeDirectory = myhome
    user_mod.push()
    print user_mod.DeleteUser()
    print grp_mod.DeleteGroup()
---------------------



Actual results:
error code = 4097
LMIReturnValue(rval=4097, rparams=NocaseDict({}), errorstr='')
LMIReturnValue(rval=4097, rparams=NocaseDict({}), errorstr='')


cimserver when running manually says:

(process:30434): GLib-GObject-CRITICAL **: g_value_array_get_nth: assertion `value_array != NULL' failed
(process:30434): GLib-GObject-CRITICAL **: g_value_get_long: assertion `G_VALUE_HOLDS_LONG (value)' failed

Expected results:
I can do deletion

Additional info:

Comment 2 Petr Sklenar 2013-11-06 15:34:25 UTC
I haven't home created, so
should user be deleted by this case? I vote for 'yes'

Comment 4 Ludek Smid 2014-06-13 12:01:34 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.