Bug 1459136 - spacewalk-debug misses rhn_pgversion.conf on upgraded Satellite with Oracle
spacewalk-debug misses rhn_pgversion.conf on upgraded Satellite with Oracle
Status: CLOSED NOTABUG
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Other (Show other bugs)
580
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomáš Kašpárek
Red Hat Satellite QA List
:
Depends On:
Blocks: sat58-errata
  Show dependency treegraph
 
Reported: 2017-06-06 08:05 EDT by Ales Dujicek
Modified: 2017-08-24 08:32 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-22 02:54:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ales Dujicek 2017-06-06 08:05:11 EDT
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 05:16:42 EDT
(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 16:51:31 EDT
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 02:41:47 EDT
(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 02:44:05 EDT
(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 02:54:33 EDT
(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 16:57:48 EDT
(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.