Bug 1270610

Summary: "Cannot Login. User Account has expired" because valid_from date is set in the future
Product: [oVirt] ovirt-engine Reporter: Christopher Pereira <kripper>
Component: Setup.EngineAssignee: Martin Perina <mperina>
Status: CLOSED CURRENTRELEASE QA Contact: Ondra Machacek <omachace>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.6.0.1CC: bugs, didi, lveyde, oourfali, rmartins, sbonazzo, stirabos
Target Milestone: ovirt-3.6.0-gaFlags: rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
oourfali: devel_ack+
pnovotny: testing_ack+
Target Release: 3.6.0   
Hardware: All   
OS: All   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-04 13:37:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christopher Pereira 2015-10-11 20:32:15 UTC
Probably because of timezone configuration, engine-setup created/updated users table with new field "valid_from" set to "2015-10-11 20:13:45.408-04" (on "aaa_jdbc" schema).

But current date is "Sun Oct 11 17:25:57 CLT 2015" so user cannot login.

I workarrounded by changing valid_from date:

SET search_path TO aaa_jdbc;
update users set valid_from = '2001-01-01';

Please note there are other BZ reports suffering from the same issue and people probably will get confused trying to replicate/debug the problem because it fixes automatically when valid_from gets valid some time later.

Comment 1 Martin Perina 2015-10-14 06:10:00 UTC
Fix contained in ovirt-engine-extension-aaa-jdbc-1.0.0

Comment 2 Christopher Pereira 2015-10-14 10:47:25 UTC
(In reply to Martin Perina from comment #1)
> Fix contained in ovirt-engine-extension-aaa-jdbc-1.0.0

The bug was present in:
ovirt-engine-extension-aaa-jdbc-1.0.0-0.0.master.20150923074852.git46a67c9.el7.noarch

Installed via yum (3.6-rc1).

Comment 3 Martin Perina 2015-10-17 14:54:17 UTC
(In reply to Christopher Pereira from comment #2)
> (In reply to Martin Perina from comment #1)
> > Fix contained in ovirt-engine-extension-aaa-jdbc-1.0.0
> 
> The bug was present in:
> ovirt-engine-extension-aaa-jdbc-1.0.0-0.0.master.20150923074852.git46a67c9.
> el7.noarch
> 
> Installed via yum (3.6-rc1).

I meant ovirt-engine-extension-aaa-jdbc-1.0.0-2, the above was just snapshot build.

Anyway this is fixed in oVirt 3.6.0 RC2

Comment 4 Ondra Machacek 2015-10-22 09:39:58 UTC
ovirt-engine-extension-aaa-jdbc-1.0.0-2.el6ev.noarch

[root@om-ovirt36 ~]# date
Thu Oct 22 11:37:51 CEST 2015

[root@om-ovirt36 ~]# ovirt-aaa-jdbc-tool user add userX
adding user userX...
user added successfully


engine=# select valid_from from aaa_jdbc.users where name = 'userX';
         valid_from         
----------------------------
 2015-10-22 11:38:00.527+02
(1 row)

Comment 5 Sandro Bonazzola 2015-11-04 13:37:55 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.