Bug 1128780

Summary: JON server throws "rhq_agent_install_id_seq" does not exist exception during upgrade from JON3.2.0 to JON3.3
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: UpgradeAssignee: Michael Burman <miburman>
Status: CLOSED CURRENTRELEASE QA Contact: Armine Hovsepyan <ahovsepy>
Severity: urgent Docs Contact:
Priority: urgent    
Version: JON 3.3.0CC: hrupp, mfoley, miburman, mkoci
Target Milestone: ER01Keywords: Triaged
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 14:01:38 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: 1095970, 1128779    
Bug Blocks:    
Attachments:
Description Flags
server.log
none
agent.log none

Description Filip Brychta 2014-08-11 14:24:20 UTC
Created attachment 925781 [details]
server.log

Description of problem:
JON server throws "rhq_agent_install_id_seq" does not exist exception during upgrade from JON3.2.0 to JON3.3 and RHQ Agent resources remain in unknown status.

Version-Release number of selected component (if applicable):
Version :	
3.3.0.DR01
Build Number :	
6468454:dda0a47

How reproducible:
2/2

Steps to Reproduce:
1. JON3.2.0.GA is running (I had two remote agents registered but it might not be necessary)
2. upgrade JON to version 3.3.DR01:
  a. stop jon3.2.0.GA (rhqctl stop)
  b. unzip jon-server-3.3.0.DR01.zip
  c. unzip plugins and copy jars to jon-server-3.3.0.DR01/plugins/ (might not be necessary)
  d. edit rhq-server.properties and set rhq.autoinstall.server.admin.password to workaround bz 1128151 (this can be any string)
  e. run upgrade (./rhqctl upgrade --from-server-dir /home/hudson/jon-server-3.2.0.GA/ --from-agent-dir /home/hudson/rhq-agent)
3. start JON (rhqctl start)

Actual results:
Following exception is thrown to server.log and RHQ Agent resources remain in status unknown

Caused by: org.postgresql.util.PSQLException: ERROR: relation "rhq_agent_install_id_seq" does not exist

Expected results:
No errors, resources are up

Additional info:
RHQ Agent resources become up after agent restart
Full logs attached (search for rhq_agent_install_id_seq)

Comment 1 Filip Brychta 2014-08-11 14:24:50 UTC
Created attachment 925782 [details]
agent.log

Comment 2 Heiko W. Rupp 2014-08-14 13:18:30 UTC
Marking this as triaged, as the issues prevents updating any JON version earlier than 3.3 to 3.3

Comment 3 Michael Burman 2014-08-14 16:03:27 UTC
Fixed in master:

commit c7d22c367a373dfd51485b13c814565bb0818287
Author: Michael Burman <miburman>
Date:   Thu Aug 14 19:01:34 2014 +0300

    [BZ 1095970] Reapplying patch to fix incorrect sequence name

Comment 4 Simeon Pinder 2014-08-19 23:50:36 UTC
Moving to ON_QA as available to test in the following brew build:

https://brewweb.devel.redhat.com//buildinfo?buildID=379025

Comment 5 Jan Bednarik 2014-08-26 15:46:39 UTC
Moving to VERIFIED.

All RHQ Agent resources are up and the error message in question is not logged after upgrade.

Version:3.3.0.ER01.1
Build Number:9941660:f3aa7e7