Bug 127898

Summary: Fill in monitoring config info during initial install
Product: Red Hat Satellite 5 Reporter: Mihai Ibanescu <mihai.ibanescu>
Component: InstallerAssignee: Robin Norwood <robin.norwood>
Status: CLOSED CURRENTRELEASE QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: nhansen, rhn-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-14 12:55:07 UTC Type: ---
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: 127504, 128327    
Bug Blocks: 120998    

Description Dave Faraldo 2004-07-15 01:24:59 UTC
The following things need to be done by the installer to complete the
NOCpulse configuration:

1) Fill in the blanks.

  The following parameters need to be filled in.  The SQL is:

    UPDATE rhn_config_macro
    SET    definition = ?,
           last_update_user = 'installer',
           last_update_date = sysdate
    WHERE  name = ?

  with bind vars for the definition and macro name, respectively.

  The parameters are as follows:

    RHN_ADMIN_EMAIL    - the email address of last resort (for
catastrophies)
    MAIL_MX            - the local mail exchanger to use for outbound mail
    MDOM               - the local mail domain (for replies)

    RHN_DB_NAME        - the database name (tnsnames.ora entry)
    RHN_DB_PASSWD      - the database password
    RHN_DB_USERNAME    - the database user
    RHN_DB_TABLE_OWNER - the database table owner (if you know it; I don't
                         think it's used, but I'm not sure)

    RHN_SAT_HOSTNAME   - the FQDN of the satellite
    XPROTO             - Protocol for scout -> satellite communiation
                         ('http' or 'https')
    RHN_SAT_WEB_PORT   - The port appropriate to $XPROTO (80 or 443)
                         

2) Update the record in RHN_DB_ENVIRONMENT to point the 'LICENSE' 
   environment at the current database name.  The SQL is:

     UPDATE rhn_db_environment
     SET    db_name = ?
     WHERE  environment = 'LICENSE'
   
   with a bind var for the database name.


3) Create a Gritch destination.

  This is similar to $RHN_ADMIN_EMAIL, except that it's a contact
  method known by the notification system.  Here's what to do:

  1) Create a contact method for the $RHN_ADMIN_EMAIL email 
     address using Kim Dykeman's RHN::ContactMethod module.
  
  2) Fetch the record from the RHN_CONTACT_METHODS table, thus:

       SELECT   m.recid, m.method_name, c.org_id
       FROM     web_contact c, rhn_contact_methods m
       WHERE    m.contact_id = c.id
  
  and fill in the following RHN_CONFIG_MACRO records with the SQL from 1):

    Macro                    Column
    ----------------------   --------------------------
    GRITCH_TARGETDESTNAME    m.method_name
    GRITCH_TARGETDESTID      m.recid
    GRITCH_TARGETCUST        c.org_id

Comment 1 Dave Faraldo 2004-07-15 17:15:24 UTC
*** Bug 100229 has been marked as a duplicate of this bug. ***

Comment 2 Dave Faraldo 2004-07-15 20:36:25 UTC
Oops!  Change the SQL in 2) to:

     UPDATE rhn_db_environment
     SET    db_name = UPPER(?)
     WHERE  environment = 'LICENSE'

(We join db_name with v$database.name, which is in all caps.)

Comment 3 Robin Norwood 2004-07-20 01:09:11 UTC
#1 and #2 are done - I still need to wire in #3, but it must be after
first user creation.

Comment 4 Robin Norwood 2004-07-26 18:45:31 UTC
Oh yeah, #3 is done.

Comment 5 Fanny Augustin 2004-08-07 03:16:47 UTC
This should be done, since the installer works fine.  Looks good on QA.