Bug 801531 - rhn-enable-monitoring.pl results in exception
rhn-enable-monitoring.pl results in exception
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Installation (Show other bugs)
1.7
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Pazdziora
Red Hat Satellite QA List
:
Depends On:
Blocks: space18
  Show dependency treegraph
 
Reported: 2012-03-08 13:31 EST by schuler.philipp
Modified: 2012-11-01 12:17 EDT (History)
1 user (show)

See Also:
Fixed In Version: spacewalk-config-1.8.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-01 12:17:12 EDT
Type: ---
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 schuler.philipp 2012-03-08 13:31:21 EST
Description of problem:
After successfully upgrading to 1.7 and then running rhn-enable-monitoring.pl you get exception as seen below

Version-Release number of selected component (if applicable):
1.7 postgres backend

How reproducible:
upgrade to 1.7 as per upgrade instructions, then run rhn-enable-monitoring.pl
  
Actual results:
/usr/share/spacewalk/setup/upgrade/rhn-enable-monitoring.pl --enable-scout
Deploying config
RHN::Exception: DBD::Pg::st execute failed: ERROR:  new row for relation "rhn_config_macro" violates check constraint "vn_rhn_config_macro_definition"
  RHN::DB /usr/share/perl5/vendor_perl/RHN/DB.pm 121 RHN::Exception::DB::throw
  RHN::DB::st /usr/share/perl5/vendor_perl/RHN/DB.pm 452 RHN::DB::handle_error
  RHN::DB::SatInstall /usr/share/perl5/vendor_perl/RHN/DB/SatInstall.pm 67 RHN::DB::st::execute_h
  main /usr/share/spacewalk/setup/upgrade/rhn-enable-monitoring.pl 115 RHN::DB::SatInstall::update_monitoring_config

Expected results:
monitoring should be enabled without exception

Additional info:
it seems like monitoring IS enabled but still the exception indicates that something fails
Comment 1 Jan Pazdziora 2012-03-20 09:57:10 EDT
Fixed in Spacewalk master, 97fb06024c8e9d25d1b314077e507d65a1bce0ab.
Comment 2 Jan Pazdziora 2012-03-20 11:10:40 EDT
I've also cherry picked the fix to SPACEWALK-1.7 and built spacewalk-setup-1.7.10-1.

On your system, please upgrade spacewalk-setup to this version, and then do one of the following steps:

1) add traceback_mail=your-email-address@domain.com to /etc/rhn/rhn.conf
2) run (on one line, bugzilla will wrap it) /usr/bin/satcon-deploy-tree.pl --source=/var/lib/rhn/rhn-satellite-prep/etc/rhn --dest=/etc/rhn --conf=/var/lib/rhn/rhn-satellite-prep/satellite-local-rules.conf
Comment 4 schuler.philipp 2012-03-20 11:28:05 EDT
where can I pick the spacewalk-setup-1.7.10-1 ?
Comment 5 Jan Pazdziora 2012-03-20 11:38:51 EDT
(In reply to comment #4)
> where can I pick the spacewalk-setup-1.7.10-1 ?

It will land in the Spacewalk 1.7 yum repo in about 30 minutes.
Comment 6 schuler.philipp 2012-03-20 12:49:34 EDT
stopped spacwalk-service, updated to latest spacewalk-setup and ran the satcon cmd then tried rhn-enable-monitoring.pl again. Results in same exception
Comment 7 Jan Pazdziora 2012-03-21 04:07:15 EDT
(In reply to comment #6)
> stopped spacwalk-service, updated to latest spacewalk-setup and ran the satcon
> cmd then tried rhn-enable-monitoring.pl again. Results in same exception

Does the /etc/rhn/rhn.conf have traceback_mail value specified (it should after that satcon-deploy-tree.pl call)?
Comment 8 schuler.philipp 2012-03-21 06:44:31 EDT
I did 
-add the traceback_mail to the rhn.conf 
-satcon-deploy 
-then tried the rhn-enable-monitoring.pl

Afterwards when looking in the rhn.conf I noticed that the traceback_ var was gone. I also did not get an email
Comment 9 Jan Pazdziora 2012-03-21 09:33:33 EDT
Mea culpa. The package which has the fix is spacewalk-config, not spacewalk-setup. It should bring in new /var/lib/rhn/rhn-satellite-prep/etc/rhn/rhn.conf which will have the parameter and thus subsequent satcon-deploy-tree.pl will put it to /etc/rhn/rhn.conf. The spacewalk-config-1.7.3-1 will land in the 1.7 yum repo in about 30 minutes.

I'm sorry about the confusion.
Comment 10 schuler.philipp 2012-03-21 11:58:59 EDT
with the new spacewalk-config the tracebackmail is in the rhn.conf and rhn-enable-monitoring.pl works without exception, so this bug report is fixed . thanks !!
Comment 11 Jan Pazdziora 2012-10-30 15:22:20 EDT
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/
Comment 12 Jan Pazdziora 2012-11-01 12:17:12 EDT
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18

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