Bug 801531 - rhn-enable-monitoring.pl results in exception
Summary: rhn-enable-monitoring.pl results in exception
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 1.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space18
TreeView+ depends on / blocked
 
Reported: 2012-03-08 18:31 UTC by schuler.philipp
Modified: 2012-11-01 16:17 UTC (History)
1 user (show)

Fixed In Version: spacewalk-config-1.8.1-1
Clone Of:
Environment:
Last Closed: 2012-11-01 16:17:12 UTC
Embargoed:


Attachments (Terms of Use)

Description schuler.philipp 2012-03-08 18:31:21 UTC
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 (Red Hat) 2012-03-20 13:57:10 UTC
Fixed in Spacewalk master, 97fb06024c8e9d25d1b314077e507d65a1bce0ab.

Comment 2 Jan Pazdziora (Red Hat) 2012-03-20 15:10:40 UTC
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 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 15:28:05 UTC
where can I pick the spacewalk-setup-1.7.10-1 ?

Comment 5 Jan Pazdziora (Red Hat) 2012-03-20 15:38:51 UTC
(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 16:49:34 UTC
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 (Red Hat) 2012-03-21 08:07:15 UTC
(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 10:44:31 UTC
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 (Red Hat) 2012-03-21 13:33:33 UTC
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 15:58:59 UTC
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 (Red Hat) 2012-10-30 19:22:20 UTC
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 (Red Hat) 2012-11-01 16:17:12 UTC
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.