Bug 63802 - Cannot add Entitlements
Summary: Cannot add Entitlements
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: unspecified
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fanny Augustin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-04-18 20:43 UTC by Matt Jamison
Modified: 2007-07-31 19:19 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-05-01 22:04:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Josef Komenda 2002-04-18 20:43:22 UTC
Description of Problem: Cannot add Entitlements using slot-org.pl


Version-Release number of selected component (if applicable): see bug 63780


Additional Information:

/pxtdb.conf: 
rhnsat: dbi:Oracle:rhnsat satdemo satdemo; AutoCommit 0 PrintError 0 RaiseError
1 Taint 0

/tnsnames.ora:
rhnsat   =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = filth2.webdev-colo.redhat.com)(PORT =
1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = filth2.webdev-colo.redhat.com)(PORT =
1522))
      (ADDRESS = (PROTOCOL = TCP)(HOST = filth2.webdev-colo.redhat.com)(PORT =
1523))
      (ADDRESS = (PROTOCOL = TCP)(HOST = filth2.webdev-colo.redhat.com)(PORT =
1524))
      (ADDRESS = (PROTOCOL = TCP)(HOST = filth2.webdev-colo.redhat.com)(PORT =
1525))
      (ADDRESS = (PROTOCOL = TCP)(HOST = filth2.webdev-colo.redhat.com)(PORT =
1526))
    )
    (CONNECT_DATA =
      (SID  = rhnsat)
    )
  )

Error: 
[jkomenda@dhcp59-243 scripts]$ perl slot-org.pl rhnsat joe_sat_1 10 Y
Rolling back database handle. at
/usr/lib/perl5/site_perl/5.6.1/i386-linux/RHN/DB.pm line 276.
RHN::Exception: DBD::Oracle::st execute failed: ORA-06550: line 3, column 3:
PLS-00201: identifier 'RHN_EP.ENTITLE_CUSTOMER' must be declared
ORA-06550: line 3, column 3:
PL/SQL: Statement ignored (DBD ERROR: OCIStmtExecute) at (eval 5) line 19.

  RHN::DB::STH (eval 5) 20 RHN::DB::objectify_error
  main slot-org.pl 61 RHN::DB::STH::execute

Comment 1 Chip Turner 2002-04-18 20:56:55 UTC
okay we need some stored procedures and/or a satellite rhn_foo plsql package to
handle the setting up of the first org.  specifically, code to:

x create the first org (first user creation can be done on the website)
x set that org's workgroup count
x set that org's allowed channel families
x store the above values somewhere in the schema that is monitored for editing;
also somewhere to store expiration of the satellite (NULLable), a copy of the
digital cert (a varchar2 of 4096 bytes).  probably a single table with one row?

the first three are immediately blocking, whereas the last one isn't as urgent
but still a blocker

Comment 2 Peter Jones 2002-04-18 22:41:14 UTC
Currently in rhnsat:

create_first_org(name_in in varchar2, password_in in varchar2);

rhn_entitlement.set_group_count (
        customer_id_in in number,       -- customer_id
        type_in in char,                -- 'U' or 'S'
        group_type_in in number,        -- rhn[User|Server]GroupType.id
        quantity_in in number           -- quantity
    );

rhn_entitlement.set_family_count (
        customer_id_in in number,       -- customer_id
        channel_family_id_in in number, -- 246
        quantity_in in number           -- 3
    );

Item #4 doesn't exist quite yet.


Comment 3 Peter Jones 2002-04-22 19:42:49 UTC
Current solution for #4 on the list is rhnSatelliteLog, which logs changes to
rhnChannelFamilyPermissions, rhnServerGroup, and rhnUserGroup.  These are in
CVS, but not deployed to any db environments; we don't really want them on the
track for the live server.  Suggestions?


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