Bug 1459136 - spacewalk-debug misses rhn_pgversion.conf on upgraded Satellite with Oracle
Summary: spacewalk-debug misses rhn_pgversion.conf on upgraded Satellite with Oracle
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Other
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata
TreeView+ depends on / blocked
 
Reported: 2017-06-06 12:05 UTC by Ales Dujicek
Modified: 2020-08-13 09:19 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-22 06:54:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ales Dujicek 2017-06-06 12:05:11 UTC
Description of problem:

spacewalk-debug misses /usr/share/rhn/config-defaults/rhn_pgversion.conf on upgraded Satellite with Oracle backend

#  spacewalk-debug 
Collecting and packaging relevant diagnostic information.
Warning: this may take some time...
    * copying configuration information
    * copying logs
    * copying config-defaults files
    * copying cobbler files
    * copying ssl-build
    * copying /etc/sudoers*
    * copying apache, postgres, tomcat entries from /etc/passwd
    * copying apache, postgres, tomcat entries from /etc/group
    * querying RPM database (versioning of Spacewalk, etc.)
    * querying schema version, database charactersets and database
    * querying users timezone and localization preferences
    * get diskspace available
    * get database statistics
    * get schema statistics
CONFIG PARSE WARNING: File not found or can't be read /usr/share/rhn/config-defaults/rhn_pgversion.conf
CONFIG PARSE WARNING: key not found in config default dict ('pgversion',)
CONFIG PARSE WARNING: File not found or can't be read /usr/share/rhn/config-defaults/rhn_pgversion.conf
CONFIG PARSE WARNING: key not found in config default dict ('pgversion',)
CONFIG PARSE WARNING: File not found or can't be read /usr/share/rhn/config-defaults/rhn_pgversion.conf
CONFIG PARSE WARNING: key not found in config default dict ('pgversion',)
    * copying pgstartup.log
cp: missing destination file operand after `/tmp/spacewalk-debug-31520/spacewalk-debug/database'
Try `cp --help' for more information.
    * copying initlog
cp: missing destination file operand after `/tmp/spacewalk-debug-31520/spacewalk-debug/database'
Try `cp --help' for more information.
    * copying schema upgrade logs
    * copying audit.log
    * copying tasko/sat
    * timestamping
    * creating tarball (may take some time): /tmp/spacewalk-debug.tar.bz2
    * removing temporary debug tree

Debug dump created, stored in /tmp/spacewalk-debug.tar.bz2

# ls /usr/share/rhn/config-defaults/rhn_pgversion.conf
ls: cannot access /usr/share/rhn/config-defaults/rhn_pgversion.conf: No such file or directory


./install.pl:
if (not $opts{"upgrade"} or Spacewalk::Setup::is_db_migration(\%opts)) {
  write_pg_version();
}
the file is not generated when upgrading Oracle->Oracle


Version-Release number of selected component (if applicable):
spacewalk-backend-tools-2.5.3-139.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. get old Satellite with Oracle
2. upgrade to 5.8 with Oracle
3. # spacewalk-debug

Actual results:
CONFIG PARSE WARNING: File not found or can't be read /usr/share/rhn/config-defaults/rhn_pgversion.conf
CONFIG PARSE WARNING: key not found in config default dict ('pgversion',)
cp: missing destination file operand after `/tmp/spacewalk-debug-31520/spacewalk-debug/database'
Try `cp --help' for more information.

Expected results:
no errors/warnings

Comment 2 Jan Dobes 2017-08-21 09:16:42 UTC
(In reply to Ales Dujicek from comment #0)
> ./install.pl:
> if (not $opts{"upgrade"} or Spacewalk::Setup::is_db_migration(\%opts)) {
>   write_pg_version();
> }
> the file is not generated when upgrading Oracle->Oracle

According to this the /usr/share/rhn/config-defaults/rhn_pgversion.conf file is written when:

* installing Sat with embedded PG
* installing Sat with external PG
* installing Sat with external Oracle
* upgrading Sat with Oracle to embedded PG

and is NOT written when:

* upgrading Sat with external PG
* upgrading Sat with external Oracle

Tomas, is that correct?

Comment 3 Xixi 2017-08-21 20:51:31 UTC
Hi Tomas/Jan,
If I read the attached case 01889163 correctly it was closed as resolved after customer made update to tomcat config changing -Dorg.xml.sax.driver=com.redhat.rhn.frontend.xmlrpc.util.RhnSAXParser
to
-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser

per kbase https://access.redhat.com/solutions/3115311 CommentsHelpfulFollow[Satellite 5] After update to 5.8 rhn-search throws exception "java.lang.ClassNotFoundException: com.redhat.rhn.frontend.xmlrpc.util.RhnSAXParser" 

Is that part of this bugfix or should be a different BZ?
Thanks,

Comment 4 Tomáš Kašpárek 2017-08-22 06:41:47 UTC
(In reply to Jan Dobes from comment #2)
> (In reply to Ales Dujicek from comment #0)
> > ./install.pl:
> > if (not $opts{"upgrade"} or Spacewalk::Setup::is_db_migration(\%opts)) {
> >   write_pg_version();
> > }
> > the file is not generated when upgrading Oracle->Oracle
> 
> According to this the /usr/share/rhn/config-defaults/rhn_pgversion.conf file
> is written when:
> 
> * installing Sat with embedded PG
> * installing Sat with external PG
> * installing Sat with external Oracle
> * upgrading Sat with Oracle to embedded PG
> 
> and is NOT written when:
> 
> * upgrading Sat with external PG
> * upgrading Sat with external Oracle
> 
> Tomas, is that correct?

It's correct partially as /usr/share/rhn/config-defaults/rhn_pgversion.conf file is written when:
 * installing new 5.8 or upgrading to 5.8 with embedded PG
 * installing new 5.8 managed DB or upgrading managed DB to 5.8 (and  the conf file is written on managed DB machine)

in all other cases it's not written, which means it's not written when you have Oracle or external Postgresql (by that I mean you're not using managed DB).

Comment 5 Tomáš Kašpárek 2017-08-22 06:44:05 UTC
(In reply to Xixi from comment #3)
> Hi Tomas/Jan,
> If I read the attached case 01889163 correctly it was closed as resolved
> after customer made update to tomcat config changing
> -Dorg.xml.sax.driver=com.redhat.rhn.frontend.xmlrpc.util.RhnSAXParser
> to
> -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
> 
> per kbase https://access.redhat.com/solutions/3115311
> CommentsHelpfulFollow[Satellite 5] After update to 5.8 rhn-search throws
> exception "java.lang.ClassNotFoundException:
> com.redhat.rhn.frontend.xmlrpc.util.RhnSAXParser" 
> 
> Is that part of this bugfix or should be a different BZ?
> Thanks,

This looks like completely different issue, thus different BZ.

Comment 6 Tomáš Kašpárek 2017-08-22 06:54:33 UTC
(In reply to Xixi from comment #3)

For issues with spacewalk-debug observed in case attached I've created new BZ as I am going to close this BZ as not having rhn_pgversion.conf on external Oracle is intended.

Comment 7 Xixi 2017-08-23 20:57:48 UTC
(In reply to Tomáš Kašpárek from comment #5)
> This looks like completely different issue, thus different BZ.
opened Bug 1484551 - After upgrade to Satellite 5.8 rhn-search throws exception "java.lang.ClassNotFoundException: com.redhat.rhn.frontend.xmlrpc.util.RhnSAXParser"


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